feat: Make most make commands cross-platform#14671
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52611/ |
91a04c1 to
406e75d
Compare
| import fs from "fs"; | ||
| import { fileURLToPath } from "url"; | ||
| import path from "path"; | ||
|
|
||
| const root = rel => new URL(`../${rel}`, import.meta.url).pathname; | ||
| const root = rel => | ||
| path.join(fileURLToPath(path.dirname(import.meta.url)), "../", rel); | ||
|
|
There was a problem hiding this comment.
Error: ENOENT: no such file or directory, open '/F:/babel/.module-type
This is a bugfix, and on Windows it will be an exception.
|
I rebased and added esm support, is there anything else to do, feel free to suggest. |
|
After the dependencies are packaged, there is only a lack of parallelism compared to native make, but that's not a big deal.💐 |
|
Is bundling needed just to avoid running |
|
Yes, many of our steps currently remove Also I think this should be useful in the future, for example we use |
d692c21 to
e5af3b5
Compare
| "lint-staged": { | ||
| "*.{js,ts}": [ | ||
| "*.{js,cjs,mjs,ts}": [ | ||
| "eslint --format=codeframe" | ||
| ] | ||
| }, |
There was a problem hiding this comment.
This is a small fix.
e5af3b5 to
633d38c
Compare
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Thank you! Let's keep the publishing commands in Makefile, I prefer not to touch them since they work and I'm currently the only one using them 😅
Could we minify Makefile.js? We already have a rollup-plugin-terser dependency.
633d38c to
565cad0
Compare
make commands cross-platform
shelljsI ported most of the make steps to
Makefile.mjs, which makes Windows development and building easier.