Skip to content

Commit 5f5da97

Browse files
committedDec 19, 2023
feat: Works well :)
1 parent d528a46 commit 5f5da97

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed
 

‎README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# directus-pick
2+
3+
Example:
4+
5+
```bash
6+
yarn node dist/index.js snapshot-staging.yaml snapshot-prod.yaml some_collection
7+
```
8+
9+
or:
10+
11+
```bash
12+
node -r ./.pnp.cjs dist/index.js snapshot-staging.yaml snapshot-prod.yaml some_collection
13+
```

‎src/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ type ISchema = {
1414
async function main() {
1515
program
1616
.name("directus-pick")
17+
.description(
18+
"Pick collections from a Directus schema and merge them within a target/original schema"
19+
)
1720
.argument("<original-schema-file>", "Original Directus schema file")
1821
.argument("<picked-schema-file>", "Directus schema file to be picked")
1922
.argument(

‎tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/* Modules */
2828
"module": "commonjs" /* Specify what module code is generated. */,
2929
"rootDir": "./src/" /* Specify the root folder within your source files. */,
30-
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
30+
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
3131
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
3232
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
3333
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
@@ -52,7 +52,7 @@
5252
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
5353
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
5454
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
55-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
55+
"sourceMap": true /* Create source map files for emitted JavaScript files. */,
5656
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
5757
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
5858
"outDir": "./dist/" /* Specify an output folder for all emitted files. */,

0 commit comments

Comments
 (0)
Please sign in to comment.