-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
38 lines (34 loc) · 993 Bytes
/
gulpfile.js
File metadata and controls
38 lines (34 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var gulp = require('gulp');
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');
var gulpAtom = require('gulp-atom');
var paths = {
scripts: 'src/js/**/*.coffee'
};
gulp.task('atom', function() {
return gulpAtom({
srcPath: './src',
releasePath: './release',
cachePath: './cache',
version: 'v0.20.7',
rebuild: false,
platforms: ['win32-ia32', 'darwin-x64', 'linux-x64']
});
});
gulp.task('coffee', function() {
// Minify and copy all JavaScript (except vendor scripts)
// with sourcemaps all the way down
return gulp.src(paths.scripts)
.pipe(sourcemaps.init())
.pipe(coffee())
// .pipe(uglify())
// .pipe(concat('all.min.js'))
.pipe(sourcemaps.write())
.pipe(gulp.dest('src/dest/js'));
});
// Rerun the task when a file changes
gulp.task('watch', function() {
gulp.watch(paths.scripts, ['coffee']);
});