Jitsu currently ignores files in a user's .gitignore and .npmignore files - this can be problematic. A configuration file full of database credentials and API keys doesn't belong on github, for example, but it definitely belongs in a deployment.
As a solution, Jitsu should perhaps have its own ignore file - .jitsuignore?
This is being checked in https://github.com/isaacs/npm/blob/master/lib/utils/tar.js#L431-443 - it would be a simple change in and of itself, except that we'd have to vendor most of npm to do it. Maybe this should be something that npm allows to be configurable?
I just opened npm/npm#1329 in response to this issue - a fix on the npm side of things would make the fix on our end trivial.
Hi. Did anything happen with this? I've just discovered this is a problem.
+1 Same problem here.
+1 spent a lot of time debugging errors and finally realized my .gitignore files were causing some files to not be included.
Please update documentation to explain that files in the .gitignore will be excluded from the deploy. I only found it out digging through the issues.
It would be nice if you could set a preference for each project with the name of the .ignore file, something like in package.json
+3 for me - just ran into this problem as i .gitignore my SSL certs and private keys but of course i want them to be deployed. I'm surprised this is low priority. I ran into this issue within minutes of starting to test nodejitsu for suitability for my project. I now have to get creative again ;)
Assigning this to myself, it needs few changes in fstream-npm which I'll pull request.
Make ignore files configurable
This allows applications to use custom ignore files, example use case
[api] Support `.jitsuignore` file
During packaging application, make `fstream-npm` read `.jitsuignore`
file to find files which should be ignored.
Depends on npm/fstream-npm#3.
Reopening (pushed to a dev branch)
@mmalecki can you update this issue with a synopsis of where we are at in this issue, it seems to me, for now we are pretty satisfied with .npmignore now working. Are we still looking to have our own .jitsuignore file?
[fix] Use `ignoreFiles` to properly attempt to parse a `.jitsuignore`…
… file. Fixes #83.
@blakmatrix I think that's fixed in there, but I'm not sure if fstream-npm will use all ignore files or just the first one.
@indexzero You can put a .npmignore file anywhere, and it'll work, just the same as .gitignore files.
[api] Add `.jitsuignore` support