Installation

View as Markdown

Create a project

npm create @neutron-build@latest my-app
cd my-app
npm install
npm run dev

The scaffolder is published as @neutron-build/create. The previous create-neutron package is deprecated; use the scoped command above.

The development server prints its local URL when it starts.

The default scaffold uses Preact and the basic template. No interactive questions are asked.

Choose a template

Pass --template when you need a different starting point:

npm create @neutron-build@latest my-docs -- --template docs

Available templates are basic, marketing, app, full, and docs.

To use React compatibility instead of the default Preact runtime:

npm create @neutron-build@latest my-app -- --runtime react-compat

Run npm create @neutron-build@latest -- --help for the complete option list.

What the scaffold installs

The generated project depends on @neutron-build/core, @neutron-build/cli, Preact, and preact-render-to-string. Its main scripts are:

{
  "scripts": {
    "dev": "neutron-ts dev",
    "build": "neutron-ts build",
    "start": "neutron-ts start",
    "preview": "neutron-ts preview"
  }
}

Next