-
Notifications
You must be signed in to change notification settings - Fork 428
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
Suggestion: Seperate out the CLI module from core. #131
Comments
Hi @mayank, can you describe your use case a bit more detailed? Normally the CLI lives in the same project and is the |
Same questions and opinion as @DanielRuf. I generally disagree that the core must be separated from the repo. |
Use case here is to use the core without the cli like a npm module to integrate into some other code. Since cli has many overheads the overall package size is huge ~400M. I want to reduce that. You don't need stuff like chokidar, colors, commander, etc. NPM has also done this to it's package, they have seperated out the core from the cli. |
Well the biggest dependency is the Chromium build which is normally downloaded by puppeteer. But you may need this. In this case we would have to maintain two packages or create a mono-repo using the workspace feature of yarn. Also the CLI will likely use the same dependencies as it has to run the same code. I see no difference or improvement by separating this package into multiple packages but I see an increase in maintenance and compatibility issues. |
http://npm.broofa.com/?q=relaxedjs In general such a change would be a breaking change and can be only done for a new major version. |
➜ ReLaXed git:(master) yarn install --production
yarn install v1.15.2
info No lockfile found.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "mermaid > dagre-d3-renderer@0.5.8" has incorrect peer dependency "d3@^4.13.0".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.16.0", while you're on "1.15.2".
info To upgrade, run the following command:
$ brew upgrade yarn
✨ Done in 58.07s.
➜ ReLaXed git:(master) ✗ du -sh node_modules
405M node_modules
➜ ReLaXed git:(master) ✗ du -sh node_modules/* | sort -hr
204M node_modules/puppeteer
64M node_modules/mathjax
17M node_modules/mermaid
9.1M node_modules/csvtojson
7.4M node_modules/core-js
5.8M node_modules/node-sass
5.8M node_modules/@jimp
5.6M node_modules/jsdom
4.8M node_modules/lodash
4.0M node_modules/katex
3.4M node_modules/moment
3.3M node_modules/fsevents
3.3M node_modules/dagre-d3-renderer
3.2M node_modules/jimp
2.6M node_modules/pug
1.9M node_modules/node-gyp
1.9M node_modules/highlight.js
1.8M node_modules/cssstyle
1.6M node_modules/pug-lexer
1.5M node_modules/tar
1.5M node_modules/clean-css
1.3M node_modules/graphlibrary
1.2M node_modules/pug-parser
1.2M node_modules/escodegen
1.2M node_modules/dagre-layout
1.1M node_modules/ajv
1.0M node_modules/d3
1012K node_modules/babel-runtime
... |
We can analyse some of them and try to use only the needed ones in |
okay sounds good. |
I think CLI and core are two different things. CLI is an extension of the core, so the core code needs to be separated from
ReLaXed
repo.What do you guys say? @DanielRuf @benperiton @Zulko @Drew-S
The text was updated successfully, but these errors were encountered: