mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03: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
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
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
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rimraf material && ts-node -T tools/build --optimize",
|
"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",
|
"build:dirty": "ts-node -T tools/build --dirty",
|
||||||
"clean": "rimraf material",
|
"clean": "rimraf material",
|
||||||
"check": "run-p check:*",
|
"check": "run-p check:*",
|
||||||
|
@ -25,6 +25,8 @@ import * as fs from "fs/promises"
|
|||||||
import {
|
import {
|
||||||
EMPTY,
|
EMPTY,
|
||||||
Observable,
|
Observable,
|
||||||
|
concatAll,
|
||||||
|
filter,
|
||||||
from,
|
from,
|
||||||
fromEvent,
|
fromEvent,
|
||||||
identity,
|
identity,
|
||||||
@ -33,7 +35,6 @@ import {
|
|||||||
map,
|
map,
|
||||||
mergeWith,
|
mergeWith,
|
||||||
of,
|
of,
|
||||||
switchMap,
|
|
||||||
tap
|
tap
|
||||||
} from "rxjs"
|
} from "rxjs"
|
||||||
import glob from "tiny-glob"
|
import glob from "tiny-glob"
|
||||||
@ -108,7 +109,14 @@ export function resolve(
|
|||||||
return from(glob(pattern, options))
|
return from(glob(pattern, options))
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(() => EMPTY),
|
catchError(() => EMPTY),
|
||||||
switchMap(files => files),
|
concatAll(),
|
||||||
|
|
||||||
|
/* Build overrides */
|
||||||
|
!process.argv.includes("--all")
|
||||||
|
? filter(file => !file.startsWith("overrides/"))
|
||||||
|
: identity,
|
||||||
|
|
||||||
|
/* Start file watcher */
|
||||||
options?.watch
|
options?.watch
|
||||||
? mergeWith(watch(pattern, options))
|
? mergeWith(watch(pattern, options))
|
||||||
: identity
|
: identity
|
||||||
|
@ -342,6 +342,12 @@ const schema$ = merge(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/* Build overrides */
|
||||||
|
const overrides$ =
|
||||||
|
process.argv.includes("--all")
|
||||||
|
? merge(index$, schema$)
|
||||||
|
: EMPTY
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------------
|
/* ----------------------------------------------------------------------------
|
||||||
* Program
|
* Program
|
||||||
* ------------------------------------------------------------------------- */
|
* ------------------------------------------------------------------------- */
|
||||||
@ -350,7 +356,7 @@ const schema$ = merge(
|
|||||||
const build$ =
|
const build$ =
|
||||||
process.argv.includes("--dirty")
|
process.argv.includes("--dirty")
|
||||||
? merge(templates$, sources$)
|
? merge(templates$, sources$)
|
||||||
: concat(assets$, merge(templates$, sources$, index$, schema$))
|
: concat(assets$, merge(templates$, sources$, overrides$))
|
||||||
|
|
||||||
/* Let's get rolling */
|
/* Let's get rolling */
|
||||||
build$.subscribe()
|
build$.subscribe()
|
||||||
|
Loading…
Reference in New Issue
Block a user