2016-09-22 05:57:22 +00:00
|
|
|
BUILD_DIR = build
|
2016-09-28 21:37:24 +00:00
|
|
|
CLEANCSS = ./node_modules/.bin/cleancss
|
|
|
|
DEPLOY_DIR = libs
|
|
|
|
LIBJITSIMEET_DIR = node_modules/lib-jitsi-meet/
|
2016-09-22 05:57:22 +00:00
|
|
|
NODE_SASS = ./node_modules/.bin/node-sass
|
|
|
|
NPM = npm
|
|
|
|
OUTPUT_DIR = .
|
|
|
|
STYLES_BUNDLE = css/all.bundle.css
|
|
|
|
STYLES_DESTINATION = css/all.css
|
|
|
|
STYLES_MAIN = css/main.scss
|
|
|
|
STYLES_UNSUPPORTED_BROWSER = css/unsupported_browser.scss
|
|
|
|
WEBPACK = ./node_modules/.bin/webpack
|
2015-01-22 15:36:12 +00:00
|
|
|
|
2016-09-22 05:57:22 +00:00
|
|
|
all: update-deps compile deploy clean
|
2015-11-30 11:54:54 +00:00
|
|
|
|
2016-09-12 17:02:43 +00:00
|
|
|
# FIXME: there is a problem with node-sass not correctly installed (compiled)
|
|
|
|
# a quick fix to make sure it is installed on every update
|
|
|
|
# the problem appears on linux and not on macosx
|
2015-11-30 11:54:54 +00:00
|
|
|
update-deps:
|
2016-09-12 17:02:43 +00:00
|
|
|
$(NPM) update && $(NPM) install node-sass
|
2014-12-17 16:21:25 +00:00
|
|
|
|
2015-09-17 21:40:02 +00:00
|
|
|
compile:
|
2016-09-22 05:57:22 +00:00
|
|
|
$(WEBPACK) -p
|
2016-06-17 20:35:40 +00:00
|
|
|
|
2014-12-17 16:21:25 +00:00
|
|
|
clean:
|
2016-09-22 05:57:22 +00:00
|
|
|
rm -fr $(BUILD_DIR)
|
2014-12-17 16:21:25 +00:00
|
|
|
|
2016-01-28 23:43:48 +00:00
|
|
|
deploy: deploy-init deploy-appbundle deploy-lib-jitsi-meet deploy-css deploy-local
|
|
|
|
|
|
|
|
deploy-init:
|
|
|
|
mkdir -p $(DEPLOY_DIR)
|
|
|
|
|
|
|
|
deploy-appbundle:
|
2016-09-22 05:57:22 +00:00
|
|
|
cp \
|
|
|
|
$(BUILD_DIR)/app.bundle.min.js \
|
|
|
|
$(BUILD_DIR)/app.bundle.min.map \
|
|
|
|
$(BUILD_DIR)/external_api.min.js \
|
|
|
|
$(BUILD_DIR)/external_api.min.map \
|
|
|
|
$(OUTPUT_DIR)/analytics.js \
|
|
|
|
$(DEPLOY_DIR)
|
2016-01-28 23:43:48 +00:00
|
|
|
|
|
|
|
deploy-lib-jitsi-meet:
|
2016-09-22 05:57:22 +00:00
|
|
|
cp \
|
|
|
|
$(LIBJITSIMEET_DIR)/lib-jitsi-meet.min.js \
|
|
|
|
$(LIBJITSIMEET_DIR)/lib-jitsi-meet.min.map \
|
|
|
|
$(LIBJITSIMEET_DIR)/connection_optimization/external_connect.js \
|
|
|
|
$(DEPLOY_DIR)
|
2016-09-08 06:35:35 +00:00
|
|
|
|
2016-01-28 23:43:48 +00:00
|
|
|
deploy-css:
|
2016-09-08 06:35:35 +00:00
|
|
|
$(NODE_SASS) css/unsupported_browser.scss css/unsupported_browser.css ; \
|
2016-09-02 09:53:22 +00:00
|
|
|
$(NODE_SASS) $(STYLES_MAIN) $(STYLES_BUNDLE) && \
|
|
|
|
$(CLEANCSS) $(STYLES_BUNDLE) > $(STYLES_DESTINATION) ; \
|
|
|
|
rm $(STYLES_BUNDLE)
|
2016-01-28 23:43:48 +00:00
|
|
|
|
|
|
|
deploy-local:
|
2015-08-03 18:16:00 +00:00
|
|
|
([ ! -x deploy-local.sh ] || ./deploy-local.sh)
|
2015-09-11 04:06:29 +00:00
|
|
|
|
|
|
|
source-package:
|
2015-10-06 19:50:06 +00:00
|
|
|
mkdir -p source_package/jitsi-meet/css && \
|
2016-06-01 13:35:18 +00:00
|
|
|
cp -r *.js *.html connection_optimization favicon.ico fonts images libs sounds LICENSE lang source_package/jitsi-meet && \
|
2015-10-06 20:29:26 +00:00
|
|
|
cp css/all.css source_package/jitsi-meet/css && \
|
2016-03-18 14:22:16 +00:00
|
|
|
cp css/unsupported_browser.css source_package/jitsi-meet/css && \
|
2015-09-11 04:06:29 +00:00
|
|
|
(cd source_package ; tar cjf ../jitsi-meet.tar.bz2 jitsi-meet) && \
|
|
|
|
rm -rf source_package
|