-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathgulpfile.coffee
102 lines (84 loc) · 2.11 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
gulp = require 'gulp'
GulpEste = require 'gulp-este'
runSequence = require 'run-sequence'
este = new GulpEste __dirname, true, '../../../..'
paths =
stylus: [
'src/css/datepicker.styl'
]
coffee: [
'bower_components/este-library/este/**/*.coffee'
'src/**/*.coffee'
]
jsx: [
'src/**/*.jsx'
]
js: [
'bower_components/closure-library/**/*.js'
'bower_components/este-library/este/**/*.js'
'src/**/*.js'
'tmp/**/*.js'
'!**/build/**'
]
compiler: 'bower_components/closure-compiler/compiler.jar'
externs: [
'bower_components/react-externs/externs.js'
]
thirdParty:
development: [
# 'bower_components/react/react.js'
]
production: [
# 'bower_components/react/react.min.js'
]
dirs =
googBaseJs: 'bower_components/closure-library/closure/goog'
watch: ['src']
gulp.task 'stylus', ->
este.stylus paths.stylus
gulp.task 'coffee', ->
este.coffee paths.coffee
gulp.task 'jsx', ->
este.jsx paths.jsx
gulp.task 'transpile', (done) ->
runSequence 'stylus', 'coffee', 'jsx', done
gulp.task 'deps', ->
este.deps paths.js
gulp.task 'concat-deps', ->
este.concatDeps()
gulp.task 'compile-datepicker', ->
este.compile paths.js, 'src/build',
fileName: 'datepicker.min.js'
compilerPath: paths.compiler
compilerFlags:
closure_entry_point: 'misino.ui.datepicker.DatePickerInput'
externs: paths.externs
warning_level: 'VERBOSE'
compilation_level: 'ADVANCED_OPTIMIZATIONS'
gulp.task 'concat-all', ->
este.concatAll
'src/build/react-datepicker-thirdparty.js': paths.thirdParty
gulp.task 'js', (done) ->
runSequence [
'deps' if este.shouldCreateDeps()
'concat-deps'
'compile-datepicker'
'concat-all'
done
].filter((task) -> task)...
gulp.task 'build', (done) ->
runSequence 'transpile', 'js', done
gulp.task 'watch', ->
este.watch dirs.watch,
coffee: 'coffee'
js: 'js'
jsx: 'jsx'
styl: 'stylus'
, (task) -> gulp.start task
gulp.task 'run', (done) ->
runSequence [
'watch'
done
].filter((task) -> task)...
gulp.task 'default', (done) ->
runSequence 'build', 'run', done