@eslinted/defaults 10.9.2 → 10.9.3-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/files/paths/index.d.ts +2 -2
- package/dist/files/paths/index.d.ts.map +1 -1
- package/dist/files/paths/index.js +2 -2
- package/dist/files/paths/index.js.map +1 -1
- package/dist/files/paths/roots.d.ts +2 -0
- package/dist/files/paths/roots.d.ts.map +1 -0
- package/dist/files/paths/roots.js +5 -0
- package/dist/files/paths/roots.js.map +1 -0
- package/dist/files/paths/subdirectories.d.ts +2 -0
- package/dist/files/paths/subdirectories.d.ts.map +1 -0
- package/dist/files/paths/{subfolders.js → subdirectories.js} +2 -2
- package/dist/files/paths/subdirectories.js.map +1 -0
- package/dist/files/scopes/css.d.ts.map +1 -1
- package/dist/files/scopes/css.js +1 -1
- package/dist/files/scopes/css.js.map +1 -1
- package/dist/files/scopes/html.d.ts.map +1 -1
- package/dist/files/scopes/html.js +1 -1
- package/dist/files/scopes/html.js.map +1 -1
- package/dist/files/scopes/js.d.ts.map +1 -1
- package/dist/files/scopes/js.js +1 -1
- package/dist/files/scopes/js.js.map +1 -1
- package/dist/files/scopes/json.d.ts.map +1 -1
- package/dist/files/scopes/json.js +1 -1
- package/dist/files/scopes/json.js.map +1 -1
- package/dist/files/scopes/jsonc.d.ts.map +1 -1
- package/dist/files/scopes/jsonc.js +3 -2
- package/dist/files/scopes/jsonc.js.map +1 -1
- package/dist/files/scopes/mocha.d.ts.map +1 -1
- package/dist/files/scopes/mocha.js +1 -1
- package/dist/files/scopes/mocha.js.map +1 -1
- package/dist/files/scopes/svelte.d.ts.map +1 -1
- package/dist/files/scopes/svelte.js +1 -1
- package/dist/files/scopes/svelte.js.map +1 -1
- package/dist/files/scopes/ts.d.ts.map +1 -1
- package/dist/files/scopes/ts.js +1 -1
- package/dist/files/scopes/ts.js.map +1 -1
- package/dist/files/scopes/yml.js +2 -2
- package/dist/files/scopes/yml.js.map +1 -1
- package/dist/files/utility.d.ts +1 -6
- package/dist/files/utility.d.ts.map +1 -1
- package/dist/files/utility.js +14 -6
- package/dist/files/utility.js.map +1 -1
- package/package.json +1 -1
- package/src/files/paths/index.ts +2 -2
- package/src/files/paths/roots.ts +4 -0
- package/src/files/paths/{subfolders.ts → subdirectories.ts} +1 -1
- package/src/files/scopes/css.ts +1 -1
- package/src/files/scopes/html.ts +1 -1
- package/src/files/scopes/js.ts +1 -1
- package/src/files/scopes/json.ts +1 -1
- package/src/files/scopes/jsonc.ts +3 -2
- package/src/files/scopes/mocha.ts +1 -1
- package/src/files/scopes/svelte.ts +1 -1
- package/src/files/scopes/ts.ts +1 -1
- package/src/files/scopes/yml.ts +2 -2
- package/src/files/utility.ts +31 -14
- package/dist/files/paths/projects.d.ts +0 -2
- package/dist/files/paths/projects.d.ts.map +0 -1
- package/dist/files/paths/projects.js +0 -5
- package/dist/files/paths/projects.js.map +0 -1
- package/dist/files/paths/subfolders.d.ts +0 -2
- package/dist/files/paths/subfolders.d.ts.map +0 -1
- package/dist/files/paths/subfolders.js.map +0 -1
- package/src/files/paths/projects.ts +0 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./roots.js";
|
|
2
|
+
export * from "./subdirectories.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/files/paths/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/files/paths/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./roots.js";
|
|
2
|
+
export * from "./subdirectories.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/files/paths/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/files/paths/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roots.d.ts","sourceRoot":"","sources":["../../../src/files/paths/roots.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,0BAGR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roots.js","sourceRoot":"","sources":["../../../src/files/paths/roots.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,EAAE;IACF,SAAS;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subdirectories.d.ts","sourceRoot":"","sources":["../../../src/files/paths/subdirectories.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,UAO1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subdirectories.js","sourceRoot":"","sources":["../../../src/files/paths/subdirectories.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,KAAK;IACL,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,OAAO;CACR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/css.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/css.ts"],"names":[],"mappings":";AAEA,wBAAkC"}
|
package/dist/files/scopes/css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","sourceRoot":"","sources":["../../../src/files/scopes/css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"css.js","sourceRoot":"","sources":["../../../src/files/scopes/css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/html.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/html.ts"],"names":[],"mappings":";AAEA,wBAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../../src/files/scopes/html.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../../src/files/scopes/html.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/js.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/js.ts"],"names":[],"mappings":";AAEA,wBAAuC"}
|
package/dist/files/scopes/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../../src/files/scopes/js.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../../src/files/scopes/js.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/json.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/json.ts"],"names":[],"mappings":";AAEA,wBAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/files/scopes/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/files/scopes/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonc.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/jsonc.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"jsonc.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/jsonc.ts"],"names":[],"mappings":";AAEA,wBAME"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CreateScope } from "../utility.js";
|
|
2
|
-
export default CreateScope("{
|
|
3
|
-
|
|
2
|
+
export default CreateScope("{jsonc,code-snippets}", {
|
|
3
|
+
files: ["{tsconfig,.vscode/**/*}.json"],
|
|
4
|
+
subdirectories: [".vscode"],
|
|
4
5
|
});
|
|
5
6
|
//# sourceMappingURL=jsonc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonc.js","sourceRoot":"","sources":["../../../src/files/scopes/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CACxB,
|
|
1
|
+
{"version":3,"file":"jsonc.js","sourceRoot":"","sources":["../../../src/files/scopes/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CACxB,uBAAuB,EACvB;IACE,KAAK,EAAE,CAAC,8BAA8B,CAAC;IACvC,cAAc,EAAE,CAAC,SAAS,CAAC;CAC5B,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocha.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/mocha.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"mocha.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/mocha.ts"],"names":[],"mappings":";AAEA,wBAAmD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocha.js","sourceRoot":"","sources":["../../../src/files/scopes/mocha.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"mocha.js","sourceRoot":"","sources":["../../../src/files/scopes/mocha.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/svelte.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/svelte.ts"],"names":[],"mappings":";AAEA,wBAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte.js","sourceRoot":"","sources":["../../../src/files/scopes/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"svelte.js","sourceRoot":"","sources":["../../../src/files/scopes/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/ts.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../../src/files/scopes/ts.ts"],"names":[],"mappings":";AAEA,wBAAuC"}
|
package/dist/files/scopes/ts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../src/files/scopes/ts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../src/files/scopes/ts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CAAC,UAAU,CAAC,CAAC"}
|
package/dist/files/scopes/yml.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yml.js","sourceRoot":"","sources":["../../../src/files/scopes/yml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CACxB,
|
|
1
|
+
{"version":3,"file":"yml.js","sourceRoot":"","sources":["../../../src/files/scopes/yml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAe,WAAW,CACxB,SAAS,EACT;IACE,cAAc,EAAE,CAAC,SAAS,CAAC;CAC5B,CACF,CAAC"}
|
package/dist/files/utility.d.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export declare function CreateScope(
|
|
2
|
-
projects?: string[];
|
|
3
|
-
subfolders?: string[];
|
|
4
|
-
paths?: string[];
|
|
5
|
-
custom?: string[];
|
|
6
|
-
}): string[];
|
|
1
|
+
export declare function CreateScope(extension: string, { files, subdirectories, paths, custom, }?: Partial<Record<"files" | "subdirectories" | "paths" | "custom", string[]>>): string[];
|
|
7
2
|
//# sourceMappingURL=utility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/files/utility.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CACzB,
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/files/utility.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,EACjB,EACE,KAAU,EACV,cAAmB,EACnB,KAAU,EACV,MAAW,GACZ,GAAE,OAAO,CAAC,MAAM,CACb,OAAO,GACP,gBAAgB,GAChB,OAAO,GACP,QAAQ,EACV,MAAM,EAAE,CACT,CAAM,YA+BR"}
|
package/dist/files/utility.js
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function CreateScope(
|
|
3
|
-
function
|
|
4
|
-
|
|
1
|
+
import * as common from "./paths/index.js";
|
|
2
|
+
export function CreateScope(extension, { files = [], subdirectories = [], paths = [], custom = [], } = {}) {
|
|
3
|
+
function glob(common, scoped = []) {
|
|
4
|
+
const elements = [
|
|
5
|
+
...common,
|
|
6
|
+
...scoped,
|
|
7
|
+
]
|
|
8
|
+
.join(",");
|
|
9
|
+
return elements.includes(",") || elements.startsWith(".")
|
|
10
|
+
? `{${elements}}`
|
|
11
|
+
: elements;
|
|
5
12
|
}
|
|
13
|
+
const leaves = glob([`*.${extension}`], files);
|
|
6
14
|
return [
|
|
7
15
|
...[
|
|
8
16
|
"",
|
|
9
|
-
|
|
17
|
+
`${glob(common.roots)}${glob(common.subdirectories, subdirectories)}/**/`,
|
|
10
18
|
...paths.map(path => `${path}/`),
|
|
11
19
|
]
|
|
12
|
-
.map(
|
|
20
|
+
.map(branch => `${branch}${leaves}`),
|
|
13
21
|
...custom,
|
|
14
22
|
];
|
|
15
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/files/utility.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/files/utility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAElC,MAAM,UAAU,WAAW,CACzB,SAAiB,EACjB,EACE,KAAK,GAAG,EAAE,EACV,cAAc,GAAG,EAAE,EACnB,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,EAAE,MAOR,EAAE;IAEP,SAAS,IAAI,CACX,MAAyB,EACzB,SAAmB,EAAE;QAErB,MAAM,QAAQ,GAAG;YACf,GAAG,MAAM;YACT,GAAG,MAAM;SACV;aACE,IAAI,CAAC,GAAG,CAAC,CAAC;QAEb,OAAO,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC;YACvD,CAAC,CAAC,IAAI,QAAQ,GAAG;YACjB,CAAC,CAAC,QAAQ,CAAC;IACf,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CACjB,CAAC,KAAK,SAAS,EAAE,CAAC,EAClB,KAAK,CACN,CAAC;IAEF,OAAO;QACL,GAAG;YACD,EAAE;YACF,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,cAAc,CAAC,MAAM;YACzE,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC;SACjC;aACE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;QACtC,GAAG,MAAM;KACV,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"$schema": "https://json.schemastore.org/package",
|
|
4
4
|
"$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
|
|
5
5
|
"name": "@eslinted/defaults",
|
|
6
|
-
"version": "10.9.
|
|
6
|
+
"version": "10.9.3-rc.0",
|
|
7
7
|
"repository": "github:jimmy-zhening-luo/linted-defaults",
|
|
8
8
|
"private": false,
|
|
9
9
|
"engineStrict": true,
|
package/src/files/paths/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./roots";
|
|
2
|
+
export * from "./subdirectories";
|
package/src/files/scopes/css.ts
CHANGED
package/src/files/scopes/html.ts
CHANGED
package/src/files/scopes/js.ts
CHANGED
package/src/files/scopes/json.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CreateScope } from "../utility";
|
|
2
2
|
|
|
3
3
|
export default CreateScope(
|
|
4
|
-
"{
|
|
4
|
+
"{jsonc,code-snippets}",
|
|
5
5
|
{
|
|
6
|
-
|
|
6
|
+
files: ["{tsconfig,.vscode/**/*}.json"],
|
|
7
|
+
subdirectories: [".vscode"],
|
|
7
8
|
},
|
|
8
9
|
);
|
package/src/files/scopes/ts.ts
CHANGED
package/src/files/scopes/yml.ts
CHANGED
package/src/files/utility.ts
CHANGED
|
@@ -1,30 +1,47 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as common from "./paths";
|
|
2
2
|
|
|
3
3
|
export function CreateScope(
|
|
4
|
-
|
|
4
|
+
extension: string,
|
|
5
5
|
{
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
files = [],
|
|
7
|
+
subdirectories = [],
|
|
8
8
|
paths = [],
|
|
9
9
|
custom = [],
|
|
10
|
-
}:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
paths
|
|
14
|
-
custom
|
|
15
|
-
|
|
10
|
+
}: Partial<Record<
|
|
11
|
+
| "files"
|
|
12
|
+
| "subdirectories"
|
|
13
|
+
| "paths"
|
|
14
|
+
| "custom",
|
|
15
|
+
string[]
|
|
16
|
+
>> = {},
|
|
16
17
|
) {
|
|
17
|
-
function
|
|
18
|
-
|
|
18
|
+
function glob(
|
|
19
|
+
common: readonly string[],
|
|
20
|
+
scoped: string[] = [],
|
|
21
|
+
) {
|
|
22
|
+
const elements = [
|
|
23
|
+
...common,
|
|
24
|
+
...scoped,
|
|
25
|
+
]
|
|
26
|
+
.join(",");
|
|
27
|
+
|
|
28
|
+
return elements.includes(",") || elements.startsWith(".")
|
|
29
|
+
? `{${elements}}`
|
|
30
|
+
: elements;
|
|
19
31
|
}
|
|
20
32
|
|
|
33
|
+
const leaves = glob(
|
|
34
|
+
[`*.${extension}`],
|
|
35
|
+
files,
|
|
36
|
+
);
|
|
37
|
+
|
|
21
38
|
return [
|
|
22
39
|
...[
|
|
23
40
|
"",
|
|
24
|
-
|
|
41
|
+
`${glob(common.roots)}${glob(common.subdirectories, subdirectories)}/**/`,
|
|
25
42
|
...paths.map(path => `${path}/`),
|
|
26
43
|
]
|
|
27
|
-
.map(
|
|
44
|
+
.map(branch => `${branch}${leaves}`),
|
|
28
45
|
...custom,
|
|
29
46
|
];
|
|
30
47
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/files/paths/projects.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,UAGpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../../src/files/paths/projects.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,EAAE;IACF,SAAS;CACV,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subfolders.d.ts","sourceRoot":"","sources":["../../../src/files/paths/subfolders.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,UAOtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subfolders.js","sourceRoot":"","sources":["../../../src/files/paths/subfolders.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK;IACL,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,OAAO;CACR,CAAC"}
|