forked from danmarsden/moodle-mod_attendance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
32 lines (30 loc) · 1010 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
module.exports = function(grunt) {
// Initialize Grunt configuration
grunt.initConfig({
uglify: {
build: {
files: [{
expand: true,
cwd: 'amd/src', // Source directory for AMD JS files
src: '**/*.js', // Include all .js files
dest: 'amd/build', // Destination directory
ext: '.min.js' // Minified file extension
}]
}
},
watch: {
scripts: {
files: ['amd/src/**/*.js'], // Watch for changes in the 'src' directory
tasks: ['uglify'], // Run 'uglify' task on change
options: {
spawn: false
}
}
}
});
// Load Grunt plugins
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
// Register default task
grunt.registerTask('default', ['uglify']);
};