Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tar) don't read .gitignore when have .spmignore
- Loading branch information
Showing
12 changed files
with
70 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules | ||
coverage | ||
build | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ node_modules/ | |
.editorconfig | ||
.travis.yml | ||
.jshintrc | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
lib | ||
test |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "test-ignore", | ||
"version": "0.1.0", | ||
"spm": {} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
'use strict'; | ||
|
||
require('should'); | ||
var join = require('path').join; | ||
var archive = require('ls-archive'); | ||
var tar = require('../lib/tar'); | ||
var rimraf = require('rimraf').sync; | ||
var rename = require('fs').renameSync; | ||
|
||
describe('tar', function() { | ||
|
||
var dir = join(__dirname, './fixtures/tar'); | ||
var tarfile = join(__dirname, './fixtures/tar.tar.gz'); | ||
|
||
beforeEach(function() { | ||
rename(join(dir, 'gitignore'), join(dir, '.gitignore')); | ||
}); | ||
|
||
afterEach(function() { | ||
rename(join(dir, '.gitignore'), join(dir, 'gitignore')); | ||
}); | ||
|
||
it('normal', function(done) { | ||
|
||
tar.create(dir, tarfile, function(err, target) { | ||
|
||
archive.list(target, function(err, files) { | ||
files = files.map(function(f) { | ||
return f.path; | ||
}); | ||
files.should.be.eql(['index.js', 'lib/index.js', 'package.json']); | ||
rimraf(tarfile); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}) |