forked from appnexus/appnexus-html5-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
50 lines (46 loc) · 1.45 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
'use strict'
module.exports = function (grunt) {
// Project dependency tasks
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-clean');
//grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
//grunt.loadNpmTasks('grunt-contrib-qunit');
//grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
dist: ['dist/*'],
},
browserify: {
client: {
browserifyOptions: {
debug: true,
noParse: true
},
src: ['src/client.js'],
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
client: {
options: {
banner: '/*\n * <%= pkg.description %> for Client\n * Author: <%= pkg.author.name %> (<%= pkg.author.email %>) \n * Website: <%= pkg.author.url %>\n * <%= pkg.license %> Licensed.\n *\n * <%= pkg.name %>.min.js <%= pkg.version %>\n */\n '
},
src: 'dist/<%= pkg.name %>.js',
dest: 'dist/<%= pkg.name %>.min.js'
}
},
watch: {
test: {
files: 'src/**/*.js',
tasks: ['browserify']
}
}
});
//grunt.registerTask('default', ['jshint', 'qunit', 'clean', 'concat', 'uglify']);
grunt.registerTask('default', ['clean', 'browserify', 'watch']);
grunt.registerTask('build', ['clean', 'browserify', 'uglify']);
};