-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Completed npm commands (npm:install, npm:update, npm:run) #1202
Conversation
Yes that's the expected behavior. |
In the mean time, until this is merged, what would be the correct npm command to do the equivalent npm update on a plugin or theme? I was working on a puppeteer based html to pdf plugin specific to winter and capable of using Firefox that I would like to continue development on and a Daisy UI based theme. |
@josephcrowell yes, you can use |
…ered package exists
@jaxwilko are there any changes that could be made to the docs? |
@LukeTowers probably yes, at least some work on clarification of the expected / actual behaviour, i'll open a PR tomorrow and also add some more comments to the code in this PR to make it more clear what's going on :) |
Docs update PR: wintercms/docs#213 |
modules/system/console/asset/exceptions/PackageIgnoredException.php
Outdated
Show resolved
Hide resolved
@jaxwilko what's left? |
@LukeTowers just reworking the exceptions |
@LukeTowers custom exceptions have been removed and replaced with |
This PR removes
[vite|mix]:install
s ability to install an npm package into the rootpackage.json
(a hold over from the previous mix system). In it's place it adds the commandsnpm:install <compileablePackage?> <npmPackage>
which allows the user to install a packge into a workspace.I.e. if I want to add
leftpad
to my pluginJaxWilko.Example
I can run./artisan npm:install jaxwilko.example leftpad
which will then add the dependency toplugins/jaxwilko/example/package.json
then run the install command as the root project owner (root package). This is powered by npm and we just need to run the right command in the workspace package.This PR also reworks
npm:update
andnpm:run
so they share a parent with the npm execution logic and simplifies their internal logic.NPM Run
npm:run
still works as before../artisan npm:run jaxwilko.example test
will execute thetest
script within thejaxwilko.example
package.NPM Update
npm:update
now supports a package to update, as well as now taking a assetPackage to specify which workspace to run the command within../artisan npm:update jaxwilko.example tailwindcss
will updatetailwindcss
withinjaxwilko.example
./artisan npm:update tailwindcss
will updatetailwindcss
globally (within the root package, workspaces can still install their own independent version).NPM Install
./artisan npm:install jaxwilko.example tailwindcss
will installtailwindcss
withinjaxwilko.example
./artisan npm:install tailwindcss
will installtailwindcss
in the root package.json./artisan npm:install tailwindcss --dev
will installtailwindcss
withindevDependencies
rather thandependencies
TODO
asset:install
asset:install
asset:install
to only install requested package and not all unless no package is specified