1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-08 23:25:51 +01:00
verdaccio/node_modules/onclick/Gruntfile.js
2014-09-14 18:28:17 +04:00

62 lines
1.6 KiB
JavaScript

module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
dist: {
files: {
'dist/onClick.js': ['src/onClick.js'],
'examples/build.js': ['examples/example.js']
},
options: {
standalone: 'onClick'
}
},
test: {
files: {
'test/build.js': ['test/test.js']
}
}
},
uglify: {
dist: {
files: {
'dist/onClick.min.js': ['dist/onClick.js']
},
options: {
sourceMap: true
}
}
},
watch: {
files: [ "src/*.js", "examples/example.js", "test/test.js"],
tasks: [ 'browserify:dist' ]
},
qunit: {
files: ['test/index.html']
},
jshint: {
dist: {
src: ['src/**/*.js']
}
}
});
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('test', [
'browserify:test',
'qunit',
'jshint'
]);
grunt.registerTask('build', [
'test',
'browserify:dist',
'uglify'
]);
};