mirror of
https://github.com/unarray/file-tree-generator.git
synced 2026-07-22 08:40:29 +00:00
Add ignore library
This commit is contained in:
parent
ac42e94e17
commit
385865b103
4 changed files with 13 additions and 1 deletions
|
|
@ -21,6 +21,9 @@
|
|||
],
|
||||
"author": "Unarray",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ignore": "^5.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bluzzi/eslint-config": "^1.1.0",
|
||||
"@electron/remote": "^2.0.10",
|
||||
|
|
@ -29,7 +32,7 @@
|
|||
"obsidian": "latest",
|
||||
"tsconfig-paths": "^4.2.0",
|
||||
"tsup": "^7.2.0",
|
||||
"typescript": "4.7.4"
|
||||
"typescript": "5.2.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
|
|
|
|||
5
src/utils/filter/filter.ts
Normal file
5
src/utils/filter/filter.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import ignore from "ignore";
|
||||
|
||||
export const filter = (items: string[], patterns: string[]): string[] => {
|
||||
return ignore().add(patterns).filter(items);
|
||||
};
|
||||
1
src/utils/filter/index.ts
Normal file
1
src/utils/filter/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./filter";
|
||||
|
|
@ -4,6 +4,9 @@ export default defineConfig((options) => ({
|
|||
entry: {
|
||||
"main": "src/FileTreeGenerator.ts"
|
||||
},
|
||||
noExternal: [
|
||||
"ignore"
|
||||
],
|
||||
minify: !options.watch,
|
||||
format: "cjs",
|
||||
outDir: "./"
|
||||
|
|
|
|||
Loading…
Reference in a new issue