-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
45 lines (41 loc) · 901 Bytes
/
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
module.exports = function(grunt)
{
var pkg = grunt.file.readJSON('package.json');
grunt.initConfig({
pkg: pkg,
ver: pkg.version,
requirejs: {
compile: {
options: {
// namespace: 'hydro',
baseUrl: 'src/',
keepBuildDir: true,
name: 'libs/almond',
include: ['main'],
out: 'dist/hydro.js',
skipModuleInsertion: true,
preserveLicenseComments: false,
optimize: 'none',
wrap: {
startFile: 'src/start.frag',
endFile: 'src/end.frag'
}
}
}
},
uglify: {
options: {
sourceMap: true,
banner: '/*! HydroJS <%= pkg.version %> | MIT License | hydroweb.io */'
},
my_target: {
files: {
'dist/hydro.min.js' : 'dist/hydro.js'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['requirejs', 'uglify']);
};