Package file ignores common node runtime files.
This patch adds common files used by a node runtime environment to the eslint ignore list. Change-Id: Idc8dcce68947d3965ddd128180a5260dc5d6e36f
This commit is contained in:
@@ -72,6 +72,15 @@
|
||||
pkgBuilder.fromJSON(fs.read(packagePath));
|
||||
}
|
||||
|
||||
// Add files that should be ignored overall.
|
||||
projectBuilder.ignoreFile('node_modules');
|
||||
// NPM execution failures.
|
||||
projectBuilder.ignoreFile('npm-debug.log');
|
||||
// If you unzip something generated by npm pack, this is the directory it ends up in.
|
||||
projectBuilder.ignoreFile('package');
|
||||
// Local .npm cache
|
||||
projectBuilder.ignoreFile('.npm');
|
||||
|
||||
return generator;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,17 @@
|
||||
var output = JSON.parse(pkgBuilder.toJSON());
|
||||
expect(output.name).toBe('foo');
|
||||
});
|
||||
|
||||
it('should add several files to the ignore list.',
|
||||
function () {
|
||||
pkg.init(mockGenerator);
|
||||
|
||||
var ignoredFiles = projectBuilder.getIgnoredFiles();
|
||||
expect(ignoredFiles.indexOf('node_modules')).not.toBe(-1);
|
||||
expect(ignoredFiles.indexOf('npm-debug.log')).not.toBe(-1);
|
||||
expect(ignoredFiles.indexOf('package')).not.toBe(-1);
|
||||
expect(ignoredFiles.indexOf('.npm')).not.toBe(-1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('prompt()', function () {
|
||||
|
||||
Reference in New Issue
Block a user