From 42c41bbba3646727ef6c270012bd2ccafdf7d861 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Tue, 21 May 2019 19:53:44 +0200 Subject: [PATCH] ui: Makefile for test-paris & test-nantes --- Makefile | 59 +++++--- index.prod.html | 299 +++++++++++++++++++++++++++++++++++++++++ src/config.sample.json | 29 ++-- src/menu-left.pug | 30 ++--- www/index.nantes.html | 299 +++++++++++++++++++++++++++++++++++++++++ www/index.paris.html | 299 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 969 insertions(+), 46 deletions(-) create mode 100644 index.prod.html create mode 100644 www/index.nantes.html create mode 100644 www/index.paris.html diff --git a/Makefile b/Makefile index d87ebf7..934f77e 100644 --- a/Makefile +++ b/Makefile @@ -23,19 +23,26 @@ $(DIST_DIR)/index.html: src/index.pug src/config.json $(wildcard src/*.pug src/* @export ENV="dev"; \ node_modules/.bin/pug --pretty $< --out $(dir $@) -O src/config.json || touch $@ -# pug (prod) -$(DIST_DIR)/index.prod.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug) +# pug (alpha) +$(DIST_DIR)/index.alpha.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug) @echo pug: $< ➜ $@ - @export ENV="prod"; \ - node_modules/.bin/pug --pretty $< --out $(dir $@) -E prod.html -O src/config.json || touch $@ + @export ENV="alpha"; \ + node_modules/.bin/pug --pretty $< --out $(dir $@) -E alpha.html -O src/config.json || touch $@ -# pug (staging) -$(DIST_DIR)/index.staging.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug) +# pug (paris) +$(DIST_DIR)/index.paris.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug) @echo pug: $< ➜ $@ - @export ENV="staging"; \ - node_modules/.bin/pug --pretty $< --out $(dir $@) -E staging.html -O src/config.json || touch $@ + @export ENV="paris"; \ + node_modules/.bin/pug --pretty $< --out $(dir $@) -E paris.html -O src/config.json || touch $@ + +# pug (nantes) +$(DIST_DIR)/index.nantes.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug) + @echo pug: $< ➜ $@ + + @export ENV="nantes"; \ + node_modules/.bin/pug --pretty $< --out $(dir $@) -E nantes.html -O src/config.json || touch $@ # sass $(DIST_DIR)/styles/index.css: src/styles/_index.scss $(wildcard src/*.scss src/*/*.scss src/*/*/*.scss src/*/*/*/*.scss) @@ -48,20 +55,32 @@ $(DIST_DIR)/%.js: src/%.js .babelrc @mkdir -p $(dir $@) @node_modules/.bin/babel $< --out-file $@ --source-maps || touch $@ -buildstaging: build - $(MAKE) $(DIST_DIR)/index.staging.html +buildparis: build + $(MAKE) $(DIST_DIR)/index.paris.html -buildprod: build - $(MAKE) $(DIST_DIR)/index.prod.html +syncparis: buildparis + rsync -rv --exclude '*.html' www/* test-paris@ssh-test-paris.happy-dev.fr:~/www/ + rsync --no-R --no-implied-dirs www/index.paris.html test-paris@ssh-test-paris.happy-dev.fr:~/www/index.html + rsync -v www/.htaccess test-paris@ssh-test-paris.happy-dev.fr:~/www/ -sync: buildstaging - rsync -rv www/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ --exclude=www/index.html --exclude=www/index.prod.html --exclude=www/index.staging.html - rsync --no-R --no-implied-dirs www/index.staging.html staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/index.html - rsync -v www/.htaccess staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ +buildnantes: build + $(MAKE) $(DIST_DIR)/index.nantes.html -syncprod: buildprod - rsync -rv www/* alpha@ssh-alpha.happy-dev.fr:~/www/ --exclude=www/index.html --exclude=www/index.prod.html --exclude=www/index.staging.html - rsync --no-R --no-implied-dirs www/index.prod.html alpha@ssh-alpha.happy-dev.fr:~/www/index.html +syncnantes: buildnantes + rsync -rv --exclude '*.html' www/* test-nantes@ssh-test-nantes.happy-dev.fr:~/www/ + rsync --no-R --no-implied-dirs www/index.nantes.html test-nantes@ssh-test-nantes.happy-dev.fr:~/www/index.html + rsync -v www/.htaccess test-nantes@ssh-test-nantes.happy-dev.fr:~/www/ + +buildalpha: build + $(MAKE) $(DIST_DIR)/index.alpha.html + +syncalpha: buildalpha + rsync -rv --exclude '*.html' www/* alpha@ssh-alpha.happy-dev.fr:~/www/ + rsync --no-R --no-implied-dirs www/index.alpha.html alpha@ssh-alpha.happy-dev.fr:~/www/index.html rsync -v www/.htaccess alpha@ssh-alpha.happy-dev.fr:~/www/ -.PHONY: default build watch sync syncprod buildstaging buildprod \ No newline at end of file +sync: syncnantes syncparis + +syncprod: syncalpha + +.PHONY: default build watch sync syncprod \ No newline at end of file diff --git a/index.prod.html b/index.prod.html new file mode 100644 index 0000000..b1012ee --- /dev/null +++ b/index.prod.html @@ -0,0 +1,299 @@ + + + + + HD App + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+
+ + \ No newline at end of file diff --git a/src/config.sample.json b/src/config.sample.json index 743f6eb..b1b6429 100644 --- a/src/config.sample.json +++ b/src/config.sample.json @@ -3,20 +3,27 @@ "sdn": "http://127.0.0.1:8000", "cdn": "https://cdn.happy-dev.fr", "xmpp": "https://jabber.happy-dev.fr/http-bind/", - "client_id": "833925" + "client_id": "000000" }, - "staging": { - "sdn": "http://test-paris.happy-dev.fr", - "cdn": "https://cdn.happy-dev.fr", - "xmpp": "https://jabber.happy-dev.fr/http-bind/", - "client_id": "833925" - }, - - "prod": { + "alpha": { "sdn": "https://api.alpha.happy-dev.fr", "cdn": "https://cdn.happy-dev.fr", "xmpp": "https://jabber.happy-dev.fr/http-bind/", - "client_id": "833925" + "client_id": "218707" + }, + + "paris": { + "sdn": "https://api.test-paris.happy-dev.fr", + "cdn": "https://cdn.happy-dev.fr", + "xmpp": "https://jabber.happy-dev.fr/http-bind/", + "client_id": "196656" + }, + + "nantes": { + "sdn": "https://api.test-nantes.happy-dev.fr", + "cdn": "https://cdn.happy-dev.fr", + "xmpp": "https://jabber.happy-dev.fr/http-bind/", + "client_id": "621272" } -} +} \ No newline at end of file diff --git a/src/menu-left.pug b/src/menu-left.pug index beb5cfc..8535260 100644 --- a/src/menu-left.pug +++ b/src/menu-left.pug @@ -24,21 +24,21 @@ nav#main__menu value-dash=' - ', next='project' ) - div.divider - div.menu-wrapper - div.menu - div.menu-chevron - div.menu-icon.icon-arrow-up - div.menu-label Cercles - div.menu-icon.icon-globe - sib-route(hidden, name='circle', id-prefix=`${sdn}/circles/`, rdf-type='hd:circle') - div.sub-menu - sib-display( - data-src=`${sdn}/circles/`, - data-fields='name', - widget-name='sib-display-div', - next='circle' - ) + //- div.divider + //- div.menu-wrapper + //- div.menu + //- div.menu-chevron + //- div.menu-icon.icon-arrow-up + //- div.menu-label Cercles + //- div.menu-icon.icon-globe + //- sib-route(hidden, name='circle', id-prefix=`${sdn}/circles/`, rdf-type='hd:circle') + //- div.sub-menu + //- sib-display( + //- data-src=`${sdn}/circles/`, + //- data-fields='name', + //- widget-name='sib-display-div', + //- next='circle' + //- ) div.divider div.menu-wrapper div.menu diff --git a/www/index.nantes.html b/www/index.nantes.html new file mode 100644 index 0000000..b1012ee --- /dev/null +++ b/www/index.nantes.html @@ -0,0 +1,299 @@ + + + + + HD App + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+
+ + \ No newline at end of file diff --git a/www/index.paris.html b/www/index.paris.html new file mode 100644 index 0000000..3853676 --- /dev/null +++ b/www/index.paris.html @@ -0,0 +1,299 @@ + + + + + HD App + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+
+ + \ No newline at end of file