|
1
带 @多一级不会和别人重复,比如我有个包叫 hello, 但全局的 hello 已经有人占了,我就可以发在自己名下叫做 @AoEiuV020/hello
|
|
randyoSep 23, 2021
2
最近配置 .npmrc,设置了 registry 为淘宝源,又设置另一个私有包到私有源,发现不带 @ 它就走淘宝源,给私有包加了 @ 再配置,就可以了。这个私有包走私有源,其他包走淘宝源。
|
|
yunyuyuanSep 23, 2021
3
|
|
4
@ 代表是 npm 上的一个组织,也有命名空间的作用
|
|
ayase252Sep 23, 2021
5
避免 npm 包命名冲突。
比如 facebook 上传了个叫 react 的包,其他所有开发者都不能够使用 react 这个名字了。 |
|
cydysmSep 23, 2021
6
https://docs.npmjs.com/cli/v7/using-npm/scope
这个叫 scope 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 means you don't have to worry about someone taking your package name ahead of you. Thus it is also a good way to signal official packages for organizations. |
|
suzicSep 23, 2021 via Android
7
好像是谷歌先这么干的
|
|
dropsioSep 23, 2021
8
一切源于模仿...
|
|
9
什么叫喜欢用 @ ,这不是 npm 中的 scope 定义方式吗,通过这帖子发现不少“知其然不知其所以然”的人
|
|
mightofcodeSep 23, 2021
10
yep
|
|
KouShuiYuSep 23, 2021
11
因为这是 npm 推荐的方式 https://docs.npmjs.com/cli/v7/using-npm/scope
|
|
OliveGlazeSep 24, 2021
13
前端工程化,@表示 scope
至于为啥用 @表示就不清楚了。我只能说 convention 千千万,能找到个常用符号表示就说明这个 convention 是还算是值得一学一用的。 |
|
magicdawnSep 24, 2021
14
|
|
alanhe421Oct 5, 2021
15
scope......
|