Scully Command Line Options
The Scully CLI has the following available options:
Scully command line options
- Scully Command Line Options
npx scully serve
Starts the scully server. This process does not build the project. It only serves the Angular build files, and the Scully static files.
npx scully --watch
By default, Scully has the watchMode in false. You need to add this flag to use Watch Mode.
npx scully --showBrowser
--sb. Chromium browser renders the application.
npx scully --showGuessError
--sge. Displays Guess-Parse's errors in the console.
npx scully --configFile someName
--cf. Loads a different config file. If it is used at the same time as the
--project flag, the project flag takes precedence.
npx scully --project someName
--pr. It is used to select a different project. Scully uses the default project from generated by the the Angular CLI.
npx scully --baseFilter /someRoute
--bf. Enables Scully to start rendering a specific route. works on the raw routes, extracted from the app, or provided by extraRoutes.
npx scully --routeFilter /user/*/post/1,/posts/1/user/*
--rf. Enables Scully to start rendering a specific route. Uses the handledRoutes. You can use the
* as a wildcard, and provide multiple routes seprated by a
--proxy. Takes a relative filename for a proxy config file.
For more details look at this.
Scully uses the same config format as webpackDevServer.
npx scully --removeStaticDist
--RSD. Removes the static folder generated by Scully from previous renders.
npx scully serve/watch --open
--o. Opens the default browser and renders the dist folder generated by Scully.
--scan. Scans the application again to find unhandled routes. This is normally done just once. When routes in the application are added or changed, use this flag to discover all the new routes.
--st Time to wait for the Scully server to become available. Defaults to 10000 (10 seconds). If you experience timeout issues in your CI, you might wat to raise this number. (Scully needs to extract the routes, this might take longer in a CI environment)
npx scully serve/watch --ssl
Runs the Scully server with ssl.
npx scully serve/watch --ssl --ssl-cert=./url/to/file
Adds a url to the ssl certificate file for a server with SSL.
npx scully serve/watch --ssl --ssl-key=./url/to/file
Adds a url to an ssl key file for a server with SSL.
npx scully --tds
Launches the Test Data Server. This is only helpful for demos.
The following APIs are supported on the test data server:
/users- Returns a list of users
/users/:id- Returns just one user by id
/posts- Returns a list of posts
/posts/:id- Returns a post by id
/slow/:delay- Returns 200 code after a delay has gone by. Eg:
/slow/2000takes 2 seconds.
npx scully --pluginsError=false
--pe Show the error from the plugin, but continue rendering.
If you do not use the flag (by default is true) when you have an error in any plugin, the Scully will terminate.
npx scully --pjFirst
--pjf. In an project that has a different setup, you might want to use the location of the main
package.json instead of the
angular.json as the homeFolder default. This might be needed in some NX repo's as well.
npx scully --404="" #default, no need to provide this npx scully --040="index" npx scully --040="404" npx scully --040="none"
How routes that are not provided in the application are handled.
If the Scully server gets a request for a route(file) that does not exists on the file-system, this option amends ow that is handled. The default option is to render a 404 page, and raise a warning during rendering. the
404 will render the
index.html or the
404.html from the dist root folder. The
none option will leave it up to the express software layer. And lastly,
baseOnly will use the unhandled routes only
npx scully --prod
With the prod flag you can use a different config for your scully config and plugins. example