forked from jsio-private/tty.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
57 lines (51 loc) · 1.32 KB
/
gulpfile.js
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');
var cleanCSS = require('gulp-clean-css');
var stylus = require('gulp-stylus');
var nib = require('nib');
var scripts = [
'node_modules/socket.io-client/dist/socket.io.js',
'node_modules/jquery/dist/jquery.js',
'node_modules/golden-layout/dist/goldenlayout.js',
'assets/js/modal.js',
'node_modules/term.js/src/term.js',
'assets/js/term.js',
'assets/js/options.js',
'assets/js/helpers.js',
'assets/js/tty.js',
'assets/js/terminal.js',
'assets/js/layout.js',
'assets/js/shortcuts.js'
];
var styles = [
'assets/styl/app.styl'
];
gulp.task('scripts', function() {
return gulp.src(scripts)
.pipe(sourcemaps.init())
.pipe(concat('app.js'))
.pipe(uglify())
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./static/build/'));
});
gulp.task('styles', function () {
return gulp.src(styles)
.pipe(sourcemaps.init())
.pipe(stylus({
'include css': true,
'use': nib()
}))
.pipe(cleanCSS())
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./static/build/'));
});
gulp.task('watch', function () {
gulp.watch(scripts, ['scripts']);
gulp.watch('assets/styl/**', ['styles']);
});
gulp.task('default', [
'scripts',
'styles'
]);