clean and minimise assets and upgrade spserver

This commit is contained in:
Jonatan Nilsson 2018-07-22 14:32:03 +00:00
parent e7f3958f89
commit 182b5c485a
19 changed files with 9 additions and 641 deletions

View file

@ -9,9 +9,7 @@ COPY package.json $HOME/
WORKDIR $HOME WORKDIR $HOME
RUN apk add --no-cache make gcc g++ python && \ RUN npm install
npm install && \
apk del make gcc g++ python
COPY app $HOME/app COPY app $HOME/app
COPY public $HOME/public COPY public $HOME/public
@ -30,9 +28,7 @@ COPY config.json package.json $HOME/
WORKDIR $HOME WORKDIR $HOME
RUN apk add --no-cache make gcc g++ python && \ RUN npm install --production
npm install --production && \
apk del make gcc g++ python
COPY --from=build /app/public $HOME/public COPY --from=build /app/public $HOME/public

View file

@ -28,7 +28,7 @@ header {
flex-grow: 2; flex-grow: 2;
text-indent: -9999px; text-indent: -9999px;
padding-top: 96%; padding-top: 96%;
background: url('./assets/logo.png') center no-repeat transparent; background: url('./assets/logo.svg') center no-repeat transparent;
background-size: contain; background-size: contain;
max-width: 400px; max-width: 400px;
} }

View file

@ -5,8 +5,8 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"build": "npm run build:styl && npm run build:js", "build": "npm run build:styl && npm run build:js",
"build:js": "browserify app/main.js -o public/main.js --debug", "build:js": "browserify app/main.js | uglifyjs --comments -o public/main.js",
"build:styl": "stylus -m app/styl/main.styl --out public", "build:styl": "stylus app/styl/main.styl -c --out public",
"dev": "run-p watch:js watch:styl start", "dev": "run-p watch:js watch:styl start",
"dev:run": "npm install && npm run dev", "dev:run": "npm install && npm run dev",
"docker": "docker run -it --rm --name nfpis -p 3000:3000 -v \"$PWD\":/usr/src/app -w /usr/src/app node:slim", "docker": "docker run -it --rm --name nfpis -p 3000:3000 -v \"$PWD\":/usr/src/app -w /usr/src/app node:slim",
@ -32,9 +32,10 @@
"mithril": "^1.1.6", "mithril": "^1.1.6",
"npm-run-all": "^4.1.3", "npm-run-all": "^4.1.3",
"stylus": "^0.54.5", "stylus": "^0.54.5",
"uglify-es": "^3.3.9",
"watchify": "^3.11.0" "watchify": "^3.11.0"
}, },
"dependencies": { "dependencies": {
"spserver": "^0.2.0" "spserver": "^0.3.0"
} }
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 556 KiB

After

Width:  |  Height:  |  Size: 204 KiB