init
nx g @geekvetica/nx-astro:initRun it once per workspace, after installing the plugin. It:
- adds
@geekvetica/nx-astrowith the default target names topluginsinnx.json, unless it is already there, - adds
astroto the development dependencies of the rootpackage.json, unless it is already there, - adds the
@astrojs/nodeadapter that fits that Astro version, unless it is already there, - formats the changed files and installs the added packages.
Running it again changes nothing that already exists.
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
skipPackageJson |
boolean | false |
Registers the plugin only; package.json is not changed and nothing is installed. |
astroVersion |
string | latest |
Major Astro version to install: 5, 6, 7 or latest, which is 7. Ignored when the workspace already has Astro. |
Example
Section titled “Example”Install Astro 6 instead of the latest major:
nx g @geekvetica/nx-astro:init --astroVersion=6