-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a small fix.
e5af3b5
to
633d38c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
shelljs
I ported most of the make steps to
Makefile.mjs
, which makes Windows development and building easier.