Easily bump your packages versions

A Web Developer based in Belgium, specialized in PHP & JS development
Search for a command to run...

A Web Developer based in Belgium, specialized in PHP & JS development
No comments yet. Be the first to comment.
I recently needed to collect all changes in one file for reporting purposes. Found this article: https://ratfactor.com/cards/git-diff-with-new-files In case you need something similar on Windows, here

Some projects start with a grand plan. Others start because you just need to read a file without thinking too much about it. That was the case for spread-compat. I needed a common interface for CSV, X

With modern css, you can almost get rid of sass. But there is one last pain point : media queries. Not being able to use variables or an easy, common syntax for typical breakpoints is really annoying. That is, until you meet Media Queries Level 5. I’...

This is a quick article to share this demo I just made. https://codepen.io/lekoalabe/pen/JoPNWpX

Modals are typical UI elements for many web apps. There are countless packages dedicated to that specific features, each framework creating its own variation. Popular frameworks like Bootstrap also have custom code to deal with it. But all this feels...

This is a quick article about configuring a simple yet effective way to manage your scripts. Let's say you are using esbuild, your probably have some kind of build command.
Recently, I added a bump command to make my life easier. The package.json looks something like this
...
"scripts": {
"build": "esbuild --bundle --minify --format=esm --sourcemap mylib.js --outfile=mylib.min.js",
"start": "npm run build -- --servedir=.",
"watch": "npm run build -- --watch",
"bump": "npm run build && npm version patch"
},
...
So now, it's simple as running this when I want to push some updates
npm run bump
npm publish
git push
You can either push the tag or use the GitHub release tool.
By default, npm version will add the "v" prefix to the version. Maybe you don't like that. Simply create a .npmrc with the following line:
tag-version-prefix=""
What if you didn't noticed the prefix so far ? You can remove them easily
git tag -d $(git tag -l "v*")