Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包(我们称之为create-foo),我的用户应该始终使用npm init foo. 问题是,如果用户之前运行过该命令,它永远不会更新它。我知道用户可以运行npm init foo@latest,但有没有办法改变包的默认行为?即有没有办法让一个包指定它总是希望检查远程版本?
create-foo
npm init foo
npm init foo@latest