-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Create Block: Add lifecycle script support #71069
Copy link
Copy link
Closed
Labels
Developer ExperienceIdeas about improving block and theme developer experienceIdeas about improving block and theme developer experience[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Tool] Create Block/packages/create-block/packages/create-block[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Metadata
Metadata
Assignees
Labels
Developer ExperienceIdeas about improving block and theme developer experienceIdeas about improving block and theme developer experience[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Tool] Create Block/packages/create-block/packages/create-block[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.
What problem does this address?
Currently when adding custom scripts to a template config, npm lifecycle scripts (i.e.
postinstall) are being ignored. They're added to yourpackage.jsonfile but they aren't executed during the initial set up.Here's an example config from WooCommerce: https://github.com/woocommerce/woocommerce/blob/trunk/packages/js/create-woo-extension/index.js#L18
What is your proposed solution?
Add manual support for all- or a subset- of lifecycle scripts to the manual generation process.
CC @ryanwelcher