0524$ npm i jQuery npm WARN deprecated jQuery@1.7.4: This is deprecated. Please use 'jquery' (all lowercase). npm WARN saveError ENOENT: no such file or directory, open '/Volumes/Code/test/0524/package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open '/Volumes/Code/test/0524/package.json' npm WARN 0524 No description npm WARN 0524 No repository field. npm WARN 0524 No README data npm WARN 0524 No license field.
+ jQuery@1.7.4 added 1 package from 1 contributor in 0.298s
其实很简单, 发布前在package.json中添加一个字段 deprecated,就可以了
1 2 3 4 5 6
// package.json
{ ... "deprecated":"This is deprecated. Please use 'jquery' (all lowercase)." }