Installation
View as MarkdownCreate a project
npm create neutron@latest my-app
cd my-app
npm install
npm run dev
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@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@latest my-app -- --runtime react-compat
Run npm create neutron@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"
}
}