Comments (10)
My point with the sentence you quoted is that it helps with writing more readable code. For a beginner joining a codebase, reading --preset angular
improves understanding.
My earlier point is that we shouldn't assume. We can also ask "why would the user want the es2020
property preserved for production?" and the answer is "we don't know". There could be many bad reasons for it; a lot of people copy-paste code without understanding it.
Anyway, like I said, I'm open to adding it without presets.
from clean-pkg-json.
Im open to supporting 3rd party properties (eg. unpkg
, ember
, etc) via preset
flag:
clean-pkg-json --preset angular -p unpkg
What do you think?
from clean-pkg-json.
In https://github.com/ai/size-limit, it will read all presets automatically. So I think a plugin system would be much easier to use and keep the core slim.
from clean-pkg-json.
Not sure if I understand. What's the relevance of ai/size-limit?
from clean-pkg-json.
Not sure if I understand. What's the relevance of ai/size-limit?
Sorry for the confusion.
I mean, it can read package whether clean-pkg-json-preset-angular
exist, then preset angular
could be used automatically.
from clean-pkg-json.
Not sure if it makes sense to publish & install a package just for 4 strings: ["fesm2020", "fesm2015", "esm2020", "es2020"]
In the case of unpkg, it would be a single string: ["unpkg"]
from clean-pkg-json.
So if there're built-in presets, I have no idea why they should be presets rather than defaults?
from clean-pkg-json.
Good point. I'm open to adding it without presets.
I can't think of real examples but I was thinking if multiple tools use the same package.json property, where one uses it in development and the other in application, the first usage might want that property removed but the second wont.
Aside from that, a benefit would be semantics. It's much easier to understand what's happening:
clean-pkg-json --preset angular
from clean-pkg-json.
Aside from that, a benefit would be semantics. It's much easier to understand what's happening:
clean-pkg-json --preset angular
I still don't understand what's the benefits. If the presets presented, it means the user want it. For example, why would a user add es2020
but don't want it on production?
from clean-pkg-json.
🎉 This issue has been resolved in version 1.2.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from clean-pkg-json.
Related Issues (3)
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 clean-pkg-json.