Project scaffolding is a technique for auto-generating required files to support a specific project structure. PWA Studio provides a scaffolding tool to simplify project creation and help developers get started.
Default project template#
The scaffolding tool uses the
venia-concept package as the default template for all new PWA Studio storefront projects.
When you set up a new project, the result is a project structure based on the files in this package.
Most of its UI and logic come from its
@magento/peregrine dependencies, so
it has very little code in its own project folder.
Customizing these projects is as simple as importing small pieces of
venia-ui and combining them with custom code.
For more information about the project template, see Project Templates.
Since the package name begins with
create-, it is considered a project generator and can be run simply as
This command launches an interactive questionnaire in the command line for configuring different parts of the project.
Copied to your clipboardyarn create @magento/pwa
Copied to your clipboardnpm init @magento/pwa
Scaffolding with other versions of PWA Studio#
To create scaffolding for a project using an older version of PWA Studio, the required version is noted in the
yarn global add @firstname.lastname@example.org
npm init @email@example.com