CLI tool to create new Incode dashboard applications
npm install @incodetech/create-dashboardA CLI tool to quickly scaffold a new Incode dashboard application from a template.
- Downloads the latest dashboard template from the IncodeTechnologies/dashboards-ui repository
- Sets up a new project directory with the template code
- Optionally copies the source code of the dashboard UI components instead of using the npm dependency (see -c option)
- Automatically updates the project name and version in package.json
- Guides you through the next steps to get started
- Node.js (v20 or higher recommended)
- Git with SSH access to GitHub (your SSH key must be added to your GitHub account)
- NPM you also need to be a part of @incodetech org on npm, or you can obtain INCODE_DASHBOARD_NPM_TOKEN from org member in order to install the dependencies which are under private scope of the org.
You can use this CLI directly with npx
``sh`
export INCODE_DASHBOARD_NPM_TOKEN=npm_myorgtoken
npx @incodetech/create-dashboard my-dashboard
`sh`
npx @incodetech/create-dashboard [options]
- Replace with your desired project name.
- If you omit the project name, the CLI will prompt you for one.
- -c, --copy-components-source-code@incodetech/dashboard-ui
Copy the source code of the dashboard UI components into your new project instead of adding as an npm dependency. This is useful if you want to customize or directly inspect the component implementations.
If you do not specify this option, you will be prompted interactively.
- The CLI clones the dashboard template from the IncodeTechnologies/dashboards-ui repository using a sparse checkout (only the template app is downloaded).
- It copies the template to your new project directory.
- If you use the -c option, it copies the source code of the dashboard UI components into your project (under src/components) and updates imports accordingly. Otherwise, it adds @incodetech/dashboard-ui as a dependency.package.json
- It updates the with your project name and resets the version to 0.1.0.
- It cleans up any temporary files.
After the CLI finishes, follow the instructions:
`sh`
cd my-dashboard
npm install
npm run dev
Or if you wish to use yarn:
`sh`
cd my-dashboard
touch yarn.lock
yarn install
yarn dev
Create a dashboard project using the npm package for UI components (default):
`sh`
export INCODE_DASHBOARD_NPM_TOKEN=npm_myorgtoken
npx @incodetech/create-dashboard awesome-dashboard
Create a dashboard project and copy the dashboard UI component source code:
`sh``
export INCODE_DASHBOARD_NPM_TOKEN=npm_myorgtoken
npx @incodetech/create-dashboard awesome-dashboard -c
- SSH required: Make sure your GitHub SSH key is set up and you have access to the IncodeTechnologies/dashboards-ui repository.
- Directory already exists: The CLI will not overwrite existing directories.