mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-03-31 06:33:51 -04:00
Move building of overrides into new task 'build:all'
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user