Npm remove test folders for production

Asked

Viewed 33 times

0

npm Prune --Production removes the devDependencies packages. Is there any way that it also deletes project folders that I don’t want in production, like my "spec" test folder?

1 answer

1


The default I use to remove the test folder for production is to add the folder tests to the file . gitignore in the specific branchs for deploy.

  • 1

    This is exactly what I was looking for. Actually, this does not solve for the npm Prune --Production command. From what I have tested, it keeps the folders of . npmignore even after running the command. But this solves for my npm repository. It does not download files from . npmignore when running npm install

Browser other questions tagged

You are not signed in. Login or sign up in order to post.