Skip to content

Commit

Permalink
add gulpfile to compress production version , fixed #2
Browse files Browse the repository at this point in the history
  • Loading branch information
elrrrrrrr committed Oct 7, 2014
1 parent 8fddd39 commit 7460e62
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions dist/qin.js

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

17 changes: 17 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
var gulp = require('gulp'),
uglify = require('gulp-uglify');

var paths = {
js: ['qin.js']
}

gulp.task('compress', function() {
gulp.src('qin.js')
.pipe(uglify())
.pipe(gulp.dest('dist'))
});

gulp.task('default', function() {
gulp.watch(paths.js, ['compress'])
})

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"devDependencies": {
"chai": "^1.9.2",
"gulp": "*",
"gulp-uglify": "^1.0.1",
"mocha": "^1.21.4",
"mocha-phantomjs": "^3.5.0",
"phantomjs": "^1.9.10"
Expand Down
1 change: 0 additions & 1 deletion qin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
;
(function(document, window) {


var node = Node.prototype,
trigger = 'trigger',
// 兼容firefox, firefox下创建元素需要一个字符串作为参数
Expand Down

0 comments on commit 7460e62

Please sign in to comment.