4 ms·
Only "in additional to npm", and then really only once yarn is at parity. Right now yarn still has issues installing certain packages, and there is no yarn equi
by TheRealPomax 10y ago
Only "in additional to npm", and then really only once yarn is at parity. Right now yarn still has issues installing certain packages, and there is no yarn equivalent to "npm run ..." which is a pretty significant hold-up (projects that rely on npm scripts rather than make files or some other OS-encumbered approach cannot switch over at the moment).
It's in the works and slated for a later release, but makes it such that yarn is not a universally viable replacement for npm yet.
- fzzzy 10y agoHow is npm run not os encumbered? It just calls out to the shell. Does it ship with a consistent shell on every platform and use that?
- bsharper 10y agoI just use JS scripts, because if node is not installed you aren't getting very far anyway. Actions like "copy this file", "clear this subdirectory", and "pull these files over the network" are easy to write synchronously in node, are there are modules for things that aren't. For more complex actions, there are modules like env-cmd or cross-env for setting environmental variables on different platforms. If you had something really complex, you could check os.platform() and then call scripts written for each OS. But you're right, you can't write a .sh shell script and expect it to magically work on Windows.
- steveklabnik 10y ago> there is no yarn equivalent to "npm run ..." https://yarnpkg.com/en/docs/cli/run https://yarnpkg.com/en/docs/cli/run ? (I am not primarily a node dev, so I might be missing some nuance here.)