NPM clean modules

前端 未结 8 603
时光取名叫无心
时光取名叫无心 2020-12-24 00:14

Is there a way to get npm to unbuild all the modules under node_modules? Something like npm rebuild that removes all build artifacts but doesn\'t rebuild them?

8条回答
  •  失恋的感觉
    2020-12-24 00:31

    I added this to my package.json:

    "build": "npm build",
    "clean": "rm -rf node_modules", 
    "reinstall": "npm run clean && npm install", 
    "rebuild": "npm run clean && npm install && npm run build",
    

    Seems to work well.

提交回复
热议问题