import
nx g @geekvetica/nx-astro:import --source=../my-astro-blog --name=blogThe generator has the alias @geekvetica/nx-astro:imp. The source needs an Astro config, a package.json and an astro dependency; the target directory has to be empty. The source itself is not changed. The import guide lists what is copied, changed and left out.
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
source (required) |
string | none | Path of the Astro project to import, the first positional argument: absolute or relative to the current directory. |
name |
string | none | Project name in the workspace. Without it the directory name of the source. Written in kebab case. |
directory |
string | none | Target directory, relative to the workspace root. Without it apps/<name>. |
tags |
string | none | Comma-separated tags for the project. |
skipFormat |
boolean | false |
Does not format the generated files. |
skipInstall |
boolean | false |
Does not install the added dependencies afterwards. |
importPath |
string | none | Alias for the project in the root tsconfig.base.json. Without it @<workspace>/<name>; it points at src/index.ts of the project. |
Example
Section titled “Example”nx g @geekvetica/nx-astro:import \ --source=../my-astro-blog \ --name=blog \ --directory=apps/blog \ --tags=type:site