Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add post install/update scripts to simplify package management #13581

Merged
merged 8 commits into from
Apr 22, 2023

Conversation

MikeAlhayek
Copy link
Member

@MikeAlhayek MikeAlhayek commented Apr 20, 2023

This simplify the package process. Instead of having to define a command to install each project, we use node script to find all project/theme that contains package.json and install/update it.

With this PR, we no longer need to update the root package.json to add a command for every project we want to build.

The new command node .scripts/install.js will be executed every time npm install in executed. It'll apply the same command on every project in the solution that contains package.json file.

If you want to execute npm update on all projects, you can execute npm run update-projects

If you want to run npm install on a specific project you may execute npm run install-project {ProjectName}. For example to install app packages in the TheAdmin theme only, you would run npm run install-project TheAdmin. Similarly, to update a project you can run npm run update-project TheAdmin

.scripts/project.js Outdated Show resolved Hide resolved
.scripts/project.js Outdated Show resolved Hide resolved
@MikeAlhayek MikeAlhayek merged commit ea7e383 into OrchardCMS:main Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants