-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.coffee
More file actions
33 lines (29 loc) · 936 Bytes
/
gulpfile.coffee
File metadata and controls
33 lines (29 loc) · 936 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
gulp = require 'gulp'
browserify = require 'gulp-browserify'
rename = require 'gulp-rename'
uglify = require 'gulp-uglify'
watchify = require 'watchify'
source = require 'vinyl-source-stream'
watch = require 'gulp-watch'
plumber = require 'gulp-plumber'
entryFile = './src/maximum_length_rectangle.coffee'
gulp.task 'js', ->
gulp.src(entryFile, { read: false })
.pipe(plumber())
.pipe(browserify({
cache: {},
packageCache: {},
#fullPaths: true,
transform: ['coffeeify']
#transform: ['coffee-reactify'],
extensions: ['.coffee', '.cjsx'],
}))
#.pipe(uglify())
.pipe(rename('maximum_length_rectangle.js'))
.pipe(gulp.dest('./lib/'))
gulp.task 'watch', ->
gulp.watch './src/**/*.coffee', read:false, (event) ->
#ext = path.extname event.path
console.log event.path+" has changed"
gulp.start 'js'
console.log "converted stuff"