ScandiPWA CLI
A utility for accelerating development with Scandi
Last updated
Was this helpful?
A utility for accelerating development with Scandi
Last updated
Was this helpful?
Example β with one command, create a component template in src/component/HugeTitle:
A is also available!
Install the npm package globally:
The CLI must be run from the the Scandi theme directory or a subdirectory.
Global options:
--help
to get usage help
--version
to print version number and exit
create component
Creates a new
Syntax:
Options:
--container
/-c
creates a container file for the component
--redux
/-r
connects the component to the Redux store with the connect
HOC
name
is the name of the component to be created
Examples:
create route
Syntax:
Options:
--container
/-c
creates a container file for the route
--redux
/-r
connects the route to the Redux store with the connect
HOC
name
is the name of the route to be created
Example:
create store
Syntax:
Options:
--dispatcher-type
/-d
determines what type of dispatcher file will be created.
no
(default) - does not create a dispatcher
regular
- creates a simple helper class for dispatching actions
query
- creates a dispatcher that extends QueryDispatcher
name
is the name of the store to be created
Example:
create query
Syntax:
name
is the name of the query to be created
Example:
deploy
Deploys your app to the cloud
Syntax:
Example
extension install
Installs a Scandi extension
Syntax:
Options:
--no-enable
will install the extension without enabling it
--local
/-l
: use a local module from packages/<name>
--use
/-u
: use a local module from the specified <path>
--version
/-v
specifies the extension version to use
save-dev
/-D
: install the package as a devDependency
name
is the name of the extension to install
extension create
Creates a new scandi extension
Syntax:
Options:
--no-enable
will create and install the extension without enabling it
name
specifies the name of the new extension
override component
Syntax:
Options:
--styles
/-S
:
Not specified (default): will prompt interactively
keep
: don't override styles
extend
: adjust existing styles
override
: completely replace existing styles
--source-module
/-s
: Path to the module to override the component from
--target-module
/-t
: Path to the module to generate the component in
name
is the name of the component to be overridden
Example:
override route
Syntax:
Options:
--styles
/-S
:
Not specified (default): will prompt interactively
keep
: don't override styles
extend
: adjust existing styles
override
: completely replace existing styles
--source-module
/-s
: Path to the module to override the route from
--target-module
/-t
: Path to the module to generate the route in
name
is the name of the route to be overridden
override store
Syntax:
Options:
--source-module
/-s
: Path to the module to override the store from
--target-module
/-t
: Path to the module to generate the store in
name
is the name of the store to be overridden
override query
Syntax:
Options:
--source-module
/-s
: Path to the module to override the query from
--target-module
/-t
: Path to the module to generate the query in
name
is the name of the query to be overridden
Creates a new
Creates a new
Creates a new for querying with GraphQL
Overrides a . Will interactively ask for which parts to override.
Overrides a
Overrides a
Overrides a