scullyLogo

Scully Command Line Options

The Scully CLI has the following available options:

Scully command line options

Serve

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.

Watch

npx scully --watch

By default, Scully has the watchMode in false. You need to add this flag to use Watch Mode.

showBrowser

npx scully --showBrowser

Alias --sb. Chromium browser renders the application.

showGuessError

npx scully --showGuessError

Alias --sge. Displays Guess-Parse's errors in the console.

configFile

npx scully --configFile someName

Alias --cf. Loads a different config file. If it is used at the same time as the --project flag, the project flag takes precedence.

project

npx scully --project someName

Alias --pr. It is used to select a different project. Scully uses the default project from generated by the the Angular CLI.

baseFilter

npx scully --baseFilter /someRoute

Alias --bf. Enables Scully to start rendering a specific route. works on the raw routes, extracted from the app, or provided by extraRoutes.

routeFilter

npx scully --routeFilter /user/*/post/1,/posts/1/user/*

Alias --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 ,

proxyConfig

Alias --proxy. Takes a relative filename for a proxy config file.

For more details look at this.

Scully uses the same config format as webpackDevServer.

removeStaticDist

npx scully --removeStaticDist

Alias --RSD. Removes the static folder generated by Scully from previous renders.

open

npx scully serve/watch --open

Alias --o. Opens the default browser and renders the dist folder generated by Scully.

scanRoutes

Alias --sr or --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.

serverTimout

alias --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)

ssl

npx scully serve/watch --ssl

Runs the Scully server with ssl.

ssl-cert

npx scully serve/watch --ssl --ssl-cert=./url/to/file

Adds a url to the ssl certificate file for a server with SSL.

ssl-key

npx scully serve/watch --ssl --ssl-key=./url/to/file

Adds a url to an ssl key file for a server with SSL.

tds

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/2000 takes 2 seconds.

pluginsError

npx scully --pluginsError=false

Alias --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.

pjFirst

npx scully --pjFirst

might Alias --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.

404

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 index and 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

prod

npx scully --prod

With the prod flag you can use a different config for your scully config and plugins. example