* fix: Add Api challenges - Chinese translation * fix: md formatting * fix: md formatting
1.4 KiB
1.4 KiB
id, title, localeTitle, challengeType
id | title | localeTitle | challengeType |
---|---|---|---|
587d7fb5367417b2b2512c04 | Remove a Package from Your Dependencies | 从您的依赖项中删除一个包 | 2 |
Description
0
现在,您已经通过使用package.json的dependencies-section测试了一些可以管理项目依赖关系的方法。您已将外部包添加到文件中,甚至通过使用特殊字符作为代字号(〜)或插入符号(^)告诉npm您需要哪些类型的版本。 0
但是如果你想删除不再需要的外部包呢?您可能已经猜到了 - 只需从依赖项中删除相应的“key”:value对。 0
同样的方法也适用于删除package.json中的其他字段0
说明0
从依赖项中删除包时刻。 0
删除后确保您有相同数量的逗号。
Instructions
Tests
tests:
- text: '“依赖”不应该包括“时刻”'
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/_api/package.json'').then(data => { var packJson = JSON.parse(data); assert.notProperty(packJson.dependencies, ''moment'', ''"dependencies" still includes "moment"''); }, xhr => { throw new Error(xhr.responseText); })'
Challenge Seed
Solution
// solution required