Skip to content

Commit

Permalink
[fix] Use ignoreFiles to properly attempt to parse a .jitsuignore
Browse files Browse the repository at this point in the history
… file. Fixes #83.
  • Loading branch information
indexzero committed Feb 3, 2013
1 parent 23e6821 commit 95ede48
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions lib/jitsu/package.js
Expand Up @@ -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);
});
});
};

Expand Down

0 comments on commit 95ede48

Please sign in to comment.