gpt4 book ai didi

javascript - 为什么有些 npm 包以 @ 开头?

转载 作者:IT老高 更新时间:2023-10-28 21:59:03 51 4
gpt4 key购买 nike

@开头的依赖有什么不同吗?

这是否意味着或暗示什么?我没有看到任何有关此的信息。看看我的 node_modules 文件夹: folder view

Fortawesome@ 开头,不包含典型的 fortawesome.css 文件。那么是一样的吗?还是 @ 表示什么?

这是我的 package.json:

{
"name": "ng-frontend",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"@fortawesome/fontawesome": "^1.1.4",
"animate.css": "^3.6.1",
"bootstrap": "^4.0.0",
"core-js": "^2.4.1",
"jasny-bootstrap": "^3.1.3",
"jquery": "^3.3.1",
"popper.js": "^1.12.9",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular/cli": "~1.7.2",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
}
}

这个问题与 Angular 无关。

最佳答案

If a package's name begins with @, then it is a scoped package. The scope is everything in between the @ and the slash

@scope/project-name

如何初始化作用域包

要创建范围包,您只需使用以您的范围开头的包名称。

{
"name": "@username/project-name"
}

更多详情,请访问scoped package

What does "@" symbol mean in "import { Component } from '@angular/core';" statement?

关于javascript - 为什么有些 npm 包以 @ 开头?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49151868/

51 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com