Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use grunt instead of anvil for the build process
  • Loading branch information
rniemeyer committed Jun 21, 2013
1 parent feaa6ed commit 0496c93
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 23 deletions.
53 changes: 53 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,53 @@
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: '\n\n',
stripBanners: true,
banner: '// <%= pkg.name %> <%= pkg.version %> | (c) <%= grunt.template.today("yyyy") %> Ryan Niemeyer | http://www.opensource.org/licenses/mit-license\n'
},
dist: {
src: "src/*.js",
dest: 'build/<%= pkg.name %>.js'
}
},
uglify: {
options: {
stripBanners: true,
banner: '// <%= pkg.name %> <%= pkg.version %> | (c) <%= grunt.template.today("yyyy") %> Ryan Niemeyer | http://www.opensource.org/licenses/mit-license\n'
},
build: {
src: 'build/<%= pkg.name %>.js',
dest: 'build/<%= pkg.name %>.min.js'
}
},
jshint: {
files: 'src/knockout-postbox.js',
options: {
//"-W030": false,
force: true
}
},
watch: {
scripts: {
files: ['src/*.*'],
tasks: ['default'],
options: {
nospawn: true
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');

// Default task(s).
grunt.registerTask('default', ['jshint', 'concat', 'uglify']);

};
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -176,7 +176,7 @@ Dependencies

Build
-----
This project uses anvil.js (see http://github.com/arobson/anvil.js) for building/minifying.
This project uses [grunt](http://gruntjs.com/) for building/minifying.

Install from NuGet
------------------
Expand Down
16 changes: 0 additions & 16 deletions build.json

This file was deleted.

4 changes: 2 additions & 2 deletions build/knockout-postbox.js
@@ -1,5 +1,5 @@
//knockout-postbox 0.3.1 | (c) 2013 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
!(function(factory) {
// knockout-postbox 0.3.1 | (c) 2013 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
;(function(factory) {
//CommonJS
if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
factory(require("knockout"), exports);
Expand Down
4 changes: 2 additions & 2 deletions build/knockout-postbox.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion header.js

This file was deleted.

11 changes: 11 additions & 0 deletions package.json
@@ -0,0 +1,11 @@
{
"name": "knockout-postbox",
"version": "0.3.1",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "0.x.x",
"grunt-contrib-jshint": "0.x.x",
"grunt-contrib-watch": "0.x.x",
"grunt-contrib-concat": "0.x.x"
}
}
2 changes: 1 addition & 1 deletion src/knockout-postbox.js
@@ -1,4 +1,4 @@
!(function(factory) {
;(function(factory) {
//CommonJS
if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
factory(require("knockout"), exports);
Expand Down

0 comments on commit 0496c93

Please sign in to comment.