We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为了避免混淆,建议将package.json里的快站配置项平移到kuaizhan.json:
package.json
kuaizhan.json
main
scripts
bin
dependencies
node.js
npm link/installrun
The text was updated successfully, but these errors were encountered:
实际上。我们只是名称上有一些混淆,快站的package.json 都是在 project 目录下的,应该还不会影响node.js 的package.json 吧。
您可以稍微给点示例,如果确实影响很大,我们会即刻更新
Sorry, something went wrong.
例如测试的配置文件可能为:
{ ... "api": "test.api.sohu.com" ... }
而线上的配置文件为:
{ ... "api": "api.sohu.com" ... }
这样就造成我们有两个配置文件,假如需要更新express主版本号,或者添加依赖:
express
$ npm rm express --save; npm install express --save $ npm install async --save
这时测试环境的dependencies已经发生改变,为了保证线上环境配置文件的**_正确**_且**同步**,现有的配置方式只能是手动去修改线上的package.json吗?
当然,像express这种只有后端才会用到的module可能不会出现在dependencies里面,但是如果是一些前后端公用的库呢?例如debug、async、engine.io-client等。
debug
async
engine.io-client
No branches or pull requests
为了避免混淆,建议将
package.json
里的快站配置项平移到kuaizhan.json
:package.json
会被npm和node处理,例如main
、scripts
、bin
、dependencies
,将这两个文件混淆不利于将来扩展modulekuaizhan.json
即可node.js
开发者而言,切换package.json
,可能会造成npm link/installrun
的结果不一致The text was updated successfully, but these errors were encountered: