mirror of
https://github.com/kognise/water.css.git
synced 2025-08-10 15:14:34 +02:00
feat: output styles to docs, so site can use them
This commit is contained in:
@@ -27,14 +27,14 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Startup styles of water.css, so styles don't have to wait until JS is loaded -->
|
<!-- Startup styles of water.css, so styles don't have to wait until JS is loaded -->
|
||||||
<link rel="preload" as="style" href="../dark-legacy.standalone.min.css" />
|
<link rel="preload" as="style" href="./water.css/dark-legacy.standalone.min.css" />
|
||||||
<link
|
<link
|
||||||
rel="preload"
|
rel="preload"
|
||||||
as="style"
|
as="style"
|
||||||
media="(prefers-color-scheme: dark)"
|
media="(prefers-color-scheme: dark)"
|
||||||
href="../dark-legacy.standalone.min.css"
|
href="./water.css/dark-legacy.standalone.min.css"
|
||||||
/>
|
/>
|
||||||
<link rel="stylesheet" id="js-startup-stylesheet" href="../dark-legacy.min.css" />
|
<link rel="stylesheet" id="js-startup-stylesheet" href="./water.css/dark-legacy.min.css" />
|
||||||
|
|
||||||
<!-- Dynamic version of water.css, overwrites startup styles. JavaScript sets & updates href -->
|
<!-- Dynamic version of water.css, overwrites startup styles. JavaScript sets & updates href -->
|
||||||
<link rel="stylesheet" id="js-stylesheet" />
|
<link rel="stylesheet" id="js-stylesheet" />
|
||||||
|
@@ -27,7 +27,7 @@ const queryParams = new URLSearchParams(w.location.search)
|
|||||||
const supportsCssVars = typeof CSS !== 'undefined' && CSS.supports('color', 'var(--clr)')
|
const supportsCssVars = typeof CSS !== 'undefined' && CSS.supports('color', 'var(--clr)')
|
||||||
|
|
||||||
/** The base URI from where the docs page loads the CSS files. */
|
/** The base URI from where the docs page loads the CSS files. */
|
||||||
const DEV_BASE = '../'
|
const DEV_BASE = './water.css/'
|
||||||
/** The base URI from where instructions show to load the CSS files. */
|
/** The base URI from where instructions show to load the CSS files. */
|
||||||
const CDN_BASE = 'https://cdn.jsdelivr.net/gh/kognise/water.css/dist/'
|
const CDN_BASE = 'https://cdn.jsdelivr.net/gh/kognise/water.css/dist/'
|
||||||
|
|
||||||
|
@@ -112,6 +112,9 @@ function style() {
|
|||||||
.pipe(sourcemaps.write('.'))
|
.pipe(sourcemaps.write('.'))
|
||||||
// Write the minified files
|
// Write the minified files
|
||||||
.pipe(gulp.dest(paths.styles.dest))
|
.pipe(gulp.dest(paths.styles.dest))
|
||||||
|
// Output files to docs directory so documentation site can use them
|
||||||
|
.pipe(gulp.dest(paths.docs.dest + '/water.css'))
|
||||||
|
// Final size report including gzipped sizes
|
||||||
.pipe(sizereport({ gzip: true, total: false, title: 'SIZE REPORT' }))
|
.pipe(sizereport({ gzip: true, total: false, title: 'SIZE REPORT' }))
|
||||||
// Stream any changes to browserSync
|
// Stream any changes to browserSync
|
||||||
.pipe(browserSync.stream())
|
.pipe(browserSync.stream())
|
||||||
|
Reference in New Issue
Block a user