0.0.3 • Published 9 months ago
compass-scaffolder v0.0.3
Local dev loop
First things first make sure that you have proper node version and run nvm use, then proceed to installing dependencies by running yarn install.
Run the app
yarn cliView all available CLI commands
yarn cli helpRun a command
yarn cli <command>Pro tip: if you want to run any commands that interacts with Compass make sure to set compassSiteUrl and compassUserEmail in compass-scaffolder.config.ts and set USER_API_TOKEN environment variable
(see docs to learn how to generate one).
Test
yarn testTypecheck
yarn typecheckLint
yarn lintTest
yarn testDebug with VS Code
Create .vscode/launch.json file with content like:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug CLI",
"runtimeVersion": "20.18.0", // should mach version defined in .nvmrc
"program": "${workspaceFolder}/src/cli/index.ts",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["push"], // specify CLI command you want to debug
"env": {
"NODE_OPTIONS": "--no-node-snapshot",
"USER_EMAIL": "<YOUR_EMAIL>",
"USER_API_TOKEN": "<YOUR_API_TOKEN>"
}
}
]
}