mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-23 23:21:00 +01:00
Move building of overrides into new task 'build:all'
This commit is contained in:
parent
e1546745db
commit
5ddeafbf4e
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
@ -66,12 +66,6 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# - name: Set up QEMU
|
||||
# uses: docker/setup-qemu-action@v1
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
|
@ -25,6 +25,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf material && ts-node -T tools/build --optimize",
|
||||
"build:all": "rimraf material && ts-node -T tools/build --all --optimize",
|
||||
"build:dirty": "ts-node -T tools/build --dirty",
|
||||
"clean": "rimraf material",
|
||||
"check": "run-p check:*",
|
||||
|
@ -25,6 +25,8 @@ import * as fs from "fs/promises"
|
||||
import {
|
||||
EMPTY,
|
||||
Observable,
|
||||
concatAll,
|
||||
filter,
|
||||
from,
|
||||
fromEvent,
|
||||
identity,
|
||||
@ -33,7 +35,6 @@ import {
|
||||
map,
|
||||
mergeWith,
|
||||
of,
|
||||
switchMap,
|
||||
tap
|
||||
} from "rxjs"
|
||||
import glob from "tiny-glob"
|
||||
@ -108,7 +109,14 @@ export function resolve(
|
||||
return from(glob(pattern, options))
|
||||
.pipe(
|
||||
catchError(() => EMPTY),
|
||||
switchMap(files => files),
|
||||
concatAll(),
|
||||
|
||||
/* Build overrides */
|
||||
!process.argv.includes("--all")
|
||||
? filter(file => !file.startsWith("overrides/"))
|
||||
: identity,
|
||||
|
||||
/* Start file watcher */
|
||||
options?.watch
|
||||
? mergeWith(watch(pattern, options))
|
||||
: identity
|
||||
|
@ -342,6 +342,12 @@ const schema$ = merge(
|
||||
)
|
||||
)
|
||||
|
||||
/* Build overrides */
|
||||
const overrides$ =
|
||||
process.argv.includes("--all")
|
||||
? merge(index$, schema$)
|
||||
: EMPTY
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Program
|
||||
* ------------------------------------------------------------------------- */
|
||||
@ -350,7 +356,7 @@ const schema$ = merge(
|
||||
const build$ =
|
||||
process.argv.includes("--dirty")
|
||||
? merge(templates$, sources$)
|
||||
: concat(assets$, merge(templates$, sources$, index$, schema$))
|
||||
: concat(assets$, merge(templates$, sources$, overrides$))
|
||||
|
||||
/* Let's get rolling */
|
||||
build$.subscribe()
|
||||
|
Loading…
Reference in New Issue
Block a user