Normally this command is used indirectly through the
@magento/pwa scaffolding tool.
The tool collects the parameter values through its interactive prompt and passes them on to the command as options.
This tool is also available for developers or third-party automation tools to use directly.
Example: Using the command with
npx @magento/pwa-buildpack create-project ./new-pwa \ --name @magezilla/new-pwa \ --template venia-concept \ --backend-url https://local.magento \ --author MageZilla
This example creates a new project in the
The package metadata for the project lists the project name as
@magezill/new-pwa and the author as
It also creates a
.env file with the backend URL set to
After creating the project, it installs the package dependencies, including the Venia, Peregrine and Buildpack libraries needed to build the application.
Running the command
npx tool to download the current version and execute the command:
npx @magento/pwa-buildpack create-project <directory> [<options> ...]
The first argument in the command is the directory for the new project. If the directory does not exist, it is created. If the directory is not empty, files that the tool generates overwrite the existing files.
The directory can be the current directory
., which is the default if no first argument is passed.
Do not install buildpack globally on your development system to use this command. This can cause incompatible versions between a product version and the global version.
npx @magento/pwa-buildpack create-project --help to see the list of command options.
You can specify these options in any order after
buildpack create-project <directory>.
||NPM package or directory name of the template to use for the new project. Currently only
||URL value, set in the
||Name for the
||Text for the
||Whether to install dependencies after project creation. Defaults to
||NPM client used to manage this repository. Both
Note: Do not use this command as part of a production deployment process. Use it only in a development environment.