-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkouch.sh
More file actions
executable file
·64 lines (51 loc) · 1.54 KB
/
kouch.sh
File metadata and controls
executable file
·64 lines (51 loc) · 1.54 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
set -eu
WEBFONT_URL='https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700'
PATH=$(pwd)/node_modules/.bin/:$PATH
function clean() {
echo 'clean dist/'
rm -rf dist/
mkdir -p dist/vendor/ dist/js
}
function install() {
echo 'installing npm dependencies'
npm install --production
echo 'installing bower dependencies'
bower install
echo 'downloading Ubuntu Mono webfont'
webfont-dl $WEBFONT_URL \
--font-out=src/font \
--out src/css/font.styl \
--css-rel=/font
}
function build() {
cp -r src/* dist/
cp -r bower_components/* dist/vendor/
echo 'babelify invader'
babel dist/invader \
--out-dir dist/invader \
--experimental \
--source-maps
echo 'browserify and babelify main app'
browserify dist/js \
--outfile dist/js/index.js \
-t babelify
echo 'stylus compile invader css styles'
find dist/ -name "*.styl" -type f -exec stylus {} \
--import node_modules/nib/ \
--sourcemap-inline \;
echo 'jade compiling html files in dist/'
jade dist \
--pretty
echo 'polymer-vulcanize all components into dist/vulcanized.html'
vulcanize -o dist/vulcanized.html dist/index.html \
--abspath ./dist/ \
--inline \
--strip
}
function serve() {
echo 'starting server...'
./node_modules/.bin/servomatic --dir dist --logDir 'dist/log' --port 1337
}
# run the function given as the first argument
$1;