Skip to content

Commit

Permalink
production deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
roper79 committed Sep 13, 2019
1 parent 00ae3f6 commit c2f0a9d
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 13 deletions.
9 changes: 2 additions & 7 deletions bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

D="~/rsync/mdr-simulator2/"

rm -rf dist/*
npm run server:build
rm -rf public/*
npm run client:build

rsync -rvLz -e ssh bin dist node_modules public rob@ccmi.fit.cvut.cz:$D
rsync -rvLz -e ssh bin server node_modules rob@ccmi.fit.cvut.cz:$D
#rsync -rvLz -e ssh data rob@ccmi.fit.cvut.cz:$D
rsync -rvLz --ignore-existing -e ssh data rob@ccmi.fit.cvut.cz:$D
#rsync -rvLz --ignore-existing -e ssh data rob@ccmi.fit.cvut.cz:$D

9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"server:watch": "nodemon --watch shared --watch server/app --ext ts,js,ejs --exec npm run server:build\\;npm run server:run",
"server:build": "cd server; rm -rf dist/*; tsc; cp -r app/views dist/",
"server:run": "cd server/dist; node server",
"client:watch": "rm -rf server/public/*; webpack --watch --progress",
"client:build": "rm -rf server/public/*; webpack --progress",
"client:watch": "rm -rf server/public/*; webpack --watch --progress --config webpack.dev.js",
"client:build": "rm -rf server/public/*; webpack --progress --config webpack.prod.js",
"clean": "npm cache clean --force"
},
"devDependencies": {
Expand All @@ -23,7 +23,8 @@
"@types/proper-lockfile": "^4.1.1",
"copy-webpack-plugin": "^5.0.4",
"ts-loader": "^6.0.4",
"typescript": "^3.6.2"
"typescript": "^3.6.2",
"webpack-merge": "^4.2.2"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion server/app/views/blocks/navbar.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<nav class="navbar navbar-expand-lg fixed-top wmda-color" id="navbar-main" style="padding-right: 10px">
<a class="navbar-brand" href="#">Marrow Donor Registry Simulator 2 v1.3</a>
<a class="navbar-brand" href="#">Marrow Donor Registry Simulator v2.4</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
Expand Down
2 changes: 0 additions & 2 deletions webpack.config.js → webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
const CopyPlugin = require('copy-webpack-plugin');

module.exports = {
mode: "development",
devtool: "inline-source-map",
entry: "./app/main.ts",
output: {
path: __dirname + "/server/public",
Expand Down
9 changes: 9 additions & 0 deletions webpack.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"use strict";

const merge = require('webpack-merge');
const common = require('./webpack.common.js');

module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map'
});
8 changes: 8 additions & 0 deletions webpack.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use strict";

const merge = require('webpack-merge');
const common = require('./webpack.common.js');

module.exports = merge(common, {
mode: 'production',
});

0 comments on commit c2f0a9d

Please sign in to comment.