Commit f2dfb765 authored by James Laver's avatar James Laver

Add production build

parent 11dea9a2
...@@ -23,3 +23,10 @@ bundle.js ...@@ -23,3 +23,10 @@ bundle.js
!/dist/js/ !/dist/js/
# css source maps # css source maps
/dist/styles/*map /dist/styles/*map
# production builds
/prod
/dce-output
/app.js
# docker
/.bash_history
/.lesshst
FROM debian:stable-slim
ENV CWD=/opt/app HOME=/opt/app TERM=xterm
RUN apt-get update && apt-get install -y bash curl inotify-tools git build-essential libtinfo5
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install -y yarn
RUN curl -L https://github.com/coot/zephyr/releases/download/v0.3.2/Linux.tar.gz | tar zx -C /usr/bin --strip-components=1 zephyr/zephyr
WORKDIR /opt/app
CMD ["bash"]
\ No newline at end of file
version: "3.5"
services:
frontend:
build:
context: .
dockerfile: "Dockerfile.dev"
volumes:
- type: bind
source: .
target: /opt/app
stdin_open: true # like docker run -i
tty: true # like docker run -t
<!doctype>
<html>
<head>
<meta charset="utf-8"/>
<title>CNRS GarganText</title>
<!-- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> -->
<!--<link href="https://use.fontawesome.com/releases/v5.0.8/styles/all.css" rel="stylesheet">-->
<link rel="stylesheet" href="dist/icons/forkawesome.css">
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.1.7/css/fork-awesome.min.css" integrity="sha256-gsmEoJAws/Kd3CjuOQzLie5Q3yshhvmo7YNtBG7aaEY=" crossorigin="anonymous">-->
<link href="dist/styles/login.min.css" rel="stylesheet">
<link href="dist/styles/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="dist/styles/context-menu.css"/>
<link rel="stylesheet" type="text/css" href="dist/styles/menu.css"/>
<link rel="stylesheet" type="text/css" href="dist/styles/highlightjs-solarized-light.css"/>
<link href="dist/styles/Graph.css" rel="stylesheet" type="text/css" />
<link href="dist/styles/Login.css" rel="stylesheet" type="text/css" />
<link href="dist/styles/Tree.css" rel="stylesheet" type="text/css" />
<link href="dist/styles/CodeEditor.css" rel="stylesheet" type="text/css" />
<link href="dist/styles/Styles.css" rel="stylesheet" type="text/css" />
<link href="dist/styles/range-slider.css" rel="stylesheet" type="text/css" />
<style>
* {margin: 0; padding: 0; list-style: none;}
</style>
</head>
<body>
<div id="app" class ="container-fluid"></div>
<div id="portal"></div>
<script src="app.js"></script>
<script src="dist/js/bootstrap-native.min.js"></script>
</body>
</html>
...@@ -4,17 +4,22 @@ ...@@ -4,17 +4,22 @@
"scripts": { "scripts": {
"rebase-set": "spago package-set-upgrade && spago psc-package-insdhall", "rebase-set": "spago package-set-upgrade && spago psc-package-insdhall",
"rebuild-set": "spago psc-package-insdhall", "rebuild-set": "spago psc-package-insdhall",
"install-ps": "psc-package install", "install-ps": "psc-package.exe install",
"compile": "pulp --psc-package build", "compile": "pulp build",
"build": "pulp --psc-package browserify --no-check-main -t dist/bundle.js", "build": "pulp browserify -t dist/bundle.js",
"sass": "sass dist/styles/", "sass": "sass dist/styles/",
"docs": "pulp docs -- --format html", "docs": "pulp docs -- --format html",
"repl": "pulp --psc-package repl", "repl": "pulp repl",
"clean": "rm -Rf output node_modules", "clean": "rm -Rf output node_modules",
"clean-js": "rm -Rf node_modules", "clean-js": "rm -Rf node_modules",
"clean-ps": "rm -Rf output", "clean-ps": "rm -Rf output",
"test": "pulp test --no-check-main", "test": "pulp test",
"server": "serve dist" "server": "serve dist",
"prod": "yarn prod:compile && yarn prod:dce && yarn prod:bundle && yarn prod:pack",
"prod:compile": "pulp build -- -g corefn",
"prod:dce": "zephyr -f Main.main",
"prod:bundle": "pulp browserify --skip-compile -o dce-output -t app.js",
"prod:pack": "parcel build index.html -d prod --public-url . --no-source-maps"
}, },
"dependencies": { "dependencies": {
"aes-js": "^3.1.1", "aes-js": "^3.1.1",
...@@ -32,8 +37,11 @@ ...@@ -32,8 +37,11 @@
"sigma": "git://github.com/poorscript/sigma.js#garg" "sigma": "git://github.com/poorscript/sigma.js#garg"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.9",
"@babel/preset-react": "^7.12.7",
"parcel": "^1.12.4",
"psc-package": "^4.0.1", "psc-package": "^4.0.1",
"pulp": "^14.0.0", "pulp": "^15.0.0",
"purescript": "^0.13.8", "purescript": "^0.13.8",
"purescript-language-server": "^0.12.9", "purescript-language-server": "^0.12.9",
"react-testing-library": "^6.1.2", "react-testing-library": "^6.1.2",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment