insin / nwb

A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)
Other
5.57k stars 331 forks source link

moduleBuild task deletes coverage directory #492

Open kiranps opened 6 years ago

kiranps commented 6 years ago

This issue is a:

when we run npm run test:coverage && npm run build coverage directory get deleted.

In CI (travis) coveralls is executed in after_success section at that time there will be no coverage folder which fails coveralls

after looking throught the code i found that when we build web-module or react-component module it runs moduleBuild function which runs cleanModule function, this deletes the coverage folder.

if this bug is confirmed i would like to submit a pull request

insin commented 4 years ago

I'm thinking build commands should only clean up directories they generate, so we should add support for something like a --keep-coverage flag to the clean commands and pass it when calling them from build commands.