Skip to content

Commit 1fe8863

Browse files
author
@soyjavi
committed
Standalone version
1 parent 94fa610 commit 1fe8863

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

gulpfile.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ var concat = require('gulp-concat');
77
var header = require('gulp-header');
88
var jasmine = require('gulp-jasmine');
99
var uglify = require('gulp-uglify');
10+
var gutil = require('gulp-util');
1011
var pkg = require('./package.json');
1112

1213

@@ -41,7 +42,7 @@ var banner = ['/**',
4142
// -- TASKS --------------------------------------------------------------------
4243
gulp.task('modules', function() {
4344
gulp.src(path.modules)
44-
.pipe(coffee())
45+
.pipe(coffee().on('error', gutil.log))
4546
.pipe(gulp.dest(path.temp))
4647
.pipe(uglify({mangle: true}))
4748
.pipe(header(banner, {pkg: pkg}))
@@ -51,7 +52,17 @@ gulp.task('modules', function() {
5152
gulp.task('gestures', function() {
5253
gulp.src(path.gestures)
5354
.pipe(concat('quo.gestures.coffee'))
54-
.pipe(coffee())
55+
.pipe(coffee().on('error', gutil.log))
56+
.pipe(gulp.dest(path.temp))
57+
.pipe(uglify({mangle: true}))
58+
.pipe(header(banner, {pkg: pkg}))
59+
.pipe(gulp.dest(path.bower))
60+
});
61+
62+
gulp.task('standalone', function() {
63+
gulp.src(path.modules.concat(path.gestures))
64+
.pipe(concat('quo.standalone.coffee'))
65+
.pipe(coffee().on('error', gutil.log))
5566
.pipe(gulp.dest(path.temp))
5667
.pipe(uglify({mangle: true}))
5768
.pipe(header(banner, {pkg: pkg}))
@@ -61,7 +72,7 @@ gulp.task('gestures', function() {
6172
gulp.task('spec', function() {
6273
gulp.src(path.spec)
6374
.pipe(concat('spec.coffee'))
64-
.pipe(coffee())
75+
.pipe(coffee().on('error', gutil.log))
6576
.pipe(gulp.dest(path.temp))
6677

6778
var spec = [
@@ -73,11 +84,11 @@ gulp.task('spec', function() {
7384
});
7485

7586
gulp.task('init', function() {
76-
gulp.run(['modules', 'gestures', 'spec']);
87+
gulp.run(['modules', 'gestures', 'standalone', 'spec']);
7788
});
7889

7990
gulp.task('default', function() {
80-
gulp.watch(path.modules, ['source', 'spec']);
81-
gulp.watch(path.gestures, ['gestures', 'spec']);
91+
gulp.watch(path.modules, ['modules', 'standalone', 'spec']);
92+
gulp.watch(path.gestures, ['gestures', 'standalone', 'spec']);
8293
gulp.watch(path.spec, ['spec']);
8394
});

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"gulp-connect": "*",
1818
"gulp-header" : "*",
1919
"gulp-jasmine": "*",
20-
"gulp-uglify" : "*"
20+
"gulp-uglify" : "*",
21+
"gulp-util" : "*"
2122
}
2223
}

0 commit comments

Comments
 (0)