-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
V4P4: feat(buildpack): scaffolding creation #1500
V4P4: feat(buildpack): scaffolding creation #1500
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://pwa-studio-git-zetlen-v4apip4-scaffolding-generator.magento.now.sh |
916a20a
to
bdec035
Compare
a06986d
to
78713a2
Compare
bc5802a
to
7974942
Compare
7974942
to
39a3496
Compare
78713a2
to
d012d6a
Compare
39a3496
to
ca4e096
Compare
d32b057
to
a21e951
Compare
|
da3a266
to
0613e32
Compare
a21e951
to
00ec457
Compare
The pwa-buildBack typo got me for a second there, I should stop with the copy pasting habit |
@Jordaneisenburger Whoops! Corrected. |
Description
Scaffolding tools to create new projects that use PWA Studio as a framework.
Closes #1693.
New features
create-project
subcommand in thebuildpack
CLI.@magento/create-pwa
, that launches an interactive questionnaire as a more friendly interface tobuildpack create-project
and its many arguments. 🎉 This project's name begins withcreate
, so any NPM user can start a new project withnpm init @magento/pwa
oryarn create @magento/pwa
._buildpack
directory in your project root.Notes
venia-concept
is tested and supported. The system is built so that it'll be easy in the future to expand this to using any NPM package._buildpack
directory, which should contain helper modules and utilities for manipulating PWA Studio code. The_buildpack/create.js
is used to generate a visitor for buildpack to use when copying the directory over. Implementing_buildpack/create.js
in a repository makes it "shareable"; the dev is responsible for writing any custom code in that module which would ease the transitions.Verification Steps
buildpack create-project
Verification StepsDEBUG_PROJECT_CREATION=1
. This is required for it to work in the core repository.npm init @magento/pwa
Verification StepsAn NPM package whose name begins with
create-
(disregarding@scope
) can be used as a project generator. It is expected to expose one CLI command that will be run when a developer runsnpm init <package_name_minus_create_prefix>
.Our initializer is called
@magento/create-pwa
, so the command to use it in NPM is:Or in Yarn:
ℹ️ Warning: Yarn can't use globally linked modules in its "create", so it's hard to test the Yarn command.
cd packages/pwa-buildpack
yarn link
cd ../create-pwa
yarn link @magento/pwa-buildpack
cd
to the root directoryDEBUG_PROJECT_CREATION=1 npm init @magento/pwa
and answer the questionsExpected Result: Jubilance and pride.
Proposed Labels for Change Type/Package
Checklist: