Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Teknas22746y@jespersh
well the compressed version is 16kb 🤷♂️
I'm storing a colours array for randomly assigning background colours. Maybe that's the culprit. -
Hi!
I cannot test the library, but I have few suggestions in general. They are meant in good intent, even if they sound harsh:
- Choose an open source license, too. Otherwise your library is absolutely not usable for anyone, because no right of usage is given.
- Add proper commit messages - "patch", "patch", "patch" might not be perfect. I made this mistake at my first library, too.
- Clean the repository. I am no JS developer, but in the repository I have no idea where to look for the actual code (am I right with /projects/text-placeholder/src/lib/text-placeholder.directive.ts for the main file and dist/* is the JavaScript output from Typescript? And what is in /src?). Clean it up, distribution files and compilation results aren't usually included in the repository.
- Where's the 88kB coming from? If the file I mentioned previously is the only file of code and this leads to 88kB output, something is wrong. This is not lightweight. -
Teknas22746y@sbiewald
hey thanks a lot for the suggestions.
I'll definately add the license
About the patch thing, I got a little lazy and automated the entire deploy process including the git push.
What I publish to npm is under /dist
Wouldn't it be weird if what is published to npm itself is not available in the repository ? That's why I purposefully override the default .gitignore and removed the dist folder. If any js developer can tell me what is the proper way to do this, that would be great.
About the size thing, will have to check it out. In your opinion, what's lightweight ? -
@Teknas Lightweight is relative :)
About the automated pushes to GitHub: Don't. Without proper commit messages, git has little use. Otherwise you could just publish your source code and a bunch of diffs.
The default .gitignores by GitHub are usually fine, but I would search for a larger project and look what they use. -
Teknas22746y@sbiewald I searched around, the massive size is actually due to the build process, the module is rendered in different compatibility levels and published. This is also considered to be the best practice based on angular guidelines.
When the end user uses this inside another application, treeshaking will ensure only the bare minimal stuff gets in.
Related Rants
-
linuxxx97It was between me and another guy. I fucking won! I GOT THE FUCKING JOB!! I'll be a junior Linux Support...
-
linuxxx8Had my first 'mentor' moment at work today! Newest guy couldn't figure something out and asked me, slightly ...
-
watzon17My wife said the magic words last night! "Teach me to code".
I published my first open source angular module 🚀
Show me some love
https://npmjs.com/package/...
rant
yay