init
Create a new Stackr project
The init
command is used to create a new Stackr project. It will create a new directory with the project name and initialize it with the necessary files and directories.
Usage
» stackr init --help
USAGE
$ stackr init [PROJECTNAME]
EXAMPLES
$ stackr init
Example
npx @stackr/cli@latest init
It asks for a project name and creates a new directory with the project name. It then asks for a project template and clones a template from the Stackr's template repository.
_ _ _ _
___| |_ __ _ ___| | ___ __ ___| (_)
/ __| __/ _` |/ __| |/ / '__| _____ / __| | |
\__ \ || (_| | (__| <| | |_____| | (__| | |
|___/\__\__,_|\___|_|\_\_| \___|_|_|
? Pick a template Counter (Recommended)
? Project Name counter
? Database Driver SQLite (Recommended)
✔ ⚙️ Set up MRU
✔ 🧹 Set up git
⠋ ⬇️ Installing packages
Once the project is created, you can navigate to the project directory and start working on your project.
The project directory will look something like this depending on the template -
├── src
│ ├── stackr
│ │ ├── machine.ts
│ │ ├── mru.ts
│ │ ├── state.ts
│ │ ├── transitions.ts
│ │ └── hooks.ts
│ └── index.ts
│── .env.example
└── stackr.config.ts
This project structure is defined here.