Open your favorite Terminal and run the following command. Make sure you have the latest npm and node version. In the root directory of the application, run these commands to get started.
$ npm install
$ npm install -g gulp
$ npm install -g nodemon
Before running the server or building the front-end react app, use the following command to create a new terminal instance that will remain after you terminate your session:
$ screen
The following commands build and bundle react app into plain js (choose one of the following). The compiled javascript file will be in public/ directory
When quickly compiling locally run this:
$ npm run fdev
When working locally, run this to continually update saved changes:
$ npm run fwatch
When deploying and NOT DEBUGGING, build it as production app as this will minify and otherwise optimize the app:
$ npm run fproduction
To build typescript files into javascript files use
$ npm run build
To watch the changes of typescript files in server directory use
$ npm run tsc-watch
To start the server and watch changes made to javascript files run
$ npm run watch
You normally want to run those two commands above at the same time. One is to watch and compile typescript files and the other is to watch if there are any changes to compiled javascript files, rerun the server.
To watch for changes and dynamically build interactive react documentation
$ npm run styleguide
To build a static version of the interactive react documentation
$ npm run styleguide:build
To build a markdown version of the react documentation
$ npm run react-docs
To build a markdown version of the JavaScript documentation
$ npm run js-docs
To build a markdown version of the TypeScript documentation
$ npm run ts-docs
To build markdown versions of all documentation (Note: they can be found in the /documentation/ directory)
$ npm run docs