Files
freeCodeCamp/curriculum/challenges/chinese/05-apis-and-microservices/managing-packages-with-npm/add-a-license-to-your-package.json.chinese.md
Oliver Eyton-Williams 61460c8601 fix: insert blank line after ```
search and replace ```\n< with ```\n\n< to ensure there's an empty line
before closing tags
2020-08-16 04:45:20 +05:30

1.4 KiB
Raw Blame History

id, title, localeTitle, challengeType
id title localeTitle challengeType
587d7fb4367417b2b2512bfe Add a License to Your package.json 向package.json添加许可证 2

Description

0许可证字段用于通知项目用户他们可以使用它做什么。 0开源项目的一些常见许可证包括MIT和BSD。如果您想了解更多适合您项目的许可证http//choosealicense.com是一个很好的资源。 0不需要许可证信息。大多数国家/地区的版权法都将授予您默认创建的所有权。但是,明确说明用户可以做什么和不做什么总是一个好习惯。 0示例 "license": "MIT", 0说明0如果您认为合适请填写Glitch项目的package.json中的license-field。

Instructions

Tests

tests:
  - text: package.json应该有一个有效的“许可证”密钥
    testString: 'getUserInput => $.get(getUserInput(''url'') + ''/_api/package.json'').then(data => { var packJson = JSON.parse(data); assert(packJson.license, ''"license" is missing''); }, xhr => { throw new Error(xhr.responseText); })'

Challenge Seed

Solution

// solution required

/section>