Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the at sign, or '@', mean as a prefix to an angular module as a package name?

In my `package.json' file, it seems that all the Angular depedencies are prefixed by @. What does this mean? E.g.

"dependencies": {
    "@angular/common": "2.0.0-rc.5",

Why not just as below, with no @?

"dependencies": {
    "angular/common": "2.0.0-rc.5",
like image 424
ProfK Avatar asked Aug 20 '16 04:08

ProfK


People also ask

What does it mean when a package name starts with @?

It allows organizations to make it clear which packages are 'official' and which ones are not. For example, if a package has the scope @angular , you know it was published by the Angular core team.

What is at sign in node JS?

Scoped packages in npm are preceded by an '@' symbol. A scope allows you to create a package with the same name as a package created by another user or Org without conflict. https://docs.npmjs.com/about-scopes.

What does the symbol mean in npm packages?

Major, minor and patch represent the different releases of a package. npm uses the tilde (~) and caret (^) to designate which patch and minor versions to use respectively. So if you see ~1.0. 2 it means to install version 1.0. 2 or the latest patch version such as 1.0.

What is in npm package name?

All npm packages have a name. Some package names also have a scope. A scope follows the usual rules for package names (URL-safe characters, no leading dots or underscores). When used in package names, scopes are preceded by an @ symbol and followed by a slash, e.g.


1 Answers

npm has two types of modules:

  • Global modules - npm install mypackage
  • Scoped modules - npm install @myorg/mypackage

Scopes are a way of grouping related packages together, and also affect a few things about the way npm treats the package.

like image 76
ScottL Avatar answered Nov 16 '22 23:11

ScottL