samedi 18 février 2017

Big NPM repo - need to put large testsuite in separate project?

I have an NPM project (let's call it "X") that's pushing 15K lines. The testsuite for the project is probably close to 4K lines. The tests are all in the test folder. I'd like to avoid publishing the test directory to NPM so people don't have to install the extra 4K+ lines of code. This will save diskspace and make people happy because I can advertise a smaller footprint.

I think there's a couple of options:

  1. In the past I tried deleting folders when pushing to master on Github and to NPM - this was a version control nightmare when trying to merge hotfixes back into development (as far as my experience dictates). I don't think I want to revisit this. Deleting the test directory when moving to the master branch might be a disaster.

  2. I can move the tests to an entirely different NPM project. This seems like a much better idea. However, I am not sure how to do this exactly.

Does anyone have experience with this and is there a good solution? Maybe a 3rd way?

Aucun commentaire:

Enregistrer un commentaire