forked from markdalgleish/stellar.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Grunt build step, update readme
- Loading branch information
1 parent
bff38e3
commit 0aad823
Showing
8 changed files
with
712 additions
and
19 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/*global module:false*/ | ||
module.exports = function(grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
pkg: '<json:package.json>', | ||
meta: { | ||
banner: '/*!\n' + | ||
' * <%= pkg.title || pkg.name %> v<%= pkg.version %>\n' + | ||
' * <%= pkg.homepage %>\n' + | ||
' * \n' + | ||
' * Copyright <%= grunt.template.today("yyyy") %>, <%= pkg.author.name %>\n' + | ||
' * This content is released under the <%= _.pluck(pkg.licenses, "type").join(", ") %> license<%= pkg.licenses.length === 1 ? "" : "s" %>\n' + | ||
' * <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' + | ||
' */', | ||
microbanner: '/*! <%= pkg.title || pkg.name %> v<%= pkg.version %> | Copyright <%= grunt.template.today("yyyy") %>, <%= pkg.author.name %> | <%= pkg.homepage %> | <%= _.pluck(pkg.licenses, "url").join(", ") %> */' | ||
}, | ||
lint: { | ||
files: ['grunt.js', 'src/**/*.js'] | ||
}, | ||
concat: { | ||
dist: { | ||
src: ['<banner:meta.banner>', '<file_strip_banner:src/<%= pkg.name %>.js>'], | ||
dest: '<%= pkg.name %>.js' | ||
} | ||
}, | ||
min: { | ||
dist: { | ||
src: ['<banner:meta.microbanner>', '<config:concat.dist.dest>'], | ||
dest: '<%= pkg.name %>.min.js' | ||
} | ||
}, | ||
watch: { | ||
files: '<config:lint.files>', | ||
tasks: 'lint' | ||
}, | ||
jshint: { | ||
options: { | ||
curly: false, | ||
eqeqeq: true, | ||
immed: false, | ||
latedef: true, | ||
newcap: true, | ||
noarg: true, | ||
sub: true, | ||
undef: true, | ||
boss: true, | ||
eqnull: true, | ||
browser: true | ||
}, | ||
globals: { | ||
jQuery: true | ||
} | ||
}, | ||
uglify: {} | ||
}); | ||
|
||
// Default task. | ||
grunt.registerTask('default', 'lint concat min'); | ||
|
||
}; |
Oops, something went wrong.