-
Notifications
You must be signed in to change notification settings - Fork 103
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
reduce npm package file size 95% #309
Conversation
Thank you for the PR. The approach looks logical to me. Some comments:
@gfx any ideas? |
I noticed doc is not bundled now. I think doc folder is higher priority than example and web. |
👍 |
src/doc/style.css is needed for --doc mode. |
TypeScript doesn't contain any document: $ tar -tf typescript-1.0.0.tgz
package/package.json
package/.npmignore
package/CopyrightNotice.txt
package/LICENSE.txt
package/README.txt
package/ThirdPartyNoticeText.txt
package/bin/tsc.js
package/bin/typescript.js
package/bin/lib.d.ts
package/bin/resources/it/diagnosticMessages.generated.json
(omit)
package/bin/resources/zh/tw/diagnosticMessages.generated.json
package/bin/tsc |
I fix a commit a little. |
CoffeeScript doesn't have document too: $ tar -tf coffee-script-1.7.1.tgz
package/package.json
package/.npmignore
package/README
package/LICENSE
package/register.js
package/CNAME
package/CONTRIBUTING.md
package/bin/cake
package/bin/coffee
package/lib/coffee-script/browser.js
(skip)
package/lib/coffee-script/nodes.js |
Fix pull-request. I moved start codes(src/js) to lib/js-startup. |
I added bin/jsx-profile-viewer command. It is a webserver only for profiling. Final tgz file size become s 342kB. |
Thank you for the PR. Looks promising.
|
PS. I noticed that FYI. related documentation is here http://jsx.github.io/doc/profiler.html |
I updated all. I missed default port is specified in Makefile not server.js (I have noticed default port in server.js (5000) is different from document (2012)). Now it is 2012. |
Thank you for the hard work! I think we are almost done. The last thing I would like to request is to fix profiler crash when accessing the document root (i.e. http://localhost:2012/).
IMO, the profile page is at |
BTW, I have created a separate branch at https://github.com/jsx/JSX/commits/kazuho/experiments/jsx-profile-server. It would be great if you could from now on push changes related to the profile-server stuff to this branch. The diffs from the changes made in feature/diet-npm-package are:
PS. I have stripped off the work related to the profile server to PR #313 |
Oh, and travis has found a problem. https://travis-ci.org/jsx/JSX/builds/22453387 |
Sorrry for the mess. To summarize, we need to do the following:
|
Rebased. This branch can be merged with fast-forward marge again. |
As said, adding necessary tests is mandatory to get this branch merged. Are you working on the issue or want others to help?
|
I need Perl hacker's help > < |
Thank you for the response. Will look into it. |
Merged to master. @shibukawa Thank you for your cooperation. I would appreciate it if you would not rebase the code after review since it takes the context of the review away. Splitting commits to smaller chunks, explaining each change as their commit messages would also help. |
Remove files they seem not to be needed for npm package user.
File size becomes 5MB to 250KB.
npm uses node-tar package that is a pure JavaScript tar archiver. It is extremely slower than native tar command. Smaller file size is better for users.