<aside> ✅ A utility for accelerating development with ScandiPWA

</aside>

Example – With one command, create a component template in src/component/HugeTitle directory:

scandipwa create component HugeTitle

How to install the ScandiPWA CLI?

Install the npm package globally:

npm i -g scandipwa-cli

<aside> ➡️ A VSC plugin for Scandi CLI is also available!

</aside>

How to use the ScandiPWA CLI?

The CLI must be run from the ScandiPWA theme directory or a subdirectory.

Global options:

Create a component

Creates a new ScandiPWA component.

How to work with components?

Syntax:

scandipwa create component [--container] [--redux] [--typescript] <name>

Options:

Examples:

Create a route component

Creates a new ScandiPWA route

How to work with Routes?

<aside> ✅ This will just create the route component in the src/route directory. To implement it you must follow the tutorial to implement a new ScandiPWA route.

</aside>

Syntax:

scandipwa create route [--container] [--redux] [--typescript] <name>

Options:

Example:

Create store

Creates a new ScandiPWA Redux store

How to Work with Redux?

Syntax:

scandipwa create store [--dispatcher-type=<"no"|"regular"|"query">] [--typescript] <name>

Options:

Example:

Create query

Creates a new ScandiPWA query helper for querying with GraphQL.

How to work with queries?

Syntax:

scandipwa create query [--typescript] <name>

Example:

Deploy

Deploys your app to the cloud

Syntax:

scandipwa deploy

Example

 scandipwa deploy
yarn run v1.22.5
$ scandipwa-scripts build
Creating an optimized production build...
Build completed in 186.317s

Compiled successfully.
[...]
Done in 189.38s.
Build files compressed successfully.
Code upload result: OK. Code: 200
Build archive successfully removed.
Congrats, your code will be deployed in a few minutes! You can access it here: <https://master.d16zgbgmy9fzgx.amplifyapp.com/>

Extension create

Creates a new scandiPWA extension

Syntax:

scandipwa extension create [--no-enable] <name>

Options:

Extension install

Installs a ScandiPWA extension

Syntax:

scandipwa extension install [--no-enable] [--local] [--use=<path>] [--version=<required-version>] [--save-dev] <name>

Options:

Override component

Overrides a ScandiPWA component. Will interactively ask for which parts to override.

Syntax:

scandipwa override component [--styles=<"extend"|"override"|"keep">] [--source-module=<module>] [--target-module=<module>] <name>

Options:

Example:

scandipwa override component Header
? Choose things to extend in Header.component.js Header
? What would you like to do with styles? Extend
? Choose things to extend in Header.config.js
? Choose things to extend in Header.container.js

NOTE!

     The following files have been created:
     src/component/Header/Header.override.style.scss
     src/component/Header/Header.component.js

Override route

Overrides a ScandiPWA route

Syntax:

scandipwa override route [--styles=<"extend"|"override"|"keep">] [--source-module=<module>] [--target-module=<module>] <name>

Options:

Override store

Overrides a ScandiPWA Redux store

Syntax:

scandipwa override store [--source-module=<module>] [--target-module=<module>] <name>

Options:

Override query

Overrides a ScandiPWA query helper

Syntax:

scandipwa override query [--source-module=<module>] [--target-module=<module>] <name>

Options: