@stacksjs/docs 0.64.6 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.js.map +5 -5
- package/package.json +14 -25
- package/src/index.ts +14 -8
- package/src/plugins.ts +1 -1
- package/src/scripts/pwa.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{alias as
|
|
2
|
+
import{alias as m}from"@stacksjs/alias";import{kolorist as s}from"@stacksjs/cli";import{docs as p}from"@stacksjs/config";import{path as r}from"@stacksjs/path";import{server as h}from"@stacksjs/server";import{withPwa as j}from"@vite-pwa/vitepress";import{defineConfig as y}from"vitepress";var e="0.65.0";import{docs as t}from"@stacksjs/config";import{frameworkPath as c}from"@stacksjs/path";var g="https://fonts.googleapis.com",D="https://fonts.gstatic.com",I="https://fonts.googleapis.com/css2?family=Readex+Pro:wght@200;400;600&display=swap",O="https://stacksjs.org/",q="https://stacksjs.org/og.png",x="https://github.com/stacksjs/stacks",z="https://github.com/stacksjs/stacks/releases",A="https://github.com/stacksjs/stacks/blob/main/CONTRIBUTING.md",C="https://chat.stacksjs.org",G="https://twitter.com/stacksjs",H=["https://fonts.googleapis.com","https://fonts.gstatic.com"],J=["https://fonts.googleapis.com","https://fonts.gstatic.com"],i=new RegExp("^https://fonts.googleapis.com/.*","i"),d=new RegExp("^https://fonts.gstatic.com/.*","i"),u=/^https:\/\/((i.ibb.co)|((raw|user-images).githubusercontent.com))\/.*/i;var b={outDir:c("docs/dist"),registerType:"autoUpdate",manifest:{id:"/",name:t.title,short_name:t.title,description:t.description,theme_color:"#ffffff",start_url:"/",lang:"en-US",dir:"ltr",orientation:"natural",display:"standalone",display_override:["window-controls-overlay"],categories:["development","developer tools"],icons:[{src:"pwa-64x64.png",sizes:"64x64",type:"image/png"},{src:"pwa-192x192.png",sizes:"192x192",type:"image/png"},{src:"pwa-512x512.png",sizes:"512x512",type:"image/png",purpose:"any"},{src:"maskable-icon.png",sizes:"512x512",type:"image/png",purpose:"maskable"}],screenshots:[{src:"og.png",sizes:"2258x1185",type:"image/png",label:`Screenshot of ${t.title}`}],handle_links:"preferred",launch_handler:{client_mode:["navigate-existing","auto"]},edge_side_panel:{preferred_width:480}},workbox:{navigateFallbackDenylist:[/^\/new$/],maximumFileSizeToCacheInBytes:3145728,globPatterns:["**/*.{css,js,html,png,svg,ico,txt,woff2,json}"],dontCacheBustURLsMatching:/^assets\//,runtimeCaching:[{urlPattern:i,handler:"CacheFirst",options:{cacheName:"google-fonts-cache",expiration:{maxEntries:10,maxAgeSeconds:31536000},cacheableResponse:{statuses:[0,200]}}},{urlPattern:d,handler:"CacheFirst",options:{cacheName:"gstatic-fonts-cache",expiration:{maxEntries:10,maxAgeSeconds:31536000},cacheableResponse:{statuses:[0,200]}}},{urlPattern:u,handler:"CacheFirst",options:{cacheName:"githubusercontent-images-cache",expiration:{maxEntries:10,maxAgeSeconds:31536000},cacheableResponse:{statuses:[0,200]}}}]},experimental:{includeAllowlist:!0}};import{transformerTwoslash as X}from"vitepress-plugin-twoslash";import Z from"vitepress-plugin-twoslash/client";var E={base:"/docs/",cleanUrls:!0,srcDir:r.projectPath("docs"),outDir:r.storagePath("framework/docs"),cacheDir:r.storagePath("framework/cache/docs"),assetsDir:"/assets",vite:{envDir:r.projectPath(),envPrefix:"FRONTEND_",server:h({type:"docs"}),resolve:{alias:m},plugins:[{name:"stacks-plugin",configureServer(k){k.printUrls=()=>{console.log(` ${s.blue(s.bold("STACKS"))} ${s.blue(e)}`),console.log(` ${s.green("\u279C")} ${s.bold("Docs")}: ${s.green("https://stacks.localhost/docs")}`),console.log(` ${s.green("\u279C")} ${s.bold("Temp URL")}: ${s.green("http://stacksjs.test:3000")}`)}}}]},pwa:b},n={...E,...p},B=j(y(n)),ts=B;export{G as twitter,X as transformerTwoslash,z as releases,i as pwaFontsRegex,d as pwaFontStylesRegex,b as pwaDocs,H as preconnectLinks,J as preconnectHomeLinks,O as ogUrl,q as ogImage,D as gstatic,g as googleapis,u as githubusercontentRegex,x as github,E as frameworkDefaults,I as font,C as discord,ts as default,A as contributing,Z as TwoSlashFloatingVue};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=216563848A3B960164756E2164756E21
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/scripts/pwa.ts", "../src/meta.ts", "../src/plugins.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { alias } from '@stacksjs/alias'\nimport { kolorist as c } from '@stacksjs/cli'\nimport { docs } from '@stacksjs/config'\nimport { path as p } from '@stacksjs/path'\nimport { server } from '@stacksjs/server'\nimport { withPwa } from '@vite-pwa/vitepress'\nimport { defineConfig } from 'vitepress'\nimport
|
|
6
|
-
"import {
|
|
5
|
+
"import type { ViteDevServer } from 'vite'\nimport type { DefaultTheme, UserConfigExport, UserConfig as VitePressConfig } from 'vitepress'\nimport { alias } from '@stacksjs/alias'\nimport { kolorist as c } from '@stacksjs/cli'\nimport { docs } from '@stacksjs/config'\nimport { path as p } from '@stacksjs/path'\nimport { server } from '@stacksjs/server'\nimport { withPwa } from '@vite-pwa/vitepress'\nimport { defineConfig } from 'vitepress'\nimport { version } from '../package.json'\nimport { pwaDocs as pwa } from './scripts/pwa'\n\nexport const frameworkDefaults: VitePressConfig = {\n base: '/docs/',\n cleanUrls: true,\n srcDir: p.projectPath('docs'),\n outDir: p.storagePath('framework/docs'),\n cacheDir: p.storagePath('framework/cache/docs'),\n assetsDir: '/assets',\n // sitemap: {\n // hostname: 'stacks.localhost',\n // },\n\n vite: {\n envDir: p.projectPath(),\n envPrefix: 'FRONTEND_',\n\n server: server({\n type: 'docs',\n }),\n\n resolve: {\n alias,\n },\n\n plugins: [\n {\n name: 'stacks-plugin',\n configureServer(server: ViteDevServer) {\n // const base = server.config.base || '/'\n // const _print = server.printUrls\n server.printUrls = () => {\n // eslint-disable-next-line no-console\n console.log(` ${c.blue(c.bold('STACKS'))} ${c.blue(version)}`)\n\n // console.log(` ${c.green('➜')} ${c.bold('Docs')}: ${c.green('http://stacks.localhost:3000/docs')}`)\n // eslint-disable-next-line no-console\n console.log(` ${c.green('➜')} ${c.bold('Docs')}: ${c.green('https://stacks.localhost/docs')}`)\n // eslint-disable-next-line no-console\n console.log(` ${c.green('➜')} ${c.bold('Temp URL')}: ${c.green('http://stacksjs.test:3000')}`)\n }\n },\n },\n ],\n },\n\n pwa,\n}\n\nconst combinedConfig: VitePressConfig = {\n ...frameworkDefaults,\n ...docs,\n}\n\nexport * from './meta'\nexport * from './plugins'\nexport * from './scripts/pwa'\n\nconst conf: Promise<UserConfigExport<DefaultTheme.Config>> = withPwa(defineConfig(combinedConfig))\n\nexport default conf\n",
|
|
6
|
+
"import type { PwaOptions } from '@vite-pwa/vitepress'\nimport { docs } from '@stacksjs/config'\nimport { frameworkPath } from '@stacksjs/path'\nimport { githubusercontentRegex, pwaFontsRegex, pwaFontStylesRegex } from '../meta'\n\nexport const pwaDocs: PwaOptions = {\n outDir: frameworkPath('docs/dist'),\n registerType: 'autoUpdate',\n // include all static assets under public/\n manifest: {\n id: '/',\n name: docs.title,\n short_name: docs.title,\n description: docs.description,\n theme_color: '#ffffff',\n start_url: '/',\n lang: 'en-US',\n dir: 'ltr',\n orientation: 'natural',\n display: 'standalone',\n display_override: ['window-controls-overlay'],\n categories: ['development', 'developer tools'],\n icons: [\n {\n src: 'pwa-64x64.png',\n sizes: '64x64',\n type: 'image/png',\n },\n {\n src: 'pwa-192x192.png',\n sizes: '192x192',\n type: 'image/png',\n },\n {\n src: 'pwa-512x512.png',\n sizes: '512x512',\n type: 'image/png',\n purpose: 'any',\n },\n {\n src: 'maskable-icon.png',\n sizes: '512x512',\n type: 'image/png',\n purpose: 'maskable',\n },\n ],\n screenshots: [\n {\n src: 'og.png',\n sizes: '2258x1185',\n type: 'image/png',\n label: `Screenshot of ${docs.title}`,\n },\n ],\n handle_links: 'preferred',\n launch_handler: {\n client_mode: ['navigate-existing', 'auto'],\n },\n edge_side_panel: {\n preferred_width: 480,\n },\n },\n workbox: {\n navigateFallbackDenylist: [/^\\/new$/],\n // warning: sponsors/antfu.svg is 2.51 MB, and won't be precached\n maximumFileSizeToCacheInBytes: 3 * 1024 * 1024, // <== 3MB\n globPatterns: ['**/*.{css,js,html,png,svg,ico,txt,woff2,json}'],\n // Rollup 4 change the layout: don't calculate revision (hash)\n dontCacheBustURLsMatching: /^assets\\//,\n runtimeCaching: [\n {\n urlPattern: pwaFontsRegex,\n handler: 'CacheFirst',\n options: {\n cacheName: 'google-fonts-cache',\n expiration: {\n maxEntries: 10,\n maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days\n },\n cacheableResponse: {\n statuses: [0, 200],\n },\n },\n },\n {\n urlPattern: pwaFontStylesRegex,\n handler: 'CacheFirst',\n options: {\n cacheName: 'gstatic-fonts-cache',\n expiration: {\n maxEntries: 10,\n maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days\n },\n cacheableResponse: {\n statuses: [0, 200],\n },\n },\n },\n {\n urlPattern: githubusercontentRegex,\n handler: 'CacheFirst',\n options: {\n cacheName: 'githubusercontent-images-cache',\n expiration: {\n maxEntries: 10,\n maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days\n },\n cacheableResponse: {\n statuses: [0, 200],\n },\n },\n },\n ],\n },\n experimental: {\n includeAllowlist: true,\n },\n}\n",
|
|
7
7
|
"// noinspection ES6PreferShortImport: IntelliJ IDE hint to avoid warning to use `~/contributors`, will fail on build if changed\n\n/* Texts */\n// export const stacksName = 'Stacks'\n// export const stacksShortName = 'Stacks'\n// export const stacksDescription = 'Rapid application, cloud & library development framework'\n\n/* CDN fonts and styles */\nexport const googleapis = 'https://fonts.googleapis.com'\nexport const gstatic = 'https://fonts.gstatic.com'\nexport const font = `${googleapis}/css2?family=Readex+Pro:wght@200;400;600&display=swap`\n\n/* vitepress head */\nexport const ogUrl = 'https://stacksjs.org/'\nexport const ogImage = `${ogUrl}og.png`\n\n/* GitHub and social links */\nexport const github = 'https://github.com/stacksjs/stacks'\nexport const releases = 'https://github.com/stacksjs/stacks/releases'\nexport const contributing = 'https://github.com/stacksjs/stacks/blob/main/CONTRIBUTING.md'\nexport const discord = 'https://chat.stacksjs.org'\nexport const twitter = 'https://twitter.com/stacksjs'\n\n/* Avatar/Image/Sponsors servers */\nexport const preconnectLinks = [googleapis, gstatic]\nexport const preconnectHomeLinks = [googleapis, gstatic]\n\n/* PWA runtime caching urlPattern regular expressions */\nexport const pwaFontsRegex = new RegExp(`^${googleapis}/.*`, 'i')\nexport const pwaFontStylesRegex = new RegExp(`^${gstatic}/.*`, 'i')\nexport const githubusercontentRegex = /^https:\\/\\/((i.ibb.co)|((raw|user-images).githubusercontent.com))\\/.*/i\n",
|
|
8
|
-
"import { transformerTwoslash } from 'vitepress-plugin-twoslash'\nimport TwoSlashFloatingVue from 'vitepress-plugin-twoslash/client'\n\nexport {
|
|
8
|
+
"import { transformerTwoslash } from 'vitepress-plugin-twoslash'\nimport TwoSlashFloatingVue from 'vitepress-plugin-twoslash/client'\n\nexport { transformerTwoslash, TwoSlashFloatingVue }\n"
|
|
9
9
|
],
|
|
10
|
-
"mappings": ";
|
|
11
|
-
"debugId": "
|
|
10
|
+
"mappings": "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",
|
|
11
|
+
"debugId": "216563848A3B960164756E2164756E21",
|
|
12
12
|
"names": []
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/docs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.65.0",
|
|
5
5
|
"description": "The Stacks way to document.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
|
+
"contributors": ["Chris Breuer <chris@stacksjs.org>"],
|
|
7
8
|
"license": "MIT",
|
|
8
9
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
|
9
10
|
"homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/docs#readme",
|
|
@@ -15,12 +16,7 @@
|
|
|
15
16
|
"bugs": {
|
|
16
17
|
"url": "https://github.com/stacksjs/stacks/issues"
|
|
17
18
|
},
|
|
18
|
-
"keywords": [
|
|
19
|
-
"docs",
|
|
20
|
-
"utilities",
|
|
21
|
-
"functions",
|
|
22
|
-
"stacks"
|
|
23
|
-
],
|
|
19
|
+
"keywords": ["docs", "utilities", "functions", "stacks"],
|
|
24
20
|
"exports": {
|
|
25
21
|
".": {
|
|
26
22
|
"bun": "./src/index.ts",
|
|
@@ -33,30 +29,23 @@
|
|
|
33
29
|
},
|
|
34
30
|
"module": "dist/index.js",
|
|
35
31
|
"types": "dist/index.d.ts",
|
|
36
|
-
"
|
|
37
|
-
"Chris Breuer <chris@stacksjs.org>"
|
|
38
|
-
],
|
|
39
|
-
"files": [
|
|
40
|
-
"README.md",
|
|
41
|
-
"dist",
|
|
42
|
-
"src"
|
|
43
|
-
],
|
|
32
|
+
"files": ["README.md", "dist", "src"],
|
|
44
33
|
"scripts": {
|
|
45
|
-
"build": "bun
|
|
46
|
-
"typecheck": "bun
|
|
34
|
+
"build": "bun build.ts",
|
|
35
|
+
"typecheck": "bun tsc --noEmit",
|
|
47
36
|
"prepublishOnly": "bun run build"
|
|
48
37
|
},
|
|
49
38
|
"dependencies": {
|
|
50
|
-
"@stacksjs/alias": "
|
|
51
|
-
"@stacksjs/config": "
|
|
52
|
-
"@stacksjs/path": "
|
|
53
|
-
"@stacksjs/server": "
|
|
54
|
-
"vitepress": "1.
|
|
39
|
+
"@stacksjs/alias": "0.64.6",
|
|
40
|
+
"@stacksjs/config": "0.64.6",
|
|
41
|
+
"@stacksjs/path": "0.64.6",
|
|
42
|
+
"@stacksjs/server": "0.64.6",
|
|
43
|
+
"vitepress": "1.4.0",
|
|
55
44
|
"vitepress-plugin-twoslash": "^0.10.2"
|
|
56
45
|
},
|
|
57
46
|
"devDependencies": {
|
|
58
|
-
"@stacksjs/development": "
|
|
59
|
-
"@vite-pwa/assets-generator": "^0.2.
|
|
60
|
-
"@vite-pwa/vitepress": "^0.5.
|
|
47
|
+
"@stacksjs/development": "0.64.6",
|
|
48
|
+
"@vite-pwa/assets-generator": "^0.2.6",
|
|
49
|
+
"@vite-pwa/vitepress": "^0.5.3"
|
|
61
50
|
}
|
|
62
51
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ViteDevServer } from 'vite'
|
|
2
|
+
import type { DefaultTheme, UserConfigExport, UserConfig as VitePressConfig } from 'vitepress'
|
|
1
3
|
import { alias } from '@stacksjs/alias'
|
|
2
4
|
import { kolorist as c } from '@stacksjs/cli'
|
|
3
5
|
import { docs } from '@stacksjs/config'
|
|
@@ -5,17 +7,16 @@ import { path as p } from '@stacksjs/path'
|
|
|
5
7
|
import { server } from '@stacksjs/server'
|
|
6
8
|
import { withPwa } from '@vite-pwa/vitepress'
|
|
7
9
|
import { defineConfig } from 'vitepress'
|
|
8
|
-
import type { UserConfig } from 'vitepress'
|
|
9
10
|
import { version } from '../package.json'
|
|
10
11
|
import { pwaDocs as pwa } from './scripts/pwa'
|
|
11
12
|
|
|
12
|
-
export const frameworkDefaults = {
|
|
13
|
+
export const frameworkDefaults: VitePressConfig = {
|
|
13
14
|
base: '/docs/',
|
|
14
15
|
cleanUrls: true,
|
|
15
16
|
srcDir: p.projectPath('docs'),
|
|
16
17
|
outDir: p.storagePath('framework/docs'),
|
|
17
18
|
cacheDir: p.storagePath('framework/cache/docs'),
|
|
18
|
-
assetsDir:
|
|
19
|
+
assetsDir: '/assets',
|
|
19
20
|
// sitemap: {
|
|
20
21
|
// hostname: 'stacks.localhost',
|
|
21
22
|
// },
|
|
@@ -35,14 +36,17 @@ export const frameworkDefaults = {
|
|
|
35
36
|
plugins: [
|
|
36
37
|
{
|
|
37
38
|
name: 'stacks-plugin',
|
|
38
|
-
configureServer(server) {
|
|
39
|
+
configureServer(server: ViteDevServer) {
|
|
39
40
|
// const base = server.config.base || '/'
|
|
40
41
|
// const _print = server.printUrls
|
|
41
42
|
server.printUrls = () => {
|
|
43
|
+
// eslint-disable-next-line no-console
|
|
42
44
|
console.log(` ${c.blue(c.bold('STACKS'))} ${c.blue(version)}`)
|
|
43
45
|
|
|
44
46
|
// console.log(` ${c.green('➜')} ${c.bold('Docs')}: ${c.green('http://stacks.localhost:3000/docs')}`)
|
|
47
|
+
// eslint-disable-next-line no-console
|
|
45
48
|
console.log(` ${c.green('➜')} ${c.bold('Docs')}: ${c.green('https://stacks.localhost/docs')}`)
|
|
49
|
+
// eslint-disable-next-line no-console
|
|
46
50
|
console.log(` ${c.green('➜')} ${c.bold('Temp URL')}: ${c.green('http://stacksjs.test:3000')}`)
|
|
47
51
|
}
|
|
48
52
|
},
|
|
@@ -51,15 +55,17 @@ export const frameworkDefaults = {
|
|
|
51
55
|
},
|
|
52
56
|
|
|
53
57
|
pwa,
|
|
54
|
-
}
|
|
58
|
+
}
|
|
55
59
|
|
|
56
|
-
const
|
|
60
|
+
const combinedConfig: VitePressConfig = {
|
|
57
61
|
...frameworkDefaults,
|
|
58
62
|
...docs,
|
|
59
63
|
}
|
|
60
64
|
|
|
65
|
+
export * from './meta'
|
|
61
66
|
export * from './plugins'
|
|
62
67
|
export * from './scripts/pwa'
|
|
63
|
-
export * from './meta'
|
|
64
68
|
|
|
65
|
-
|
|
69
|
+
const conf: Promise<UserConfigExport<DefaultTheme.Config>> = withPwa(defineConfig(combinedConfig))
|
|
70
|
+
|
|
71
|
+
export default conf
|
package/src/plugins.ts
CHANGED
package/src/scripts/pwa.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { PwaOptions } from '@vite-pwa/vitepress'
|
|
1
2
|
import { docs } from '@stacksjs/config'
|
|
2
3
|
import { frameworkPath } from '@stacksjs/path'
|
|
3
|
-
import
|
|
4
|
-
import { githubusercontentRegex, pwaFontStylesRegex, pwaFontsRegex } from '../meta'
|
|
4
|
+
import { githubusercontentRegex, pwaFontsRegex, pwaFontStylesRegex } from '../meta'
|
|
5
5
|
|
|
6
6
|
export const pwaDocs: PwaOptions = {
|
|
7
7
|
outDir: frameworkPath('docs/dist'),
|