Setup Storybook in root and Tailpine tooling in the theme automatically when composer require is run for Tailpine

Created on 25 February 2025, about 2 months ago

Problem/Motivation

Now that we have removed the node modules folder from our theme, we need to automatically set up or run npm install in the root directory to setup Storybook and npm install in the theme directory to setup all the needed packages for Tailwind css or any other libraries required for Tailpine to function properly.

Steps to reproduce

Proposed resolution

1. As we have setup Tailpine for storybook, the root of the site should have package.json for the STORYBOOK setup. So write an automatic script or check if Drupal Composer Scaffold can help us, to copy Storybook specific package.json to the root of the site when composer require is run on TAILPINE. Then it should also run npm install so that all the packaes are downloaded automatically.

2. While in the theme folder for Tailpine, we don't need any copying but we will need to run npm install in it so that all the packages we need are downloaded automatically. In both instance please make sure it works with both ddev and without ddev.

Feature request
Status

Active

Component

Code

Created by

🇵🇰Pakistan drupak

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024