The seed you plant to grow your project.
If you have SSH
setup on your account, run the following command:
$ git clone git@github.com:tcmbytes/project-seed.git
Otherwise, you may use the HTTPS
version (might ask for username and password):
$ git clone https://github.com/tcmbytes/project-seed.git
Change the working directory to the repo directory:
cd project-seed
If you're developing on macOS, then run the setup-macos.sh script. It will install the system dependencies, project dependencies and the evironment for your app:
bash ./bin/setup-macos.sh
Otherwise, make sure to manually install Node.js and yarn on your machine before continuing with the development.
$ node --version
v16.19.1
$ yarn --version
1.22.4
To install the project dependencies, run the following install command:
$ yarn
To configure the environment variables of your project, make sure to configure the environment variables in the .env
file:
cp .example.env .env
or copy the next lines into your .env
file:
MY_ENV_VAR='MY_ENV_VAR'
To start the project in development mode, run the following command from the root directoy of the project:
$ yarn dev
To continuously watch for file changes and check for syntax errors, run the following command:
$ yarn dev:watch
To run the unit test, run the following command from the root directoy of the project:
$ yarn test
To continuously run the unit tests as you code, run the following command:
$ yarn test:watch
The generated tests reports are available in ./reports/test-results.html
file.
To generate the coverage report for your app, run the following command:
$ yarn test:coverage
The generated report is available in ./reports/coverage
directory.
To transpile the TypeScript
files into JavaScript
, run the following command from the root directoy of the project:
$ yarn build
To build and start the transpiled project, run the following command from the root directoy of the project:
$ yarn start
To run type, linting and prettier checks on your project, run the following command from the root directoy of the project:
$ yarn check:all
Alternatively, you can run the scripts independently:
$ yarn check:type
$ yarn check:lint
$ yarn check:prettier
Futhermore, to check for project dependency cycles, run the following command from the root directoy of the project:
$ yarn check:dpdm