@brillout/docpress 0.1.1 → 0.1.3

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.
@@ -0,0 +1,8 @@
1
+ // cli/configFile.ts
2
+ import { createRequire } from "module";
3
+ var require2 = createRequire(import.meta.url);
4
+ var configFile = require2.resolve("../../vite.config.ts");
5
+
6
+ export {
7
+ configFile
8
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configFile
3
- } from "./chunk-Y3OKG4SS.js";
3
+ } from "./chunk-KZROB63P.js";
4
4
  export {
5
5
  configFile
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configFile
3
- } from "./chunk-Y3OKG4SS.js";
3
+ } from "./chunk-KZROB63P.js";
4
4
 
5
5
  // cli/devServer.ts
6
6
  import express from "express";
package/dist/cli/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import {
2
- __spreadProps,
3
- __spreadValues,
4
2
  configFile
5
- } from "./chunk-Y3OKG4SS.js";
3
+ } from "./chunk-KZROB63P.js";
6
4
 
7
5
  // cli/index.ts
8
6
  import { build, preview } from "vite";
@@ -23,13 +21,17 @@ async function cli() {
23
21
  disableAutoFullBuild: true
24
22
  }
25
23
  };
26
- await build(__spreadValues({}, commonConfig));
27
- await build(__spreadProps(__spreadValues({}, commonConfig), { build: { ssr: true } }));
24
+ await build({ ...commonConfig });
25
+ await build({ ...commonConfig, build: { ssr: true } });
28
26
  await prerender({ viteConfig: { configFile } });
29
27
  } else if (isPreview) {
30
28
  const server = await preview({ configFile, preview: { host: true } });
31
29
  server.printUrls();
32
30
  } else {
33
- throw new Error(`DocPress: unknown command \`$ docpress ${args.join(" ")}\`. Known commands: \`$ docpress dev\` and \`$ docpress preview\`.`);
31
+ throw new Error(
32
+ `DocPress: unknown command \`$ docpress ${args.join(
33
+ " "
34
+ )}\`. Known commands: \`$ docpress dev\` and \`$ docpress preview\`.`
35
+ );
34
36
  }
35
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "exports": {
5
5
  ".": "./src/index.ts",
6
6
  "./client/initFeatureList": {
@@ -2,6 +2,7 @@ import { assert } from '../../utils'
2
2
 
3
3
  addTwitterWidgets()
4
4
  addFeatureClickHandlers()
5
+ window.__docpress_hydrationFinished = true
5
6
 
6
7
  function addTwitterWidgets() {
7
8
  loadScript('https://platform.twitter.com/widgets.js')
@@ -59,3 +60,7 @@ function loadScript(scriptUrl: string): void {
59
60
  function getComputedStyle(el: HTMLElement, styleProp: string) {
60
61
  return window.document.defaultView!.getComputedStyle(el).getPropertyValue(styleProp)
61
62
  }
63
+
64
+ declare global {
65
+ var __docpress_hydrationFinished: undefined | true
66
+ }
@@ -9,6 +9,4 @@ export * from './Note'
9
9
  export * from './ImportMeta'
10
10
  export * from './features/FeatureList'
11
11
  export * from './HorizontalLine'
12
- export * from './ContactUs'
13
- export * from './TextContactUs'
14
12
  export * from './Sponsors'
@@ -1,30 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
-
21
- // cli/configFile.ts
22
- import { createRequire } from "module";
23
- var require2 = createRequire(import.meta.url);
24
- var configFile = require2.resolve("../../vite.config.ts");
25
-
26
- export {
27
- __spreadValues,
28
- __spreadProps,
29
- configFile
30
- };
@@ -1,19 +0,0 @@
1
- import React from 'react'
2
- import { TextContactUs } from './TextContactUs'
3
-
4
- export { ContactUs }
5
-
6
- function ContactUs({ text }: { text: string }) {
7
- const style: React.CSSProperties = {
8
- fontSize: '1.5em',
9
- textAlign: 'center',
10
- margin: 'auto',
11
- padding: 'var(--header-padding)',
12
- maxWidth: 'var(--header-max-width)'
13
- }
14
- return (
15
- <p style={style}>
16
- {text} <TextContactUs />
17
- </p>
18
- )
19
- }
@@ -1,15 +0,0 @@
1
- import React from 'react'
2
- import { usePageContext } from '../renderer/usePageContext'
3
-
4
- export { TextContactUs }
5
-
6
- function TextContactUs() {
7
- const pageContext = usePageContext()
8
- const { projectInfo } = pageContext.config
9
- return (
10
- <>
11
- <a href={projectInfo.discordInvite}>Join our Discord</a> or{' '}
12
- <a href={projectInfo.githubIssues}>open a GitHub ticket</a>.
13
- </>
14
- )
15
- }