Unify .js filename style to success the minification command - #5131
Unify .js filename style to success the minification command#5131neko314 wants to merge 1 commit into
Conversation
|
Hi @neko314! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Size ChangesDetails📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖 This PR introduced no changes to the javascript bundle 🙌 |
|
let's just use a different link, I made https://gist.github.com/gaearon/ee0201910608f15df3f8cd66aa83f98e instead |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
@gaearon |
34a813d to
39c3f70
Compare
39c3f70 to
7babeef
Compare
|
@gaearon |
In this page: https://gist.github.com/gaearon/42a2ffa41b8319948f9be4076286e1f3 filename is like_button.js. But actual filename in React Doc Beta is like-button.js. This difference caused the command to fail. ``` $ npx terser -c -m -o like_button.min.js -- like_button.js ERROR: ENOENT: no such file or directory, open 'like_button.js' at Object.openSync (node:fs:599:3) at Object.readFileSync (node:fs:467:35) at read_file (/Users/keiko/playground/hello-react/node_modules/terser/dist/bundle.min.js:30065:23) at /Users/keiko/playground/hello-react/node_modules/terser/dist/bundle.min.js:29872:41 at Array.forEach (<anonymous>) at run_cli (/Users/keiko/playground/hello-react/node_modules/terser/dist/bundle.min.js:29871:32) ```
7babeef to
a2429e1
Compare
|
oops! |
I always thank you all to maintain docs or codes.
I recently started to learn React with beta docs.
What's problem
I found the command in gaearon/minification.md fails. This page is referenced from React docs.
The reason of this problem
The reason is why the difference of filename
like_button.jsor like-button.js.The gist uses
like_button.jsbut current React Docs BETA userslike-button.jsWhat I confirmed
Jump.to.new.gist.page.-.30.September.2022.mp4
What I did in this PR
Replace link to new gist. Thank you for your creation.
What I want you to help
Honestly, I can't judge which is better,
like_button.jsorlike-button.jsby my self.I found the style-guide by Google on filename. It says both is OK. It makes me feel more difficult to make a choice by me alone. That means, this PR is appropriate or not. What do you think?