Skip to content

Commit 7448453

Browse files
committed
chore: add project arg to base64 script
1 parent 2aac57d commit 7448453

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

packages/platform/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build-dependencies": {
88
"executor": "nx:run-commands",
99
"options": {
10-
"commands": ["yarn util:base64-data"]
10+
"commands": ["yarn util:base64-data --project=platform"]
1111
}
1212
},
1313
"build": {

packages/site/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"commands": [
1111
"tsc --project tools/executors/tsconfig.json",
1212
"tsc --project packages/site/executors/tsconfig.json",
13-
"yarn util:base64-data"
13+
"yarn util:base64-data --project=site"
1414
]
1515
}
1616
},

tools/base64-data.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import path from 'path';
33
import { outputFileSync, readdirSync, readFileSync, statSync } from 'fs-extra';
44
import { createStream } from 'table';
55

6-
const ROOT_PATH = path.join(__dirname, '..');
6+
let project = process.argv.find((arg) => arg.includes('--project'));
7+
if (project) {
8+
project = project.slice('--project='.length);
9+
}
10+
const ROOT_PATH = path.join(__dirname, '..', project ? `packages/${project}` : '.');
711
const OUT_FILE = 'base64.out.ts';
812

913
const table = createStream({

0 commit comments

Comments
 (0)