Skip to content

Commit

Permalink
Added grunt-banner task.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffschwartz committed Jul 10, 2015
1 parent aa5c178 commit 67d1b7f
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 30 deletions.
25 changes: 25 additions & 0 deletions Gruntfile.js
Expand Up @@ -15,6 +15,22 @@ module.exports = function ( grunt ) {
dest: 'dist/preamble.js'
}
},
usebanner: {
dist: {
options: {
position: 'top',
banner: '/* <%= pkg.title %> v<%= pkg.version %>' +
' - released on <%= grunt.template.today("yyyy-mm-dd") %>\n' +
' * <%= pkg.preamble.copyright %>\n' +
' * <%= pkg.preamble.distrights%>\n' +
'*/',
linebreak: true
},
files: {
src: [ 'dist/preamble.js', 'dist/preamble.js' ]
}
}
},
watch : {
js : {
files : ['src/javascripts/**/*.js'],
Expand All @@ -29,6 +45,13 @@ module.exports = function ( grunt ) {
options : {
interrupt : true
}
},
banner : {
files : ['dist/preamble.js'],
tasks : ['usebanner'],
options : {
interrupt : true
}
}
}
});
Expand All @@ -37,8 +60,10 @@ module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-banner');

// Default task(s).
grunt.registerTask( 'default', ['watch'] );
grunt.registerTask( 'dist', ['jshint', 'browserify', 'usebanner'] );

};
65 changes: 35 additions & 30 deletions package.json
@@ -1,32 +1,37 @@
{
"name": "preamble",
"title": "Preamble",
"description": "A powerful JavaScript testing framework backed by a powerful assertion engine that your test scripts interface with through a simple to use but powerful API. Preamble makes the task of authoring tests easy, intuitive and even fun.",
"version": "3.0.3",
"author": {
"name": "Jeffrey Schwartz",
"email": "jefftschwartz@gmail.com",
"url": "https://github.com/jeffschwartz"
},
"homepage": "http://jeffschwartz.github.io/preamble/",
"repository": {
"type": "git",
"url": "https://github.com/jeffschwartz/preamble"
},
"license": {
"name": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
},
"keywords": [
"preamble",
"javascript",
"testing",
"bdd",
"framework"
],
"devDependencies": {
"grunt-browserify": "^3.8.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-watch": "~0.6.1"
}
"name": "preamble",
"title": "Preamble",
"description": "A powerful JavaScript testing framework backed by a powerful assertion engine that your test scripts interface with through a simple to use but powerful API. Preamble makes the task of authoring tests easy, intuitive and even fun.",
"version": "3.1.0",
"author": {
"name": "Jeffrey Schwartz",
"email": "jefftschwartz@gmail.com",
"url": "https://github.com/jeffschwartz"
},
"homepage": "http://jeffschwartz.github.io/preamble/",
"repository": {
"type": "git",
"url": "https://github.com/jeffschwartz/preamble"
},
"license": {
"name": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
},
"keywords": [
"preamble",
"javascript",
"testing",
"bdd",
"framework"
],
"devDependencies": {
"grunt-banner": "^0.4.0",
"grunt-browserify": "^3.8.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-watch": "~0.6.1"
},
"preamble": {
"copyright" : "(c) 2013 - 2015 Jeffrey Schwartz",
"distrights" : "Preamble may be freely distributed under the MIT license."
}
}

0 comments on commit 67d1b7f

Please sign in to comment.