You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.3 KiB

10 years ago
module.exports = function (grunt) {
'use strict';
11 years ago
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
version: {
src: ['<%= pkg.exportName %>.js', '*.json']
11 years ago
},
10 years ago
jshint: {
all: ['*.js', '!*.min.js'],
options: {
strict: true,
newcap: false, // "Tolerate uncapitalized constructors"
node: true,
expr: true, // - true && call() "Expected an assignment or function call and instead saw an expression."
supernew: true, // - "Missing '()' invoking a constructor."
laxbreak: true,
white: true,
globals: {
define: true,
test: true,
expect: true,
module: true,
asyncTest: true,
start: true,
ok: true,
equal: true,
notEqual: true,
deepEqual: true,
window: true,
document: true,
performance: true
}
}
},
11 years ago
uglify: {
options: {
banner: '/*! <%= pkg.exportName %> <%= pkg.version %> - <%= pkg.license %> | <%= pkg.repository.url %> */\n'
},
dist: {
files: {
10 years ago
'<%= pkg.exportName %>.min.js': ['<%= pkg.exportName %>.js']
11 years ago
}
}
}
});
grunt.loadNpmTasks('grunt-version');
10 years ago
grunt.loadNpmTasks('grunt-contrib-jshint');
11 years ago
grunt.loadNpmTasks('grunt-contrib-uglify');
10 years ago
grunt.registerTask('tests', ['jshint']);
grunt.registerTask('default', ['tests', 'version', 'uglify']);
11 years ago
};