Node.js/npm/版本号码:修订间差异
来自康健生活
| 第38行: | 第38行: | ||
# or | # or | ||
node -e "try {console.log(require('./node_modules/<pkg>/package.json').version)} catch (e){''}" | node -e "try {console.log(require('./node_modules/<pkg>/package.json').version)} catch (e){''}" | ||
</syntaxhighlight>|$|/home/kwy}} | |||
测试 | |||
{{Shc_out|<syntaxhighlight lang="bash"> | |||
node -e "try {console.log(require('./node_modules/@postlab/component-rest/package.json').version)} catch (e){''}" | |||
</syntaxhighlight>|<syntaxhighlight lang="bash">0.0.7 | |||
</syntaxhighlight>|$|/home/kwy}} | </syntaxhighlight>|$|/home/kwy}} | ||