Yet another boilerplate for TypeScript and React developers.
https://magiccube.github.io/boilerplate-2021/
Since this repository is already a GitHub Template, you can directly create a new GitHub repository from this template.
Alternatively, you can clone this repository to your local workspace.
git clone https://github.com/MagicCube/boilerplate-2021.gitDon't forget to replace all the boilerplate-2021 with your own repository name after cloning.
It is STRONGLY recommended to install dependencies via Yarn.
yarnStart a local development server for developing, debugging and testing.
yarn devBuild for production.
yarn buildPreview the production build.
yarn previewyarn previewGenerate ES modules and TypeScript declarations.
yarn build:esBuild for GitHub pages.
yarn build:gh-pagesIn .travis.yml, we've already integrated our project with Travis' pages deployment,
which means every push to master branch will trigger Travis to build and update GitHub pages automatically.
You’ll need to generate a personal access token with the
public_repoorreposcope (repois required for private repositories). Since the token should be private, you’ll want to pass it to Travis securely in your repository settings or via encrypted variables in.travis.yml.
Alternatively, you can also run the following command from local to manually deploy GitHub pages.
yarn deployVisit GitHub Pages settings page to config your own site.
Two built-in themes are introduced in this boilerplate.
We use Light Theme by default.
Change the @theme variable to dark in src/styles/theme.less if you prefer dark mode.