Closed aikar closed 7 years ago
It is possible to ignore these directories with .gitignore but still publish them to NPM.
In package.json under scripts, add:
prepublish: "rm -rf lib dist ; npm run build ; touch dist/.npmignore lib/.npmignore"
This will for 1, auto build anytime you deploy to NPM, but also touches an .npmignore which cancels out the .gitignore for NPM, allowing those folders to be deployed.
See example: https://github.com/aikar/capsule/blob/master/package.json#L12
It is possible to ignore these directories with .gitignore but still publish them to NPM.
In package.json under scripts, add:
This will for 1, auto build anytime you deploy to NPM, but also touches an .npmignore which cancels out the .gitignore for NPM, allowing those folders to be deployed.
See example: https://github.com/aikar/capsule/blob/master/package.json#L12