ui: remove browserify
This commit is contained in:
parent
6c1a28f604
commit
68a187a06b
29
Makefile
29
Makefile
@ -6,11 +6,6 @@ SCRIPT_DEST := $(SCRIPT_SRC:src/%=$(DIST_DIR)/%)
|
||||
|
||||
default: build
|
||||
|
||||
clean:
|
||||
git clean -fXd -e !src/config.json
|
||||
|
||||
install: node_modules copy_lib copy_samples
|
||||
|
||||
build: $(DIST_DIR)/index.html $(DIST_DIR)/styles/index.css $(SCRIPT_DEST)
|
||||
|
||||
watch:
|
||||
@ -21,23 +16,6 @@ watch:
|
||||
sleep 0.5; \
|
||||
done
|
||||
|
||||
serve:
|
||||
node server
|
||||
|
||||
# npm
|
||||
node_modules:
|
||||
npm install
|
||||
|
||||
# vendor lib
|
||||
copy_lib:
|
||||
@node copy_lib.js
|
||||
|
||||
# samples
|
||||
copy_samples: src/config.json
|
||||
|
||||
src/config.json:
|
||||
@cp -n src/config.sample.json src/config.json
|
||||
|
||||
# pug
|
||||
$(DIST_DIR)/index.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug)
|
||||
@echo pug: $< ➜ $@
|
||||
@ -76,11 +54,6 @@ buildstaging: build
|
||||
buildprod: build
|
||||
$(MAKE) $(DIST_DIR)/index.prod.html
|
||||
|
||||
deploy: pull install build
|
||||
|
||||
pull:
|
||||
git pull
|
||||
|
||||
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
|
||||
@ -91,4 +64,4 @@ syncprod: buildprod
|
||||
rsync --no-R --no-implied-dirs www/index.prod.html alpha@ssh-alpha.happy-dev.fr:~/www/index.html
|
||||
rsync -v www/.htaccess alpha@ssh-alpha.happy-dev.fr:~/www/
|
||||
|
||||
.PHONY: default install copy_lib copy_samples build watch serve clean sync syncprod buildstaging buildprod pull deploy
|
||||
.PHONY: default build watch sync syncprod buildstaging buildprod
|
12
copy_lib.js
12
copy_lib.js
@ -1,16 +1,16 @@
|
||||
const { basename, join, resolve } = require('path');
|
||||
const { readFileSync, lstatSync } = require('fs');
|
||||
const fs = require('fs');
|
||||
const { exec } = require('child_process');
|
||||
|
||||
const distDir = 'www/lib';
|
||||
|
||||
const filelist = readFileSync('lib_list.txt', 'utf-8').split(/\r?\n/);
|
||||
const filelist = fs.readFileSync('lib_list.txt', 'utf-8').split(/\r?\n/);
|
||||
|
||||
exec(`mkdir -p ${distDir}`, () => {
|
||||
filelist.forEach(path => {
|
||||
path = resolve(path);
|
||||
const filename = basename(path);
|
||||
const dest = lstatSync(path).isDirectory()
|
||||
const dest = fs.lstatSync(path).isDirectory()
|
||||
? distDir
|
||||
: join(distDir, filename);
|
||||
const cmd = `rsync -ru ${path} ${dest}`;
|
||||
@ -18,3 +18,9 @@ exec(`mkdir -p ${distDir}`, () => {
|
||||
exec(cmd);
|
||||
});
|
||||
});
|
||||
|
||||
if (!fs.existsSync('src/config.json')) {
|
||||
const cmd = `rsync -ru src/config.sample.json src/config.json`;
|
||||
console.log(cmd);
|
||||
exec(cmd);
|
||||
}
|
@ -1,5 +1 @@
|
||||
node_modules/normalize.css/normalize.css
|
||||
node_modules/@webcomponents/webcomponentsjs
|
||||
node_modules/@webcomponents/html-imports/src/html-imports.js
|
||||
node_modules/oidc-client/dist/oidc-client.min.js
|
||||
node_modules/oidc-client/dist/oidc-client.js
|
2239
package-lock.json
generated
2239
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
23
package.json
23
package.json
@ -1,21 +1,20 @@
|
||||
{
|
||||
"name": "hd-app",
|
||||
"name": "sib-app",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"serve": "node server.js",
|
||||
"postinstall": "node copy_lib.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.1.0",
|
||||
"@babel/cli": "^7.1.0",
|
||||
"node-sass": "^4.9.3",
|
||||
"@babel/core": "^7.4.4",
|
||||
"@babel/cli": "^7.4.4",
|
||||
"node-sass": "^4.12.0",
|
||||
"pug-cli": "^1.0.0-alpha6",
|
||||
"browser-sync": "^2.24.7",
|
||||
"express": "^4.16.3"
|
||||
"express": "^4.16.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@webcomponents/html-imports": "^1.2.0",
|
||||
"@webcomponents/webcomponentsjs": "^1.2.7",
|
||||
"include-media": "^1.4.9",
|
||||
"normalize.css": "^8.0.0",
|
||||
"oidc-client": "^1.5.3-beta.1",
|
||||
"simple-line-icons": "^2.4.1"
|
||||
"normalize.css": "^8.0.1"
|
||||
}
|
||||
}
|
||||
|
25
server.js
25
server.js
@ -1,5 +1,4 @@
|
||||
const port = 9000;
|
||||
const browserSyncPort = 3000;
|
||||
const port = 3000;
|
||||
const distPath = 'www';
|
||||
|
||||
// express server
|
||||
@ -8,25 +7,5 @@ const express = require('express');
|
||||
const app = express();
|
||||
app
|
||||
.use(express.static(distPath))
|
||||
// .use('/src', express.static(join(__dirname, 'src')))
|
||||
.get(/^[^.]*$/, (req, rep) =>
|
||||
rep.sendFile(join(__dirname, distPath, '/index.html')),
|
||||
)
|
||||
.get(/^[^.]*$/, (req, rep) => rep.sendFile(join(__dirname, distPath, '/index.html')))
|
||||
.listen(port);
|
||||
|
||||
// browser sync
|
||||
const bs = require('browser-sync').create();
|
||||
bs.init({
|
||||
files: [distPath + '/**/*'],
|
||||
proxy: `http://localhost:${port}`,
|
||||
open: false,
|
||||
notify: false,
|
||||
port: browserSyncPort,
|
||||
files: [
|
||||
'www/styles/index.css',
|
||||
'www/scripts/index.js',
|
||||
'www/index.html',
|
||||
'www/images/**',
|
||||
'www/fonts/**'
|
||||
]
|
||||
});
|
||||
|
@ -16,10 +16,10 @@ link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Open+Sans:3
|
||||
//- script(type="module" src="/lib/sib-directory/sib-directory.js")
|
||||
|
||||
//- CDN
|
||||
script(type="module" src="https://unpkg.com/@startinblox/core@0.7.15")
|
||||
script(type="module" src="https://unpkg.com/@startinblox/core@0.7")
|
||||
script(type="module" src="https://unpkg.com/@startinblox/router@0.7.2")
|
||||
script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.1.7")
|
||||
script(type="module" src="https://unpkg.com/@startinblox/component-notifications@0.1.12")
|
||||
script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.2.1")
|
||||
script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.1.10")
|
||||
script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.1.11")
|
||||
|
||||
|
@ -31,6 +31,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
member-info-groups {
|
||||
@extend %user-role;
|
||||
}
|
||||
|
||||
.how-link {
|
||||
@extend .howto;
|
||||
background-color: $color-0-0-100;
|
||||
|
Loading…
Reference in New Issue
Block a user