Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.
/ scripts Public archive

A library that houses shared config and developer scripts used in Crema's Web & Mobile template repos.

Notifications You must be signed in to change notification settings

cremalab/scripts

Repository files navigation

Scripts 📜

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)

🏗 Setup

  1. Install Node/NPM
  2. Install NVM (Node Version Manager)
  3. nvm install 'lts/*' && nvm use
  4. npm i (install project dependencies)
  5. Install the ESLint plugin for your editor VS Code
  6. Enable "Auto-Fix on Save" in settings.json:
{
  "eslint.autoFixOnSave": true,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    { "language": "typescript", "autoFix": true },
    { "language": "typescriptreact", "autoFix": true }
  ]
}

👟 Run

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.

⚙️ Development

  1. dev:setup - !!!RUN FIRST: Packages must be built and symlinked first
  2. dev:build - builds packages once
  3. dev:build:watch - builds packages in watch mode
  4. dev:test - run unit tests (be sure you've run dev:setup first)
  5. dev:test:watch - run unit tests in watch mode (be sure you've run dev:setup first)
  6. dev:teardown - Removes all consumer and global symlinks

📦 Publish

  1. dev:setup - !!!RUN FIRST: Packages must be built and symlinked first
  2. dev:build - builds packages once
  3. dev:build:watch - builds packages in watch mode
  4. dev:test - run unit tests (be sure you've run dev:setup first)
  5. dev:test:watch - run unit tests in watch mode (be sure you've run dev:setup first)
  6. dev:teardown - Removes all consumer and global symlinks

🏛 Structure

.
├── 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

About

A library that houses shared config and developer scripts used in Crema's Web & Mobile template repos.

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •