【问题标题】:What does the at sign, or '@', mean as a prefix to an angular module as a package name?作为包名称的角度模块的前缀,at 符号或“@”是什么意思?
【发布时间】:2016-12-27 06:51:18
【问题描述】:

在我的 `package.json' 文件中,似乎所有 Angular 依赖项都以 @ 为前缀。这是什么意思?例如

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

为什么不像下面那样,没有@?

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

【问题讨论】:

标签: angularjs packages


【解决方案1】:

npm 有两种类型的模块:

  • 全局模块 - npm install mypackage
  • Scoped modules - npm install @myorg/mypackage

作用域是一种将相关包组合在一起的方式,它也会影响 npm 处理包的方式。

【讨论】:

    猜你喜欢
    • 2017-04-01
    • 2017-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多