-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Consolidation of multiple similar libraries #10
Comments
I'm okay with unifying into this project. |
👍 |
Yeah, I just figured out #6 :( I was thinking of writing an alternate implementation that uses the data from In any case, I agree it would be best if the effort was concentrated, but personally I'm not sure what the direction should be... |
Wow, really interesting. @spion I feel |
👍 happy to merge, help or document :), I guess #6 is an issue that most of us have faced at some point, probably the most important thing a library that runs several things in parallel should have. |
I would definitely say spawning from the package.json, rather than Not depending on Also I think it'd be a good idea to see how I would be interested in @othiym23 and @isaacs opinions about possibly modularising some of this - so we can all re-use the same piece of code for execution logic. They may well also have some insight for us as they wrote most of npm's lifecycle.js 😄 (although most of that code is 5 years old and so I'd understand if they've forgotten). |
I too think that merging these projects makes sense. One comment about the naming though. I chose a general name because concurrently is not tied to npm run scripts, you can also use the tool for any shell command. |
How about we make 2 packages. the first focusing on sequential and parallel shell execution (name maybe 'parallelshell') and the second focusing on launching npm tasks (grep from project.json or similar)) while depending on the first for execution (name maybe 'npm-run') I think that would be super transparent for the users and limits the necessary flag count. |
I agree, that sounds like a good idea. |
Thanks @keithamus for putting this together. I love this idea. I too think that this should have a more general name and not be |
Just found these projects that touch on this stuff. |
Hey everyone, awesome to see this coming together 👍 npm scripts for the win! Personally I see two separate but related goals here;
Obviously Windows compatibility is a goal for both 1 and 2, so some code/ideas could be shared, but I would prefer to see them remain separately focused on their respective goals. If anyone is interested, I know some people on npm/who work on the cli and I would be happy to reach out if they have suggestions, or if any of you want to provide some feedback. Thanks so much @keithamus for opening this issue and for linking to everyone's projects, you are all awesome 💃 I'm giving another talk on npm scripts at View Source conf in November, and I can tell you more and more people are getting excited about doing front end automation this way thanks to your work and blog posts 😄 |
In fact, I will definitely bring this up with the folks at npm. Thanks also @mysticatea for writing this :) |
Hey @k88hudson! Thanks for the kind words. I definitely think feedback from the peeps at npm would help here. Aside; @k88hudson I watched your (absolutely excellent) npm talk at Nordic.js which led me to |
I thought about it a while, here is what I want:
In my eyes a unsolved problem of all project-processing methods is to handle several projects. The worst case: Say I researched recently and found a new postprocessing tool far better than the other tool I used in 5 of my projects and now I want to migrate... Maybe we could collect what all others want and start putting a feature list together - so the development can start 😄 |
On the surface this idea seems good; because having a mix of flags is a bit of a pain, and a bit hard to disambiguate. However when you consider the power of $ npm-run-all --sequential a b c --parallel d e f --sequential g h i
# To do this with three commands:
$ run-series a b c && run-parallel d e f && run-series g h i
# Or
$ run-series 'run-sequential a b c' 'run-parallel d e f' 'run-sequential g h i' I have some tasks in a project right now which are mix of sequential and parallel (build all the things, then watch the output with several tools and serve html all at once). Having said that I think it could end up being pretty hairy having command line, npm, sequential and parallel all wrapped in one lib. How about the following instead:
I like the idea of
I'm going to disagree with this on a few points:
Ew no! Babel or bust!
I agree, this is a problem (well, for my work its managing hundreds of components and keeping everything up to date and standardised across the board). I think this is an orthogonal problem though - mostly one of provisioning and less about orchestrating tasks. |
I like the idea of
I was surprised by the location of brace's keys! BTY, I think we should be looking at npm/npm#9970 . Though I will add collaborators of this repository, may I add all people who is joining this conversation? And there are requests about making changes.
|
I like @paulpflug's idea of having separate CLI commands for parallel and sequential run. In @keithamus' example:
I like 2nd(this is not an option because lack of windows support) and 3rd more because they explicitly state which steps are run sequentially and which are run parallel. The 1st command has implicit hidden information: all those substeps are run sequentially. |
I think we have enough to get a prototype going. I'm going to make some time this weekend to get a first draft done and we can all see where to go from there. |
This sounds really good. Has there been any development on this? I'm currently using |
@keithamus Good on you for opening this Issue and burying your lib in exchange for working together for an even better one. GitHub needs more developers like you. 👍 Also, thank you for your article on switching to npm. I just made the switch because of it and it's beautiful over here. Now if you'll excuse me, I have to go build yet another grid system to pollute the sea of grids with... :( @mysticatea Oh and good job on this. Works like a charm! |
Thanks for the kind words @corysimmons. I know I said I'd get a draft done a couple of months ago - things got a bit in the way, but rest assured it is on my todo list (item number 3 😉) so I'll be pushing some code soon. |
hey, Because I needed more functionality, I created a tool yesterday. Now it is finished with unit tests but without much documentation yet. So here is the spawn wrapper better-spawn with all the things I learned from parallelshell. And here the script-runner Usage
run-npm currently uses minimatch, but I'm not fully statisfied I thought about templating of scripts:
It would be not to hard to implement, but I can't think of a use case currently |
Sorry to butt in. I came across parallelshell from an adventure in building with VS Code. It didn't work, so I went to its site, which led me here. Anyway... Quoth the @kimmobrunfeldt:
I'm confused as to your Windows comment. Using I agree that the first command is bad in that it includes an implicit behavior, another reason I prefer the second example. I would suggest that, if you boil this down to one command with aliases, that the one command considers The second command, however, does brings up a question: what to do with exit codes (if anything)? None of these examples use
Although, since
I could see needing Lastly, I am very glad you all agreed to combine your efforts. There is way too much fragmentation and duplication of purpose and effort these days. |
I think we can agree this is a difficult topic.. we only have 1 line, no syntax highlighting and With I'm strongly for ordered parameters as So for you example, I think a desireable syntax would be:
with all nested commands hidden behind own npm scripts. |
Hi all, may I know what's the status of the consolidation of all projects? |
…l as the former has been deprecated in favour of the latter See issue mysticatea/npm-run-all#10 * Removed parallelshell and added npm-run-all * Added a new watch:app npm script which sets NODE_ENV to development and starts nodemon in current directory * Altered dev npm script to run npm-run-all with `--parallel` flag, this concurrently runs tasks `watch:app`, `watch:scss`, `watch:js` and `watch:translations`
Which project is the one where you are all merging into ? |
it's npm-run-all. |
Ok thanks for clarifying, I wasn't sure as I haven't used a windows shell for a while. |
Any update on this? |
Slightly different and slightly related, a project I recently made: |
@keithamus Has |
Yes I would say so. Sadly I didn't get any time to work on it 😊 but I'd say it's now the tool I wanted parallelshell to be. |
That's awesome to hear. Great collaboration.
Well I don't understand that you guys have/find the time to build all these tools and maintain and support it. I must be a lot slower, or just less productive. |
From @pygy https://github.com/pygy/gosub
|
@kimmobrunfeldt commented on Oct 17, 2015: Is this goal achieved in this consolidation? As the name of this package suggests, I think, this is still pretty much tied to Thanks. 🙏 |
Is the consolidation of all these projects into one megarepo still taking place? Cheers! |
Hi all I had originally missed this thread. I wrote I'll probably keep using it for my libs given how simple it is (no options, does exatcly what I want), but I can add a banner at the top of the README pointing to whatever the meta-project ends up being. |
Set "scripts": {
"exec": "exec",
"dev": "del dist; run-p 'exec -- tsc -w' 'exec -- nodemon'",
}, 👍 |
How to use this, to start multiple projects? For example, something like
Need to start the |
@KrishnaPG, it seems that your question is unrelated to this issue. Non-the-less, I'll try to help you. Try the |
I recently stumbled on something similar to the tools listed in the OP, but the one I found automatically took each command and multiplexed it into a configurable layout (like tmux terminal multiplexer). The layout was specified in But I can not find this package. I should've saved it! EDIT: Okay, I found this: https://www.npmjs.com/package/multiplerun. That's similar to what I stumbled on before, but that one is specifically for use with iTerm in macOS. The one I had stumbled on was pure Node.js (I think) and would therefore run in any OS, in any terminal. EDIT: There's also https://www.npmjs.com/package/stmux, but it isn't the one I found before. |
@trusktr searching for tmux on npm I found this: https://www.npmjs.com/package/multiview |
Hi @mysticatea and @k88hudson! Thanks for your hard work with
npm-run-all
!I maintain a similar library - the functionality is slightly different but it shares a lot of common functionality with
npm-run-all
. My library is called parallelshell - which I maintain with @paulpflug. I am also aware of a few other libraries that attempt to solve the problem of properly parallelising npm (or shell) tasks:concurrently
which is written by @kimmobrunfeldt and has had contributions from @luv2code.shell-executor
which is written by @royriojas.npm-parallel
which is written by @spionpkgrun
which is written by @reggiWe're all trying to reach the same goal - run npm tasks quickly and easily in parallel (and sometimes serially), and have them log & exit in ways you'd expect. For the most part, each of us (I presume) has convergently developed these solutions. While it's great that we're all solving this problem, its bad that we're all solving it...
The point
I think we should combine forces, to make one canonical parallelisation tool. Personally, I see no point in continuing development of both
parallelshell
andnpm-run-all
- we may as well just have one. Having said that, I'm still usingparallelshell
because it solves particular bugs that I (and @paulpflug) have solved (with great pain) whichnpm-run-all
is yet to solve.The way I see it - I'm happy (as long as @paulpflug is) to port the fixes we have developed in
parallelshell
, over tonpm-run-all
rather than expend effort developing the features I want fromnpm-run-all
inside ofparallelshell
. I dont want to speak for all other developers (@paulpflug, @kimmobrunfeldt, @luv2code, @royriojas, @spion, and @reggi) - but I for one would certainly like for all of these projects to consolidate under one label. If and when these projects converge, I'd like everyone of the original authors/contributors to be a contributor of the new project - to ensure that it remains well maintained. How does this sound to you?FYI, I chose to file this issue here - rather than any of the other projects - because I think this project has the best name. By and large they are pretty much all interchangeable (or certainly could be with a bit of development).
Summary
npm-run-all
andparallelshell
are very similar (as are other projects)The text was updated successfully, but these errors were encountered: