✔Follow ➡️ @teamcodebean
for more updates.
🔔Turn on post notification to get notify for every post.
📎Tag your picture or use hashtag 👉 #thecodebean
to get featured.
• • • • •
If you work with front-end, same way I do, you might have seen that some packages in package.json have ‘@‘ sign in front of them (check pics in carousel for example 👉).
🤔Why? I was wondering but never really bothered to check.
Now I’m upgrading babel from 6th version to 7th, and stumbled across “Package renames” paragraph, which says that now ‘babel-cli’ package will be named ‘@babel
❓So where is practical difference?
First, I learned that this approach is called “Scoped packages”. Not everyone is aware of that (check twitter poll in carousel for example 👉) Scopes are a way of grouping related packages together, and also affect a few things about the way npm treats the package.
Each npm user/organization has their own scope, and only you can add packages in your scope. ⠀
This helps in various ways:
🦄 a clear separation from community plugins, and a simpler naming convention.
🦄 prevents accidental/intentional name squatting. If all your package names are prefixed as “babel-“, someone might name their package similar way. With purpose to get bigger attention to their package or to put there malicious script there and mask under known name to be downloaded
🦄 prevents official distributers, e.g. of Babel, getting issue reports of people using misnamed or unofficial packages because those people assumed it was part of official Babel.
Did you know of such scoped packages? Did you know what are advantages of using them? I know in other languages some libraries are divided into namespaces, which is a similar concept, am I correct? .
#ui #ux #userinterface #uxdesign #uidesign #workspace #workstation #desksetup #repost #designlife #onmytable #officevibes #userexperience #app #appdesign #dribbble #behance #interface #uidesigner #interfacedesigner #interactiondesign #productdesign #photoshop #sketchapp #uidesignpatterns #designselection #showyourdesk #designspiration #2018