Comments (9)
I also use typescript-eslint, and the great thing is that it doesn't require TypeScript as a dependency. You can safely move it to devDependencies. In the current published version, it occupies the most space
Just for precision, I'm referring to https://www.npmjs.com/package/@typescript-eslint/typescript-estree which is definitely a required runtime dependency for skott
, (this has nothing to do with linting which for sure belongs to the devDeps field).
@typescript-eslint/typescript-estree
definitely requires TypeScript at runtime (for the parser API that TypeScript provides) but was not explicitly embedding it in its own dependencies, hence the fact of skott having it listed in prod deps.
But for regarding @typescript-eslint/eslint-plugin
and @typescript-eslint/parser
(linting related), these one definitely need to get rid of there! I'm not really sure why this is there and how it could have survived there for so much time :D thanks for the heads up, I'm fixing that
from skott.
Thank you, @antoine-coulon!
Adding skott as a development dependency to my backend project only increases the size of the "node_modules" folder by 28 MB as most of dependencies are reused.
from skott.
Additionally, I believe it makes sense to consider splitting Skott into two separate packages: Skott-cli and Skott-webapp. Skott-cli could be utilized in CI processes without requiring the installation of the entire web application. This could streamline development workflow and resource usage
from skott.
Hello @dec0dOS, thanks a lot for the kind words and for opening that issue!
You're completely right, 544MB is absurd. Most of this comes indeed from a big mistake from me, I forgot to move everything related to the web app in "devDependencies", so there is almost 400MB that we can get rid of right away and very easily as all the dependencies are already inlined in the bundle shipped with skott-webapp
🤦♂️
I'm opening a PR right away for that in the first place.
Additionally, I believe it makes sense to consider splitting Skott into two separate packages: Skott-cli and Skott-webapp. Skott-cli could be utilized in CI processes without requiring the installation of the entire web application. This could streamline development workflow and resource usage
Conceptually that's indeed correct, but given that skott-webapp
will only be shipped with its bundle which is currently around 1,25MB (unzipped), in my opinion this would not really be worth it regarding the cost of the DX (requiring one package install) for something that I believe most skott users will use.
dist/index.html 0.71 kB │ gzip: 0.39 kB
dist/assets/index-2f10dd52.css 1.62 kB │ gzip: 0.83 kB
dist/assets/buttons.esm-48f94bc9.js 19.22 kB │ gzip: 6.64 kB
dist/assets/index-b0284b85.js 1,221.83 kB │ gzip: 363.73 kB
There was already a step in that direction I did in #45 to reduce skott's core, but this was for less used display modes no representing most of the use cases.
I believe TypeScript should be placed in devDependencies instead.
Yes indeed TypeScript is huge (50MB), from what I can remember this was required by the TypeScript parser I'm currently using that is https://github.com/typescript-eslint/typescript-eslint
, but I might be mistaken so I'll reinvestigate and drop TypeScript from runtime dependencies as well.
With TypeScript + without skott-webapp
dependencies we would be around 100MB for skott, without TypeScript this would be even better, around 50MB.
I'll let you know how it goes!
from skott.
@dec0dOS I just published a new version of the web app 2.0.1
that should importantly reduce the node_modules size. You can update skott
as the new version is in the compatible range of updates or just take the [email protected]
.
For "typescript" dependency on skott
side, I'll investigate to be check whether we can get rid of it as well.
Also, could you provide me the tool name that you're using to provide a detailed view of node_modules size please? :)
from skott.
@dec0dOS, I just tested on my own machine with only [email protected]
installed it seems that [email protected]
divided by 3,6 the size of the node_modules:
❯ du -sh node_modules
520M node_modules
[email protected] or [email protected]
❯ du -sh node_modules
144M node_modules
So it nearly reduces the whole tree size by 400MB.
from skott.
Hello @dec0dOS, thanks a lot for the kind words and for opening that issue!
You're completely right, 544MB is absurd. Most of this comes indeed from a big mistake from me, I forgot to move everything related to the web app in "devDependencies", so there is almost 400MB that we can get rid of right away and very easily as all the dependencies are already inlined in the bundle shipped with
skott-webapp
🤦♂️I'm opening a PR right away for that in the first place.
Thank you for the quick response! I truly value your efforts.
Yes indeed TypeScript is huge (50MB), from what I can remember this was required by the TypeScript parser I'm currently using that is https://github.com/typescript-eslint/typescript-eslint, but I might be mistaken so I'll reinvestigate and drop TypeScript from runtime dependencies as well.
I also use typescript-eslint
, and the great thing is that it doesn't require TypeScript as a dependency. You can safely move it to devDependencies. In the current published version, it occupies the most space:
I believe it makes sense to also move @typescript-eslint, @babel, and @eslint to devDependencies. You can also consider moving all the other dependencies that aren't directly imported in the Skott to devDependencies. Skott itself can be a handy tool for investigation! 😄
Also, could you provide me the tool name that you're using to provide a detailed view of node_modules size please? :)
Sadly, that is macOS-only application called DaisyDisk
.
However, for other platforms, I mainly rely on ncdu
.
from skott.
@dec0dOS just published [email protected]
with proper deps declarations and the total size is now 94MB with the second PR.
So from the beginning it basically reduced node_modules size from 520MB to 94MB with low effort, thanks to your heads up, nice!
from skott.
You're welcome and I'm glad to hear that you're using skott 👌
from skott.
Related Issues (20)
- Allow "import { type X }" to be part of the "typeOnly" tracking process
- webapp display mode throws error in wsl HOT 9
- Failed to Resolve with index.tsx files HOT 3
- Support imports map in package.json HOT 1
- Feature request: group modules in visualizaton using project structure HOT 28
- Refresh application HOT 5
- Resolving paths using path aliases HOT 10
- It's so useful, just to express my gratitude. HOT 1
- Feature request: call graph HOT 1
- Feature Request: Allow path grouping to visualize relationships between monorepo packages as a whole HOT 6
- Introduce diagnostics collection to monitor performance
- fs-tree-structure is using a lodash.set that has high severity vulnerability! HOT 2
- Issue installing `[email protected]` with pnpm HOT 2
- Can support for vue projects be added? HOT 1
- provde option to ignore barrel files HOT 7
- Ship a bundled and standalone version of skott's cli
- process.chdir does not affect working directory used by skott for creating node id paths HOT 21
- Resolving "import type" statements HOT 3
- Watch mode not always working HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skott.