You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hotkeys/Gruntfile.coffee

35 lines
1.1 KiB
CoffeeScript

module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-dist'
grunt.initConfig(
pkg: grunt.file.readJSON 'package.json'
uglify:
app_task:
options:
beautify: false
mangle: true #不混淆变量名
compress:false #打开或关闭使用默认选项源压缩。
files:
'build/hotkeys.min.js': [
'src/hotkeys.js'
]
jshint:
options:
eqeqeq: true
trailing: true
files: ['src/hotkeys.js']
dist:
default_options:
files:
"dist":['src/hotkeys.js']
watch:
another:
files: ['src/*.js']
tasks: ['jshint','uglify']
options:
livereload: 1244
)
grunt.registerTask 'default', ['watch']