Source code of TheSpace official app.
- Elm v0.19 https://guide.elm-lang.org/install/
- Node/NPM (recent version) https://docs.npmjs.com/cli/v8/configuring-npm/install
npm install --only-dev
make dev-server
or, in debug mode
make debug-server
- tmp build elmapp to
src/Native/elmapp.js(in .gitignore) - default host using
0.0.0.0:8000for mobile testing convenience - for production server,
127.0.0.1is whitelisted
cp src/Env/(Production|Staging|Development).env src/Env.elm
make backup-env
This will back up src/Env.elm to src/Env.bak.
make restore-env
This will restore src/Env.bak to src/Env.elm, and use src/Env/Development.env if src/Env.bak not exists.
make prod
make stag
These commands will:
- backup current env
- switch to production/staging env
- compile current Elm code with
--optimizeflag tosrc/Native/elmappesm.js(ES6 Module). - bundle
elmappesm.jswith js files tocurrent/(prod|stag)/app.js - uglify and minify
current/(prod|stag)/app.jstocurrent/(prod|stag)/app.min.js - generate
current/(prod|stag)/index.htmlusing MD5 checksum ofapp.min.jsas version(?v=version) - remove
current/(prod|stag)/app.jsandsrc/Native/elmappesm.js - restore backed up env