The project is
- Assembled by NPM
- Bundled by Webpack
- Coded with TypeScript
- Templated with Pug
- Styled with SASS
To build, test and deploy the site you gonna need npm
installedtalling-node-js-and-npm) on your system.
Then to configure the dependencies and prepare development environment, execute
npm install
From now on, use one of the commands from under the package.json
"scripts" section to do stuff. To see the full list of scripts run
npm run
If npm
fails the build and spits off the ERR_OSSL_EVP_UNSUPPORTED
error, you might want to look to upgrade to the latest nodejs/npm
or just skip the damn thing with:
export NODE_OPTIONS=--openssl-legacy-provider
npm start
- starts a dev HTTP server and incrementally recompiles the project as you change the sources (read the console output for details). Simply go to http://localhost:3000/ once the dev server is running.
npm run build
or
npm run build:dev
- assembles the dev website and outputs the files to ./dist
npm run build:release
- same as above but outputs production ready files.
npm run deploy
- Deploys the production files to the AWS S3. Read the section below.
We host the website files statically on AWS S3 service.
To automate the deployment process, the project has a simple command
npm run deploy
In order to work, the command needs AWS Command Line Interface to be installed and configured on the system. Here's what you need to do:
For Windows - https://awscli.amazonaws.com/AWSCLIV2.msi
For Debian based Linux execute the command:
sudo apt install awscli
Here's the doc describing the AWS configuration file and format. But the configuration can be done using the aws
command line tool.
We use crashinvaders
profile in the deploy
command. To setup a new profile, execute the command:
aws configure --profile crashinvaders
It will ask you to enter your AWS personal access key ID and the secret key (ask Anton for those). Here's the full set of data required and what you should put in there:
AWS Access Key ID: ***
AWS Secret Access Key: ***
Default region name [None]: eu-central-1
Default output format [None]: text
Once it's done, you're good to go with the deploy
NPM command.