-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.coffee
39 lines (34 loc) · 1.08 KB
/
gulpfile.coffee
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
gulp = require 'gulp'
run = require 'gulp-run'
stylus = require 'gulp-stylus'
nib = require 'nib'
webpack = require 'gulp-webpack'
editorDir = 'frontend/editor'
environmentDir = 'frontend/environment'
stylesDir = 'frontend/styles'
out = 'frontend/bin'
gulp.task 'editor', ->
gulp.src('')
.pipe run "./.cabal-sandbox/bin/elm-make --yes #{editorDir}/Arrowsmith/Editor.elm #{editorDir}/Arrowsmith/Project.elm --output #{out}/editor.js"
gulp.task 'environment', ->
gulp.src "#{environmentDir}/boot.js"
.pipe webpack
module:
loaders: [
test: /\.coffee$/
loader: 'coffee'
]
output:
filename: 'env.js'
.pipe gulp.dest out
gulp.task 'styles', ->
gulp.src "#{stylesDir}/*.styl"
.pipe stylus
'include css': true
use: nib()
.pipe gulp.dest out
gulp.task 'default', ['editor', 'environment', 'styles'] , ->
gulp.watch "#{editorDir}/**/*.elm", ['editor']
gulp.watch "#{environmentDir}/*.coffee", ['environment']
gulp.watch "#{environmentDir}/*.js", ['environment']
gulp.watch "#{stylesDir}/*.styl", ['styles']