animation-chain
Version:
Animation Chain is a chaining library which utilizes the browser's `requestAnimationFrame` function in place of the usual `setTimeout`. This results in a much more accurate representation of time passed based on a delta time calculation. This can be usefu
70 lines (67 loc) • 1.57 kB
JavaScript
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
public: ['public/']
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> - v <%= pkg.version %> - <%= pkg.author %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
dist: {
files: {
'public/animation-chain.js': ['animation-chain.js']
}
},
},
jshint: {
options: {
indent: 2,
camelcase: true,
nonew: true,
quotmark: true,
bitwise: true,
forin: true,
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
undef: true,
unused: true,
node: true,
browser: true,
browserify: true
},
gruntfile: {
files: {
src: ['Gruntfile.js']
}
},
dev: {
files: {
src: ['index.js', 'lib/**/*.js']
},
options: {
debug: true,
devel: true
}
},
dist: {
files: {
src: ['index.js', 'lib/**/*.js']
}
}
}
});
// Load the plugins
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Default task(s).
grunt.registerTask('dist', ['clean', 'uglify']);
grunt.registerTask('default', ['jshint', 'dist']);
grunt.registerTask('lint', ['jshint']);
};