Development
You can start a new project using our CLI with the following command:
npx @apollion-dsi/scripts create [PROJECT-NAME]
cd PROJECT-NAME
yarn startYou don't need to install or configure tools like webpack and babel,
both come preconfigured so you can focus on the code. In addition, the template
includes eslint, prettier, jest, commitlint, and Typescript. The template has the following structure:
my-app
├── node_modules
├── package.json
├── tsconfig.json
├── jest.config.js
├── commitlint.config.js
├── .eslintrc.js
├── .editorconfig.js
├── .gitignore
├── .prettierrc.js
├── public
│ ├── index.html
└── src
├── index.tsx
├── App.tsx
├── App.test.tsxExisting projects
For existing projects you can use our CLI as follows
# project root
yarn add --dev @apollion-dsi/scriptsnow we need to update the scripts field in package.json
{
"scripts": {
"dev": "scripts dev",
"build": "scripts build",
"test": "scripts test"
}
}the only requirement for it to work is to use the following folder structure:
project-name
├── package.json
├── public
│ ├── index.html
└── src
├── index.tsxCommands
the commands below are available in our template
yarn start or npm start
Runs the project in development mode, with automatic reload. Open http://localhost:3000/ (opens in a new tab) to view it in the browser.
yarn build or npm build
Builds the project for production distribution, in the build folder.
yarn test or npm test
Runs tests with jest --watch on files changed since the last commit.