ng-add
Theng-add schematic installs and configures Scully in an Angular application. This is the primary schematic to get started with Scully.
Usage
Basic Installation
With Options
Options
--blog
- Type:
boolean - Default:
false - Description: Automatically adds a complete blog setup to your application
--project
- Type:
string - Default:
"defaultProject" - Description: Specifies which project in a multi-project workspace to add Scully to
--pluginTS
- Type:
boolean - Default:
true - Description: Enables support for custom TypeScript plugins
--local
- Type:
boolean - Default:
false - Description: Installs Scully from local dependencies instead of npm
--renderer
- Type:
string - Default:
"sps" - Options:
"sps","puppeteer","playwright" - Description: Selects the route renderer to use for pre-rendering
sps(Scully Platform Server) - Default option, uses Angular’s platform-serverpuppeteer- Uses Puppeteer for headless Chrome renderingplaywright- Uses Playwright for cross-browser rendering (beta)
What Gets Created/Modified
Theng-add schematic performs the following actions:
1. Package Dependencies
Adds the following packages topackage.json:
@scullyio/scully- Core Scully library@scullyio/ng-lib- Angular components for Scully- Renderer-specific package based on your selection:
@scullyio/scully-plugin-puppeteer(if using Puppeteer)@scullyio/scully-plugin-playwright(if using Playwright)@angular/platform-serverand@scullyio/platform-server(if using SPS)
2. App Module Updates
File:src/app/app.module.ts
Adds ScullyLibModule import:
3. Polyfills Configuration
File:src/polyfills.ts
Adds zone.js task tracking:
4. Git Ignore Entries
File:.gitignore
Adds Scully-specific entries:
5. Scully Configuration
Creates a Scully configuration file (done by the subsequentscully schematic that runs automatically).
6. Blog Setup (Optional)
If--blog flag is used, also creates:
- Blog module and component
- Blog routing configuration
- Sample markdown file
- Content folder configuration in Scully config
Angular Version Requirements
Scully requires Angular version 12 or higher. The schematic will check your Angular version and exit with an error if you’re using an older version.Examples
Standard Installation
Complete Blog Setup
Multi-Project Workspace
NX Workspace
For Angular CLI in NX workspace:Next Steps
After runningng-add, you can:
-
Build your Angular application:
-
Run Scully to generate static pages:
-
Serve the static site:
See Also
- blog schematic - Add a complete blog setup
- post schematic - Create individual blog posts
- plugin schematic - Create custom Scully plugins

