Skip to content
Browse files

[fix] Use `ignoreFiles` to properly attempt to parse a `.jitsuignore`…

… file. Fixes #83.
  • Loading branch information...
1 parent 23e6821 commit 95ede484e10bee4ff4b1ef57ff88f550cf03e4b1 @indexzero indexzero committed Feb 3, 2013
Showing with 18 additions and 10 deletions.
  1. +18 −10 lib/jitsu/package.js
View
28 lib/jitsu/package.js
@@ -370,16 +370,24 @@ package.createTarball = function (dir, version, callback) {
var name = [jitsu.config.get('username'), pkg.name, version || pkg.version].join('-') + '.tgz',
tarball = path.join(jitsu.config.get('tmproot'), name);
- fstreamNpm({ path: dir })
- .on('error', callback)
- .pipe(tar.Pack())
- .on('error', callback)
- .pipe(zlib.Gzip())
- .on('error', callback)
- .pipe(fstream.Writer({ type: "File", path: tarball }))
- .on('close', function () {
- callback(null, pkg, tarball);
- });
+ fstreamNpm({
+ path: dir,
+ ignoreFiles: [
+ '.jitsuignore',
+ '.npmignore',
+ '.gitignore',
+ 'package.json'
+ ]
+ })
+ .on('error', callback)
+ .pipe(tar.Pack())
+ .on('error', callback)
+ .pipe(zlib.Gzip())
+ .on('error', callback)
+ .pipe(fstream.Writer({ type: "File", path: tarball }))
+ .on('close', function () {
+ callback(null, pkg, tarball);
+ });
});
};

0 comments on commit 95ede48

Please sign in to comment.
Something went wrong with that request. Please try again.