Skip to content

Commit

Permalink
add grunt build
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 28, 2015
1 parent 7c3e544 commit 20493ac
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
39 changes: 39 additions & 0 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.initConfig(
pkg: grunt.file.readJSON 'package.json'
uglify:
app_task:
options:
beautify: false
mangle: true #不混淆变量名
compress:false #打开或关闭使用默认选项源压缩。
files:
'build/websocket.min.js': [
'lib/websocket.js'
]
# app_task_test:
# options:
# beautify: true
# mangle: false #不混淆变量名
# # compress:false #打开或关闭使用默认选项源压缩。
# compress: false
# files:
# 'test/websocket.min.js': [
# 'lib/websocket.js'
# ]
jshint:
options:
eqeqeq: true
trailing: true
files: ['lib/websocket.js']
watch:
another:
files: ['lib/*.js']
tasks: ['jshint','uglify']
options:
livereload: 1244
)
grunt.registerTask 'default', ['watch']
1 change: 1 addition & 0 deletions build/websocket.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 20493ac

Please sign in to comment.