-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.coffee
58 lines (47 loc) · 1.5 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#==================================================
# 設定読み込み
#==================================================
config = require './gulp/config.coffee'
#==================================================
# ライブラリ読み込み
#==================================================
gulp = require 'gulp'
slim = require 'gulp-slim'
sass = require 'gulp-sass'
plumber = require 'gulp-plumber'
plantuml = require 'gulp-plantuml'
webserver = require 'gulp-webserver'
browserSync = require 'browser-sync'
#==================================================
# task
#==================================================
gulp.task 'slim', ->
gulp.src config.slim.src
.pipe gulp.dest 'build/'
.pipe browserSync.stream()
gulp.task 'sass', ->
gulp.src config.sass.src
.pipe sass()
.pipe gulp.dest "./build/css"
.pipe browserSync.stream()
gulp.task 'webserver', ->
gulp.src 'build/'
.pipe webserver
livereload: true,
host: '0.0.0.0'
port: '8000'
gulp.task 'plantuml', ->
gulp.src "./diagram/**/*.pu"
.pipe plantuml(
jarPath: "plantuml/plantuml.jar"
)
.pipe gulp.dest "./build/diagram"
.pipe browserSync.stream()
# 監視して自動コンパイル
gulp.task 'watch', ->
gulp.watch config.slim.src, [ "slim" ]
gulp.watch config.sass.src, [ "sass" ]
gulp.watch "./diagram/**/*.pu", [ "plantuml" ]
gulp.src 'gulpfile.coffee'
# デフォルト
gulp.task 'default', ['slim', 'sass', 'plantuml', 'webserver', 'watch']