Skip to content

Commit

Permalink
use grunt instead of anvil for build. update references to KO 2.2.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
rniemeyer committed Jun 28, 2013
1 parent 7f3a45a commit c3a9758
Show file tree
Hide file tree
Showing 13 changed files with 174 additions and 110 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
node_modules/
reports/
66 changes: 66 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,66 @@
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/*.js',
options: {
//"-W030": false,
force: true
}
},
watch: {
scripts: {
files: ['src/*.*'],
tasks: ['default'],
options: {
nospawn: true
}
}
},
jasmine : {
src : 'src/*.js',
options : {
specs : 'spec/*.js',
vendor: 'ext/*.js',
template : require('grunt-template-jasmine-istanbul'),
templateOptions: {
coverage: 'reports/coverage.json',
report: 'reports/coverage'
}
}
}
});

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

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

};
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -115,7 +115,7 @@ Note: when attaching a handler using the binding, you will need to manage the va
* Knockout 2.0+

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

##Examples
The `examples` directory contains a sample that demonstrates the three different ways that a handler can be found when a child element triggers an event.
Expand Down
16 changes: 0 additions & 16 deletions build.json

This file was deleted.

4 changes: 2 additions & 2 deletions build/knockout-delegatedEvents.js
@@ -1,5 +1,5 @@
//knockout-delegatedEvents v0.1.1 | (c) 2012 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
(function(factory) {
// knockout-delegatedEvents 0.1.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-delegatedEvents.min.js

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

2 changes: 1 addition & 1 deletion examples/example.html
Expand Up @@ -37,7 +37,7 @@
</div>


<script src="../ext/knockout-2.2.0.js"></script>
<script src="../ext/knockout-2.2.1.js"></script>
<script src="../src/knockout-delegatedEvents.js"></script>
<script>
var Item = function(id, name, price, description) {
Expand Down

0 comments on commit c3a9758

Please sign in to comment.