-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
executable file
·35 lines (26 loc) · 1.32 KB
/
build
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
# BUILD webapp
# directory structure
# public
# assets [images, css etc]
# shared-lib [non-ui code shared by components]
# ui [angular ui components]
# component1 [component, controllers, services, tests related to component]
# routes [routes for app]
# index.html [main index.html which probably includes a <top-nav> and <div ui-view>]
# index.js [wire everything together!]
# index.scss [main index.scss file. respective scss files are part of component folders]
PUBLIC_DIR='public-release' # output directory
NODE_SAAS='node_modules/node-sass/bin/node-sass' #node-sass executable
rm -rf $PUBLIC_DIR
mkdir $PUBLIC_DIR
mkdir $PUBLIC_DIR/css
# What is --no-mangle? -t [uglifyify --no-mangle]
# how do we know source maps is in place? look at comment at the end of apps-bundle #sourceMappingURL=app-bundle.js.map
node_modules/browserify-incremental/bin/cmd.js \
--cachefile app-bundle.cache public/index.js -t partialify -t aliasify -t require-globify -t [uglifyify --no-mangle] --debug \
| node_modules/exorcist/bin/exorcist.js $PUBLIC_DIR/app-bundle.js.map \
> $PUBLIC_DIR/app-bundle.js
$NODE_SAAS node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss $PUBLIC_DIR/css/bootstrap.css
$NODE_SAAS public/index.scss $PUBLIC_DIR/css/main.css
cp ./public/index.html $PUBLIC_DIR/
cp -R ./public/assets $PUBLIC_DIR/