You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.md 1.6 kB

3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ---
  2. id: docs_cli_config
  3. guide: docs_cli
  4. layout: guide
  5. ---
  6. <p class="lead">Manages the yarn configuration files.</p>
  7. ##### `yarn config set <key> <value> [-g|--global]` <a class="toc" id="toc-yarn-config-set-g-global" href="#toc-yarn-config-set-g-global"></a>
  8. Sets the config `key` to a certain `value`.
  9. Example:
  10. ```sh
  11. $ yarn config set init-license BSD-2-Clause
  12. yarn config vx.x.x
  13. success Set "init-license" to "BSD-2-Clause".
  14. ✨ Done in 0.05s.
  15. ```
  16. ##### `yarn config get <key>` <a class="toc" id="toc-yarn-config-get" href="#toc-yarn-config-get"></a>
  17. Echoes the value for a given `key` to `stdout`.
  18. Example:
  19. ```sh
  20. $ yarn config get init-license
  21. BSD-2-Clause
  22. ```
  23. ##### `yarn config delete <key>` <a class="toc" id="toc-yarn-config-delete" href="#toc-yarn-config-delete"></a>
  24. Deletes a given `key` from the config.
  25. Example:
  26. ```sh
  27. $ yarn config delete test-key
  28. yarn config vx.x.x
  29. success Deleted "test-key".
  30. ✨ Done in 0.06s.
  31. ```
  32. ##### `yarn config list` <a class="toc" id="toc-yarn-config-list" href="#toc-yarn-config-list"></a>
  33. Displays the current configuration.
  34. Example:
  35. ```sh
  36. $ yarn config list
  37. yarn config vx.x.x
  38. info yarn config
  39. { 'version-tag-prefix': 'v',
  40. 'version-git-tag': true,
  41. 'version-git-sign': false,
  42. 'version-git-message': 'v%s',
  43. 'init-version': '1.0.0',
  44. 'init-license': 'MIT',
  45. 'save-prefix': '^',
  46. 'ignore-scripts': false,
  47. 'ignore-optional': true,
  48. registry: 'https://registry.yarnpkg.com',
  49. 'user-agent': 'yarn/0.15.0 npm/? node/v6.2.1 darwin x64' }
  50. info npm config
  51. { registry: 'https://registry.npmjs.org/',
  52. '//localhost:4873/:_authToken': 'some-auth-token' }
  53. ✨ Done in 0.05s.
  54. ```

js yarn包管理组件依赖分析

Contributors (1)