Skip to content

Commit 5ddeafb

Browse files
committed
Move building of overrides into new task 'build:all'
1 parent e154674 commit 5ddeafb

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ jobs:
6666
- name: Checkout repository
6767
uses: actions/checkout@v3
6868

69-
# - name: Set up QEMU
70-
# uses: docker/setup-qemu-action@v1
71-
72-
# - name: Set up Docker Buildx
73-
# uses: docker/setup-buildx-action@v1
74-
7569
- name: Login to DockerHub
7670
uses: docker/login-action@v1
7771
with:

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
},
2626
"scripts": {
2727
"build": "rimraf material && ts-node -T tools/build --optimize",
28+
"build:all": "rimraf material && ts-node -T tools/build --all --optimize",
2829
"build:dirty": "ts-node -T tools/build --dirty",
2930
"clean": "rimraf material",
3031
"check": "run-p check:*",

tools/build/_/index.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import * as fs from "fs/promises"
2525
import {
2626
EMPTY,
2727
Observable,
28+
concatAll,
29+
filter,
2830
from,
2931
fromEvent,
3032
identity,
@@ -33,7 +35,6 @@ import {
3335
map,
3436
mergeWith,
3537
of,
36-
switchMap,
3738
tap
3839
} from "rxjs"
3940
import glob from "tiny-glob"
@@ -108,7 +109,14 @@ export function resolve(
108109
return from(glob(pattern, options))
109110
.pipe(
110111
catchError(() => EMPTY),
111-
switchMap(files => files),
112+
concatAll(),
113+
114+
/* Build overrides */
115+
!process.argv.includes("--all")
116+
? filter(file => !file.startsWith("overrides/"))
117+
: identity,
118+
119+
/* Start file watcher */
112120
options?.watch
113121
? mergeWith(watch(pattern, options))
114122
: identity

tools/build/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,12 @@ const schema$ = merge(
342342
)
343343
)
344344

345+
/* Build overrides */
346+
const overrides$ =
347+
process.argv.includes("--all")
348+
? merge(index$, schema$)
349+
: EMPTY
350+
345351
/* ----------------------------------------------------------------------------
346352
* Program
347353
* ------------------------------------------------------------------------- */
@@ -350,7 +356,7 @@ const schema$ = merge(
350356
const build$ =
351357
process.argv.includes("--dirty")
352358
? merge(templates$, sources$)
353-
: concat(assets$, merge(templates$, sources$, index$, schema$))
359+
: concat(assets$, merge(templates$, sources$, overrides$))
354360

355361
/* Let's get rolling */
356362
build$.subscribe()

0 commit comments

Comments
 (0)