mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
Minify the site JavaScript
This commit is contained in:
28
Gruntfile.js
28
Gruntfile.js
@@ -29,10 +29,35 @@ module.exports = function (grunt) {
|
||||
}
|
||||
},
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
mangle: false
|
||||
},
|
||||
all: {
|
||||
files: {
|
||||
'public/js/site.min.js': [
|
||||
'public/js/vendor/jquery/jquery.min.js',
|
||||
'public/js/vendor/bootstrap/js/alert.js',
|
||||
'public/js/vendor/bootstrap/js/dropdown.js',
|
||||
'public/js/vendor/bootstrap/js/tooltip.js',
|
||||
'public/js/vendor/flot/jquery.flot.js',
|
||||
'public/js/vendor/flot/jquery.flot.categories.js',
|
||||
'public/js/vendor/flot/jquery.flot.selection.js',
|
||||
'public/js/vendor/flot/jquery.flot.resize.js',
|
||||
'public/js/site.js'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
less: {
|
||||
files: ['public/less/**/*.less'],
|
||||
tasks: ['less']
|
||||
},
|
||||
js: {
|
||||
files: ['public/js/**/*.js', '!public/js/site.min.js'],
|
||||
tasks: ['uglify']
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,10 +65,11 @@ module.exports = function (grunt) {
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
||||
grunt.registerTask('lint', ['jshint']);
|
||||
grunt.registerTask('compile', ['less']);
|
||||
grunt.registerTask('compile', ['less', 'uglify']);
|
||||
grunt.registerTask('default', ['compile', 'lint']);
|
||||
grunt.registerTask('ci', ['compile', 'lint']);
|
||||
|
||||
|
Reference in New Issue
Block a user