-
Notifications
You must be signed in to change notification settings - Fork 607
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
[rush] default NPM command set #2293
Comments
@octogonz and I were talking about this recently. We're starting to do some work on expanding the way custom commands are executed (see here: #2299). @willmtemple - Do you have any ideas on what you'd like the config for these default commands to look like? |
@iclanton If it's going to be something simple and NPM-style rather than the full Rush command system, then my preference would be a top-level key in either One of the things that we really love about using Rush to manage the Azure SDK monorepo is that so far we've been able to avoid having to prescribe a build automation framework like Gulp or Grunt to all of our packages. We just use NPM script conventions, and having a simple system of defaults would make that even easier and better. Most packages can use our default script template, and some that have different needs can change it. In a perfectly ideal world, there would be no need for this because there would be native support for extension in
A more sophisticated solution is also welcome, but that would feel more like a feature, whereas IMO the lack of extension in |
This seems related to Design proposal: "phased" custom commands (Issue #2300). There we pointed out that lots of |
Is this a feature or a bug?
Currently, over in the Azure SDK for JavaScript, we have a lot of commands for build/test/etc. that are the same in many packages, but differ slightly in some packages that need to make modifications. It's proven to be very painful to keep these commands in sync across the repository, for example if we want to change the baseline or reference for how a given step should work, we have to apply that change to all the
package.json
files. While we can automate that process to some degree, it'd be nice to have a "default command set" for commands that are common across the monorepo, but that are still basically just NPM commands.The proposal is that
rushx
or Rush bulk commands, when invoked, would check the localpackage.json
commands first, and run a matching command if available, but otherwise fall back to the "default command set," which would be specified at the monorepo level (or perhaps could be overridable on a directory-by-directory basis). I know that this has been discussed before in the repo and generally it seems like a more sophisticated solution based on the documentation-focused Rush commands is preferred (discussion here), but I do think it would be useful to also have a way for NPM-style commands to fall back to defaults.This would allow us to remove a lot of manually-managed boilerplate from the Azure SDK for JS package.json scripts.
The text was updated successfully, but these errors were encountered: