Packages containing config, scripts, and dependencies for Crema apps.
🧰 Tools Used
- lerna A tool for managing JavaScript projects with multiple packages.
- ESLint for code linting
- Jest for unit tests
- Prettier for code formatting (via ESLint plugin)
- TypeScript for Static Typing in JavaScript (Learn)
- Install Node/NPM
- Install NVM (Node Version Manager)
nvm install 'lts/*' && nvm use
npm i
(install project dependencies)- Install the ESLint plugin for
your editorVS Code - Enable "Auto-Fix on Save" in
settings.json
:
{
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{ "language": "typescript", "autoFix": true },
{ "language": "typescriptreact", "autoFix": true }
]
}
Run the following scripts with npm run <SCRIPT_HERE>
:
These scripts are located in
package.json
and do not represent the entirety of available scripts, but are the most commonly used.
dev:setup
- !!!RUN FIRST: Packages must be built and symlinked firstdev:build
- builds packages oncedev:build:watch
- builds packages in watch modedev:test
- run unit tests (be sure you've rundev:setup
first)dev:test:watch
- run unit tests in watch mode (be sure you've rundev:setup
first)dev:teardown
- Removes all consumer and global symlinks
dev:setup
- !!!RUN FIRST: Packages must be built and symlinked firstdev:build
- builds packages oncedev:build:watch
- builds packages in watch modedev:test
- run unit tests (be sure you've rundev:setup
first)dev:test:watch
- run unit tests in watch mode (be sure you've rundev:setup
first)dev:teardown
- Removes all consumer and global symlinks
.
├── README.md
├── consumers
│ └── app-web
├── lerna.json
├── package-lock.json
├── package.json
└── packages
├── scripts
│ ├── configs
│ └── package.json
├── scripts-mobile
│ ├── configs
│ └── package.json
└── scripts-web
├── configs
└── package.json