Skip to content

Commit

Permalink
Merge pull request #68 from yamadashy/fix/windows-default-ignore
Browse files Browse the repository at this point in the history
Fix default ignore patterns for subdirectories
  • Loading branch information
yamadashy authored Sep 2, 2024
2 parents d0ab56b + 2a000fa commit d53b56e
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/config/defaultIgnore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ export const defaultIgnoreList = [

// Dependency directories
'node_modules/**',
'**/node_modules/**',
'bower_components/**',
'**/bower_components/**',
'jspm_packages/**',
'**/jspm_packages/**',
'vendor/**',
'.bundle/**',
'.gradle/**',
'target/**',

// Logs
'logs/**',
Expand All @@ -34,18 +42,12 @@ export const defaultIgnoreList = [
// Grunt intermediate storage
'.grunt/**',

// Bower dependency directory
'bower_components/**',

// node-waf configuration
'.lock-wscript',

// Compiled binary addons
'build/Release/**',

// Dependency directories
'jspm_packages/**',

// TypeScript v1 declaration files
'typings/**',

Expand Down
4 changes: 2 additions & 2 deletions tests/core/file/fileSearcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('fileSearcher', () => {
const patterns = await getIgnorePatterns(process.cwd(), mockConfig);

expect(patterns.length).toBeGreaterThan(0);
expect(patterns).toContain('node_modules/**');
expect(patterns).toContain('**/node_modules/**');
});

test('should include custom patterns', async () => {
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('fileSearcher', () => {

const patterns = await getIgnorePatterns(process.cwd(), mockConfig);

expect(patterns).toContain('node_modules/**');
expect(patterns).toContain('**/node_modules/**');
expect(patterns).toContain('*.custom');
expect(patterns).toContain('temp/');
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/build/**
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// this file should be ignored
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// this file should be ignored
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ resources/
src/
index.js
utils.js
.repopackignore
package.json
README.md
repopack.config.json
Expand Down Expand Up @@ -96,6 +97,11 @@ module.exports = {
greet,
};

================
File: .repopackignore
================
**/build/**

================
File: package.json
================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ resources/
src/
index.js
utils.js
.repopackignore
package.json
README.md
repopack.config.json
Expand Down Expand Up @@ -88,6 +89,10 @@ module.exports = {
};
</file>

<file path=".repopackignore">
**/build/**
</file>

<file path="package.json">
{
"name": "simple-project",
Expand Down

0 comments on commit d53b56e

Please sign in to comment.