Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
- Increasing the Performance on compile files
- Worked in Windows
Proposed resolution
- Simplify fork `babel-es6-watch.js` and modify it.
Comment | File | Size | Author |
---|---|---|---|
#18 | core-es6-babel-compile-2818409-18.patch | 3.49 KB | nod_ |
#15 | interdiff.patch | 374 bytes | droplet |
#15 | core-es6-babel-compile-2818409-15.patch | 3.41 KB | droplet |
Comments
Comment #2
droplet CreditAttribution: droplet commentedIt doesn't EXIT safe. Needs a thought how to keep it simple.
Comment #3
nod_used glob to find all the files, like eslint does.
Comment #4
droplet CreditAttribution: droplet commentedJust don't want to add another package but looking into node_modules. glob has already there. So it's fine.
async, we can simply tell the file is being processed instead
Comment #5
nod_Comment #6
droplet CreditAttribution: droplet commentedthis package won't affected code gen, no locked version is fine.
little space problem which able to fix when it's commit
Thanks nod_!
Comment #7
droplet CreditAttribution: droplet commentedwrong sourcemap, all sourcemaps have same name :s
{"version":3,"sources":["nav-tabs.es6.js"]
Comment #8
droplet CreditAttribution: droplet commentedthis line has problem. use transformFileSync works but I don't understand why.. :S
Comment #9
droplet CreditAttribution: droplet commentedhave a look into Babel source. kind of Closure issue. I think it's a bug in Babel. Never expected it works that way.
Comment #10
nod_yup, that works now, nice catch. I guess not mutating function parameters is important :)
Comment #11
nod_Tested on a windows box. It works.
Comment #12
star-szrSeems like a very clear win. I tested by doing (from
core
):Ran a lot faster than the previous script and with lots more feedback. The older way also didn't exit out after finishing for me.
For me, the older script also didn't generate the names in the source map whereas the node one does.
Should this new dependency have a specific version string like the others?
Comment #13
droplet CreditAttribution: droplet commentedwith ^, there's no APIs breaking changes usually. My thought is to let it up-to-date and fix any system/nodejs problem.
(Note: we won't lock the NODE version)
Comment #14
droplet CreditAttribution: droplet commentedComment #15
droplet CreditAttribution: droplet commentedWe don't need babel-cli anymore.
Comment #16
nod_Comment #17
alexpottNeeds a reroll.
Comment #18
nod_Renamed
babel-es6-compile.js
tobabel-es6-build.js
to follow the name of the npm script.Comment #19
joelpittetThanks that name was also hard to spot in the patch because
.sh
turned to.js
at first glance.Tested via commands in #12
Comment #20
alexpottCommitted 87cf922 and pushed to 8.3.x. Thanks!