Core
Requirements
- Node.js version 18.0 or above (which can be checked by running node -v). You can use nvm for managing multiple Node versions on a single machine installed. When installing Node.js, you are recommended to check all checkboxes related to dependencies.
Scaffold a new project
To create a new project, you can use the following command:
npx create-sonnet-project
You will be prompted to enter the project name, select a template, and choose whether to add TypeScript to the project. Here is an example of the prompts:
Sonnet JS: A frontend framework
✔ Project name: sonnet-project
? Select a template › - Use arrow-keys. Return to submit.
❯ Default
SSR
? Install Sonnet Router? › No / Yes
? Add TypeScript? › No / Yes
Done. Now run:
cd sonnet-project
npm install
npm run dev
This will create a new Sonnet JS project in the sonnet-project
directory and install all the necessary dependencies.