-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
48 lines (41 loc) · 1.12 KB
/
gulpfile.js
File metadata and controls
48 lines (41 loc) · 1.12 KB
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
'use strict'
var gulp = require('gulp'),
connect = require('gulp-connect'),
browserify = require('browserify'),
source = require('vinyl-source-stream'),
stylus = require('gulp-stylus'),
livereload = require('gulp-livereload');
gulp.task('styles', function(){
return gulp.src('src/styles/style.styl')
.pipe(stylus({
compress: true,
include: [
'./node_modules/../'
],
"include css": true
}))
.pipe(gulp.dest('dest/styles'))
.pipe(livereload());
});
gulp.task('js', function(){
return browserify('./src/scripts/main.js')
.bundle()
.pipe(source('main.js'))
.pipe(gulp.dest('dest/scripts'));
});
gulp.task('watch', function(){
livereload.listen();
gulp.watch('src/styles/**/*.styl', ['styles']);
gulp.watch('src/scripts/**/*.js', ['js']);
});
gulp.task('connect', function(){
console.log('check port :4200 bro');
connect.server({
root: './',
port: 4200
});
});
// Todo: get this task to be 'server', do all the ugly versions of shit
gulp.task('dev', ['watch', 'styles', 'js', 'connect'])
// write a task to compile shit for public
gulp.task('build', ['styles', 'js'])