-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
31 lines (28 loc) · 920 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
module.exports = function(grunt) {
// Project configuration
grunt.initConfig({
// Uglify task for minifying JavaScript files and generating map files
uglify: {
options: {
sourceMap: true, // Generates a source map
mangle: false // Optionally, you can disable variable name mangling
},
build: {
files: [{
expand: true,
cwd: 'amd/src/', // Source folder
src: ['*.js', '!*.min.js'], // Include all .js files except already minified
dest: 'amd/build/', // Destination folder
ext: '.min.js', // Add .min.js extension
extDot: 'last' // Only replace the last dot in file name
}]
}
}
});
// Load the plugins
grunt.loadNpmTasks('grunt-contrib-uglify');
// Define the amd task
grunt.registerTask('amd', ['uglify']);
// Default task(s)
grunt.registerTask('default', ['uglify']);
};