docmedown 0.1.7 → 0.1.9
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/cli.js +11 -5
- package/dist/docmedown.cjs +43 -40
- package/dist/docmedown.iife.js +314 -311
- package/dist/docmedown.mjs +7922 -5655
- package/dist/types/runtime/components/Builtins.d.ts +149 -4
- package/dist/types/runtime/markdown/component-body.d.ts +7 -0
- package/dist/types/runtime/markdown/highlighter.d.ts +18 -0
- package/dist/types/runtime/markdown/renderer.d.ts +1 -1
- package/package.json +2 -1
- package/templates/guides/custom-components.md +20 -0
package/dist/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ var import_commander = require("commander");
|
|
|
31
31
|
// package.json
|
|
32
32
|
var package_default = {
|
|
33
33
|
name: "docmedown",
|
|
34
|
-
version: "0.1.
|
|
34
|
+
version: "0.1.9",
|
|
35
35
|
description: "The simplest MarkDown documenter yet. CLI & Web Script React SPA documentation engine.",
|
|
36
36
|
main: "./dist/docmedown.cjs",
|
|
37
37
|
module: "./dist/docmedown.mjs",
|
|
@@ -80,6 +80,7 @@ var package_default = {
|
|
|
80
80
|
test: "npx tsx --test tests/parser.test.ts tests/scanner.test.ts tests/theme-schema.test.ts tests/runtime-integration.test.ts tests/package-smoke.test.ts tests/hosting.test.ts tests/deploy.test.ts tests/home.test.ts",
|
|
81
81
|
"test:artifacts": "npx tsx --test tests/offline-artifact.test.ts",
|
|
82
82
|
"test:release": "npm run typecheck && npm run lint && npm run test && npm run build && npm run build:docs && npm run test:artifacts && npm pack --dry-run",
|
|
83
|
+
login: "npm login",
|
|
83
84
|
deploy: "node ./scripts/deploy.mjs",
|
|
84
85
|
"deploy:dry-run": "npm run deploy -- --dry-run",
|
|
85
86
|
prepublishOnly: "npm run test:release"
|
|
@@ -698,9 +699,12 @@ function collectNestedOfflineSites(targetDir) {
|
|
|
698
699
|
}
|
|
699
700
|
function shouldWatchDocumentationSource(rootDir, changedPath) {
|
|
700
701
|
const relativePath = import_node_path2.default.relative(rootDir, changedPath).replace(/\\/g, "/");
|
|
701
|
-
const
|
|
702
|
+
const segments = relativePath.split("/");
|
|
703
|
+
const firstSegment = segments[0];
|
|
704
|
+
const baseName = segments[segments.length - 1];
|
|
702
705
|
const isCustomComponentModule = /(^|\/)\.dmd\/(components|index)\.js$/i.test(relativePath);
|
|
703
|
-
|
|
706
|
+
const isGeneratedOutput = baseName === ".nojekyll" || GENERATED_DOC_OUTPUTS.includes(baseName) || segments.includes(".dist");
|
|
707
|
+
return Boolean(relativePath) && !relativePath.startsWith("..") && (!relativePath.startsWith(".") || isCustomComponentModule) && !isGeneratedOutput && !GENERATED_DOC_OUTPUTS.includes(relativePath) && firstSegment !== "node_modules" && firstSegment !== "dist";
|
|
704
708
|
}
|
|
705
709
|
async function buildCommand(targetDirArg = "./docs", options = {}) {
|
|
706
710
|
const targetDir = import_node_path2.default.resolve(process.cwd(), targetDirArg);
|
|
@@ -824,10 +828,11 @@ async function watchBuildCommand(targetDirArg = "./docs", options = {}) {
|
|
|
824
828
|
console.log(import_chalk.default.dim(" Source changes rebuild serveable files and .dist/index.html. Press Ctrl+C to stop.\n"));
|
|
825
829
|
const watcher = import_chokidar.default.watch(targetDir, {
|
|
826
830
|
ignored: [
|
|
827
|
-
"**/node_modules/**",
|
|
828
|
-
"**/.git/**",
|
|
829
831
|
"**/dist/**",
|
|
830
832
|
"**/.dist/**",
|
|
833
|
+
"**/node_modules/**",
|
|
834
|
+
"**/.git/**",
|
|
835
|
+
"**/.nojekyll",
|
|
831
836
|
"**/_manifest.json",
|
|
832
837
|
"**/_docs.js",
|
|
833
838
|
"**/docmedown.iife.js"
|
|
@@ -1123,6 +1128,7 @@ function startDevServer(options) {
|
|
|
1123
1128
|
"**/.git/**",
|
|
1124
1129
|
"**/dist/**",
|
|
1125
1130
|
"**/.dist/**",
|
|
1131
|
+
"**/.nojekyll",
|
|
1126
1132
|
"**/_manifest.json",
|
|
1127
1133
|
"**/_docs.js",
|
|
1128
1134
|
"**/docmedown.iife.js"
|