spec-up-t 1.3.0 → 1.4.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/.github/copilot-instructions.md +13 -0
- package/assets/compiled/body.js +18 -12
- package/assets/compiled/head.css +8 -6
- package/assets/css/collapse-definitions.css +0 -1
- package/assets/css/counter.css +10 -22
- package/assets/css/create-pdf.css +4 -2
- package/assets/css/create-term-filter.css +4 -4
- package/assets/css/definition-buttons-container.css +60 -0
- package/assets/css/{pdf-download.css → download-pdf-docx.css} +9 -5
- package/assets/css/insert-trefs.css +7 -0
- package/assets/css/sidebar-toc.css +2 -1
- package/assets/css/terms-and-definitions.css +73 -22
- package/assets/js/add-href-to-snapshot-link.js +16 -9
- package/assets/js/addAnchorsToTerms.js +2 -2
- package/assets/js/charts.js +10 -0
- package/assets/js/collapse-definitions.js +13 -2
- package/assets/js/collapse-meta-info.js +11 -9
- package/assets/js/definition-button-container-utils.js +82 -0
- package/assets/js/download-pdf-docx.js +68 -0
- package/assets/js/edit-term-buttons.js +77 -20
- package/assets/js/github-issues.js +35 -0
- package/assets/js/github-repo-info.js +144 -0
- package/assets/js/highlight-heading-plus-sibling-nodes.test.js +18 -0
- package/assets/js/insert-trefs.js +62 -13
- package/assets/js/mermaid-diagrams.js +11 -0
- package/assets/js/terminology-section-utility-container/README.md +107 -0
- package/assets/js/terminology-section-utility-container/create-alphabet-index.js +17 -0
- package/assets/js/{create-term-filter.js → terminology-section-utility-container/create-term-filter.js} +11 -44
- package/assets/js/terminology-section-utility-container/hide-show-utility-container.js +21 -0
- package/assets/js/terminology-section-utility-container/search.js +203 -0
- package/assets/js/terminology-section-utility-container.js +203 -0
- package/assets/js/tooltips.js +283 -0
- package/config/asset-map.json +26 -18
- package/index.js +57 -390
- package/package.json +5 -2
- package/src/add-remove-xref-source.js +20 -21
- package/src/collect-external-references.js +8 -337
- package/src/collect-external-references.test.js +440 -33
- package/src/configure.js +8 -109
- package/src/create-docx.js +7 -6
- package/src/create-pdf.js +15 -14
- package/src/freeze-spec-data.js +46 -0
- package/src/git-info.test.js +76 -0
- package/src/health-check/destination-gitignore-checker.js +5 -3
- package/src/health-check/external-specs-checker.js +5 -4
- package/src/health-check/specs-configuration-checker.js +2 -1
- package/src/health-check/term-references-checker.js +5 -3
- package/src/health-check/terms-intro-checker.js +2 -1
- package/src/health-check/tref-term-checker.js +8 -7
- package/src/health-check.js +8 -7
- package/src/init.js +3 -2
- package/src/install-from-boilerplate/add-gitignore-entries.js +3 -2
- package/src/install-from-boilerplate/add-scripts-keys.js +5 -4
- package/src/install-from-boilerplate/boilerplate/.github/workflows/menu.yml +74 -97
- package/src/install-from-boilerplate/boilerplate/README.md +1 -1
- package/src/install-from-boilerplate/boilerplate/spec/example-markup-in-markdown.md +1 -1
- package/src/install-from-boilerplate/boilerplate/spec/spec-head.md +2 -2
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/composability.md +3 -0
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/compost.md +3 -0
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/fertilizer.md +3 -0
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/mulch.md +3 -0
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/pruning.md +3 -0
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/seedling.md +3 -0
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/soil.md +11 -0
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/watering.md +3 -0
- package/src/install-from-boilerplate/boilerplate/specs.json +24 -10
- package/src/install-from-boilerplate/config-scripts-keys.js +3 -3
- package/src/install-from-boilerplate/config-system-files.js +0 -1
- package/src/install-from-boilerplate/copy-boilerplate.js +2 -1
- package/src/install-from-boilerplate/copy-system-files.js +4 -3
- package/src/install-from-boilerplate/custom-update.js +12 -1
- package/src/install-from-boilerplate/help.txt +1 -1
- package/src/install-from-boilerplate/menu.sh +6 -6
- package/src/json-key-validator.js +17 -11
- package/src/markdown-it/README.md +207 -0
- package/src/markdown-it/definition-lists.js +397 -0
- package/src/markdown-it/index.js +83 -0
- package/src/markdown-it/link-enhancement.js +98 -0
- package/src/markdown-it/plugins.js +118 -0
- package/src/markdown-it/table-enhancement.js +97 -0
- package/src/markdown-it/template-tag-syntax.js +152 -0
- package/src/parsers/index.js +16 -0
- package/src/parsers/spec-parser.js +152 -0
- package/src/parsers/spec-parser.test.js +109 -0
- package/src/parsers/template-tag-parser.js +277 -0
- package/src/parsers/template-tag-parser.test.js +107 -0
- package/src/pipeline/configuration/configure-starterpack.js +200 -0
- package/src/{create-external-specs-list.js → pipeline/configuration/create-external-specs-list.js} +13 -12
- package/src/{create-term-index.js → pipeline/configuration/create-term-index.js} +19 -18
- package/src/{create-versions-index.js → pipeline/configuration/create-versions-index.js} +4 -3
- package/src/{insert-term-index.js → pipeline/configuration/insert-term-index.js} +2 -2
- package/src/pipeline/configuration/prepare-spec-configuration.js +70 -0
- package/src/pipeline/parsing/apply-markdown-it-extensions.js +35 -0
- package/src/pipeline/parsing/create-markdown-parser.js +94 -0
- package/src/pipeline/parsing/create-markdown-parser.test.js +49 -0
- package/src/{html-dom-processor.js → pipeline/postprocessing/definition-list-postprocessor.js} +69 -10
- package/src/{escape-handler.js → pipeline/preprocessing/escape-processor.js} +3 -1
- package/src/{fix-markdown-files.js → pipeline/preprocessing/normalize-terminology-markdown.js} +41 -31
- package/src/pipeline/references/collect-external-references.js +307 -0
- package/src/pipeline/references/external-references-service.js +231 -0
- package/src/pipeline/references/fetch-terms-from-index.js +198 -0
- package/src/pipeline/references/match-term.js +34 -0
- package/src/{collectExternalReferences/matchTerm.test.js → pipeline/references/match-term.test.js} +8 -2
- package/src/pipeline/references/process-xtrefs-data.js +94 -0
- package/src/pipeline/references/xtref-utils.js +166 -0
- package/src/pipeline/rendering/render-spec-document.js +146 -0
- package/src/pipeline/rendering/render-utils.js +154 -0
- package/src/utils/LOGGER.md +81 -0
- package/src/utils/{doesUrlExist.js → does-url-exist.js} +4 -3
- package/src/utils/fetch.js +5 -4
- package/src/utils/file-opener.js +3 -2
- package/src/utils/git-info.js +77 -0
- package/src/utils/logger.js +74 -0
- package/src/utils/regex-patterns.js +471 -0
- package/src/utils/regex-patterns.test.js +281 -0
- package/templates/template.html +56 -21
- package/assets/js/create-alphabet-index.js +0 -60
- package/assets/js/hide-show-utility-container.js +0 -16
- package/assets/js/index.js +0 -87
- package/assets/js/pdf-download.js +0 -46
- package/assets/js/search.js +0 -365
- package/src/collectExternalReferences/fetchTermsFromIndex.js +0 -284
- package/src/collectExternalReferences/matchTerm.js +0 -32
- package/src/collectExternalReferences/processXTrefsData.js +0 -108
- package/src/freeze.js +0 -90
- package/src/install-from-boilerplate/boilerplate/.github/workflows/fetch-and-push-xrefs.yml.old +0 -42
- package/src/install-from-boilerplate/boilerplate/.github/workflows/render-specs.yml +0 -47
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/term-1.md +0 -13
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/term-2.md +0 -3
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/term-3.md +0 -3
- package/src/install-from-boilerplate/boilerplate/spec/terms-definitions/term-4.md +0 -3
- package/src/markdown-it-extensions.js +0 -395
- package/src/references.js +0 -114
- /package/assets/css/{bootstrap.min.css → embedded-libraries/bootstrap.min.css} +0 -0
- /package/assets/css/{prism.css → embedded-libraries/prism.css} +0 -0
- /package/assets/css/{prism.dark.css → embedded-libraries/prism.dark.css} +0 -0
- /package/assets/css/{prism.default.css → embedded-libraries/prism.default.css} +0 -0
- /package/assets/js/{bootstrap.bundle.min.js → embedded-libraries/bootstrap.bundle.min.js} +0 -0
- /package/assets/js/{chart.js → embedded-libraries/chart.js} +0 -0
- /package/assets/js/{diff.min.js → embedded-libraries/diff.min.js} +0 -0
- /package/assets/js/{font-awesome.js → embedded-libraries/font-awesome.js} +0 -0
- /package/assets/js/{mermaid.js → embedded-libraries/mermaid.js} +0 -0
- /package/assets/js/{notyf.js → embedded-libraries/notyf.js} +0 -0
- /package/assets/js/{popper.js → embedded-libraries/popper.js} +0 -0
- /package/assets/js/{prism.dark.js → embedded-libraries/prism.dark.js} +0 -0
- /package/assets/js/{prism.default.js → embedded-libraries/prism.default.js} +0 -0
- /package/assets/js/{prism.js → embedded-libraries/prism.js} +0 -0
- /package/assets/js/{tippy.js → embedded-libraries/tippy.js} +0 -0
- /package/src/{escape-mechanism.js → pipeline/preprocessing/escape-placeholder-utils.js} +0 -0
- /package/src/utils/{isLineWithDefinition.js → is-line-with-definition.js} +0 -0
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const { fetchTermsFromIndex, fetchAllTermsFromIndex } = require('./fetchTermsFromIndex.js');
|
|
3
|
-
const { matchTerm } = require('./matchTerm.js');
|
|
4
|
-
const { addPath, getPath, getAllPaths } = require('../../config/paths');
|
|
5
|
-
const path = require('path');
|
|
6
|
-
|
|
7
|
-
// Directory to store fetched data files
|
|
8
|
-
const CACHE_DIR = getPath('githubcache');
|
|
9
|
-
|
|
10
|
-
async function processXTrefsData(allXTrefs, GITHUB_API_TOKEN, outputPathJSON, outputPathJS, outputPathJSTimeStamped) {
|
|
11
|
-
try {
|
|
12
|
-
// Ensure the directory exists, so that we can store the fetched data
|
|
13
|
-
if (!fs.existsSync(CACHE_DIR)) {
|
|
14
|
-
fs.mkdirSync(CACHE_DIR, { recursive: true });
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Filter out incomplete xtrefs that don't have proper repository information
|
|
18
|
-
allXTrefs.xtrefs = allXTrefs.xtrefs.filter(xtref => {
|
|
19
|
-
if (!xtref.owner || !xtref.repo || !xtref.repoUrl) {
|
|
20
|
-
console.log(`⚠️ Removing incomplete reference: ${xtref.externalSpec}, ${xtref.term}`);
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
return true;
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
// Group xtrefs by repository to avoid multiple downloads of the same index.html
|
|
27
|
-
const xrefsByRepo = allXTrefs.xtrefs.reduce((groups, xtref) => {
|
|
28
|
-
const repoKey = `${xtref.owner}/${xtref.repo}`;
|
|
29
|
-
if (!groups[repoKey]) {
|
|
30
|
-
groups[repoKey] = {
|
|
31
|
-
owner: xtref.owner,
|
|
32
|
-
repo: xtref.repo,
|
|
33
|
-
xtrefs: []
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
groups[repoKey].xtrefs.push(xtref);
|
|
37
|
-
return groups;
|
|
38
|
-
}, {});
|
|
39
|
-
|
|
40
|
-
console.log(`✅ Grouped ${allXTrefs.xtrefs.length} terms into ${Object.keys(xrefsByRepo).length} repositories`);
|
|
41
|
-
|
|
42
|
-
// Process each repository once
|
|
43
|
-
for (const repoKey of Object.keys(xrefsByRepo)) {
|
|
44
|
-
const repoGroup = xrefsByRepo[repoKey];
|
|
45
|
-
console.log(`Processing repository: ${repoKey} (${repoGroup.xtrefs.length} terms)`);
|
|
46
|
-
|
|
47
|
-
// Get the GitHub Pages URL from the first xtref in this repo group
|
|
48
|
-
const ghPageUrl = repoGroup.xtrefs[0]?.ghPageUrl;
|
|
49
|
-
|
|
50
|
-
// First, fetch all terms from this repository
|
|
51
|
-
const allTermsData = await fetchAllTermsFromIndex(
|
|
52
|
-
GITHUB_API_TOKEN,
|
|
53
|
-
repoGroup.owner,
|
|
54
|
-
repoGroup.repo,
|
|
55
|
-
{
|
|
56
|
-
ghPageUrl: ghPageUrl // Pass the GitHub Pages URL
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
if (!allTermsData) {
|
|
61
|
-
console.log(`❌ Could not fetch terms from repository ${repoKey}`);
|
|
62
|
-
// Mark all terms from this repo as not found
|
|
63
|
-
repoGroup.xtrefs.forEach(xtref => {
|
|
64
|
-
xtref.commitHash = "not found";
|
|
65
|
-
xtref.content = "This term was not found in the external repository.";
|
|
66
|
-
xtref.avatarUrl = null;
|
|
67
|
-
});
|
|
68
|
-
continue; // Skip to next repository
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Now process each term in this repository
|
|
72
|
-
for (const xtref of repoGroup.xtrefs) {
|
|
73
|
-
// Find the term in the pre-fetched data
|
|
74
|
-
const foundTerm = allTermsData.terms.find(
|
|
75
|
-
t => t.term.toLowerCase() === xtref.term.toLowerCase()
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
if (foundTerm) {
|
|
79
|
-
xtref.commitHash = allTermsData.sha;
|
|
80
|
-
xtref.content = foundTerm.definition;
|
|
81
|
-
xtref.avatarUrl = allTermsData.avatarUrl;
|
|
82
|
-
console.log(`✅ Match found for term: ${xtref.term} in ${xtref.externalSpec}`);
|
|
83
|
-
} else {
|
|
84
|
-
xtref.commitHash = "not found";
|
|
85
|
-
xtref.content = "This term was not found in the external repository.";
|
|
86
|
-
xtref.avatarUrl = null;
|
|
87
|
-
console.log(`ℹ️ No match found for term: ${xtref.term} in ${xtref.externalSpec}`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
console.log(`✅ Finished processing repository: ${repoKey}`);
|
|
92
|
-
console.log("============================================\n\n");
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const allXTrefsStr = JSON.stringify(allXTrefs, null, 2);
|
|
96
|
-
fs.writeFileSync(outputPathJSON, allXTrefsStr, 'utf8');
|
|
97
|
-
const stringReadyForFileWrite = `const allXTrefs = ${allXTrefsStr};`;
|
|
98
|
-
fs.writeFileSync(outputPathJS, stringReadyForFileWrite, 'utf8');
|
|
99
|
-
fs.writeFileSync(outputPathJSTimeStamped, stringReadyForFileWrite, 'utf8');
|
|
100
|
-
|
|
101
|
-
// This will run index.js
|
|
102
|
-
require('../../index.js')({ nowatch: true });
|
|
103
|
-
} catch (error) {
|
|
104
|
-
console.error("An error occurred:", error);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
module.exports.processXTrefsData = processXTrefsData;
|
package/src/freeze.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file freeze.js
|
|
3
|
-
* @description This script reads the output path from a specs.json file, finds the highest versioned directory in the destination path, and copies the index.html file to a new versioned directory with an incremented version number.
|
|
4
|
-
*
|
|
5
|
-
* @requires fs-extra - Module for file system operations with additional features.
|
|
6
|
-
* @requires path - Module for handling and transforming file paths.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* // Assuming specs.json contains:
|
|
10
|
-
* // {
|
|
11
|
-
* // "specs": [
|
|
12
|
-
* // {
|
|
13
|
-
* // "output_path": "path/to/output"
|
|
14
|
-
* // }
|
|
15
|
-
* // ]
|
|
16
|
-
* // }
|
|
17
|
-
*
|
|
18
|
-
* // And the directory structure is:
|
|
19
|
-
* // path/to/output/versions/v1/index.html
|
|
20
|
-
* // path/to/output/versions/v2/index.html
|
|
21
|
-
*
|
|
22
|
-
* // Running this script will create:
|
|
23
|
-
* // path/to/output/versions/v3/index.html
|
|
24
|
-
*
|
|
25
|
-
* @version 1.0.0
|
|
26
|
-
* @license MIT
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
const fs = require('fs-extra'); // Import the fs-extra module for file system operations
|
|
30
|
-
const path = require('path'); // Import the path module for handling file paths
|
|
31
|
-
|
|
32
|
-
// Read and parse the specs.json file
|
|
33
|
-
const config = fs.readJsonSync('specs.json');
|
|
34
|
-
|
|
35
|
-
// Extract the output_path from the specs.json file
|
|
36
|
-
const outputPath = config.specs[0].output_path;
|
|
37
|
-
|
|
38
|
-
// Define the source file path
|
|
39
|
-
const sourceFile = path.join(outputPath, 'index.html');
|
|
40
|
-
|
|
41
|
-
// Define the destination directory path
|
|
42
|
-
const destDir = path.join(outputPath, 'versions');
|
|
43
|
-
|
|
44
|
-
// Ensure the destination directory exists, create it if it doesn't
|
|
45
|
-
if (!fs.existsSync(destDir)) {
|
|
46
|
-
fs.mkdirSync(destDir, { recursive: true });
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Get all directories in the destination directory
|
|
50
|
-
const dirs = fs.readdirSync(destDir).filter(file => fs.statSync(path.join(destDir, file)).isDirectory());
|
|
51
|
-
|
|
52
|
-
// Initialize the highest version number to 0
|
|
53
|
-
let highestVersion = 0;
|
|
54
|
-
|
|
55
|
-
// Define the pattern to match versioned directories
|
|
56
|
-
const versionPattern = /^v(\d+)$/;
|
|
57
|
-
|
|
58
|
-
// Iterate over each directory in the destination directory
|
|
59
|
-
dirs.forEach(dir => {
|
|
60
|
-
// Check if the directory matches the version pattern
|
|
61
|
-
const match = dir.match(versionPattern);
|
|
62
|
-
if (match) {
|
|
63
|
-
// Extract the version number from the directory name
|
|
64
|
-
const version = parseInt(match[1], 10);
|
|
65
|
-
// Update the highest version number if the latest version is higher
|
|
66
|
-
if (version > highestVersion) {
|
|
67
|
-
highestVersion = version;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
// Calculate the new version number
|
|
73
|
-
const newVersion = highestVersion + 1;
|
|
74
|
-
|
|
75
|
-
// Define the new version directory path
|
|
76
|
-
const newVersionDir = path.join(destDir, `v${newVersion}`);
|
|
77
|
-
|
|
78
|
-
// Ensure the new version directory exists, create it if it doesn't
|
|
79
|
-
if (!fs.existsSync(newVersionDir)) {
|
|
80
|
-
fs.mkdirSync(newVersionDir, { recursive: true });
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Define the destination file path within the new version directory
|
|
84
|
-
const destFile = path.join(newVersionDir, 'index.html');
|
|
85
|
-
|
|
86
|
-
// Copy the source file to the destination file
|
|
87
|
-
fs.copyFileSync(sourceFile, destFile);
|
|
88
|
-
|
|
89
|
-
// Log a message indicating the file has been copied
|
|
90
|
-
console.log(`✅ Created a freezed specification version in ${destFile}`);
|
package/src/install-from-boilerplate/boilerplate/.github/workflows/fetch-and-push-xrefs.yml.old
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
name: fetch and push xrefs
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
# push:
|
|
6
|
-
# branches:
|
|
7
|
-
# - main
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build-and-deploy-spec:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
permissions:
|
|
14
|
-
contents: write
|
|
15
|
-
steps:
|
|
16
|
-
- name: Checkout 🛎️
|
|
17
|
-
uses: actions/checkout@v3
|
|
18
|
-
with:
|
|
19
|
-
persist-credentials: false
|
|
20
|
-
|
|
21
|
-
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
|
|
22
|
-
run: |
|
|
23
|
-
echo "start install"
|
|
24
|
-
npm install
|
|
25
|
-
echo "end install"
|
|
26
|
-
echo "Spec-Up-T version:"
|
|
27
|
-
npm list spec-up-t
|
|
28
|
-
echo "start fetching xrefs"
|
|
29
|
-
node -e "require('spec-up-t/src/get-xrefs-data.js').updateXrefs()"
|
|
30
|
-
rm -rf node_modules
|
|
31
|
-
|
|
32
|
-
- name: Commit and Push Changes
|
|
33
|
-
env:
|
|
34
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
35
|
-
run: |
|
|
36
|
-
git config --local user.email "action@github.com"
|
|
37
|
-
git config --local user.name "GitHub Action"
|
|
38
|
-
git add .
|
|
39
|
-
git commit -m "Update Xrefs data via Github Action" || echo "No changes to commit"
|
|
40
|
-
git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }} HEAD:refs/heads/main
|
|
41
|
-
|
|
42
|
-
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
name: spec-up-t render
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
# push:
|
|
6
|
-
# branches:
|
|
7
|
-
# - main
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build-and-deploy-spec:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
permissions:
|
|
14
|
-
contents: write
|
|
15
|
-
steps:
|
|
16
|
-
- name: Checkout 🛎️
|
|
17
|
-
uses: actions/checkout@v2
|
|
18
|
-
with:
|
|
19
|
-
persist-credentials: false
|
|
20
|
-
- name: Extract output_path from JSON
|
|
21
|
-
# TODO: .specs[0] is a hack to get the first spec. This should be fixed.
|
|
22
|
-
run: |
|
|
23
|
-
OUTPUT_PATH=$(jq -r '.specs[0].output_path' specs.json)
|
|
24
|
-
echo "OUTPUT_PATH=$OUTPUT_PATH" >> $GITHUB_ENV
|
|
25
|
-
|
|
26
|
-
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
|
|
27
|
-
run: |
|
|
28
|
-
echo "start install"
|
|
29
|
-
npm install
|
|
30
|
-
echo "end install"
|
|
31
|
-
echo "Spec-Up-T version:"
|
|
32
|
-
npm list spec-up-t
|
|
33
|
-
echo "start render"
|
|
34
|
-
node -e "require('spec-up-t')({ nowatch: true })"
|
|
35
|
-
echo "end render"
|
|
36
|
-
rm -rf node_modules
|
|
37
|
-
|
|
38
|
-
# This is a GitHub Action to deploy your static files to GitHub Pages
|
|
39
|
-
- name: Deploy
|
|
40
|
-
uses: peaceiris/actions-gh-pages@v3.7.3
|
|
41
|
-
with:
|
|
42
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
43
|
-
publish_dir: ${{ env.OUTPUT_PATH }} # Use the OUTPUT_PATH environment variable
|
|
44
|
-
allow_empty_commit: true
|
|
45
|
-
force_orphan: true
|
|
46
|
-
|
|
47
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
[[def: term 1, term one, Term One]]
|
|
2
|
-
|
|
3
|
-
~ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum faucibus volutpat justo, sed ornare velit.
|
|
4
|
-
|
|
5
|
-
~ Refs examples: [[ref: Term 2]], [[ref: Term Two]], [[ref: Term 3]].
|
|
6
|
-
|
|
7
|
-
~ Xref example: [[xref: test-1, Aal]]
|
|
8
|
-
|
|
9
|
-
~ This Xref example does not work: [[xref: does-not-exist, Foo]]
|
|
10
|
-
|
|
11
|
-
~ Donec aliquam et ligula id congue. Sed eu urna et tellus placerat viverra. Quisque ut posuere magna, nec accumsan augue. Nullam mauris tortor, semper finibus elementum maximus, imperdiet in felis. Suspendisse quis imperdiet nibh, eget ultrices justo. Pellentesque vitae malesuada justo. Vestibulum quis scelerisque lectus, non rutrum odio. Aenean leo orci, semper non massa sed, facilisis ornare ipsum. Morbi at sem orci. Integer eros mi, faucibus sed lorem id, pharetra imperdiet nisl. Integer viverra enim vel luctus lobortis. Ut turpis tellus, consequat nec lectus et, dictum elementum nunc. Integer rhoncus venenatis molestie. Donec egestas condimentum ligula in porttitor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
|
|
12
|
-
|
|
13
|
-
~ Extra text for testing purposes.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
[[def: term 2, term two, Term Two]]
|
|
2
|
-
|
|
3
|
-
~ Pellentesque suscipit ipsum varius, mattis diam in, elementum nunc [[ref: Term 1]], [[ref: Term Three]], [[ref: Term 3]], [[ref: Term 4]]. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec placerat, elit sed tempor viverra, magna ligula porttitor tortor, eget suscipit erat enim vel nisl. Integer vel urna in quam viverra dignissim at in orci. Aliquam erat volutpat. Nam vitae neque nibh. In sollicitudin felis vitae ex finibus, in eleifend lectus efficitur. Vestibulum enim ex, condimentum nec accumsan ut, vestibulum at lacus. Maecenas non vulputate ante. Sed porttitor et eros sit amet venenatis.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
[[def: term 3, term three, Term Three]]
|
|
2
|
-
|
|
3
|
-
~ Nam euismod augue sed tempus imperdiet. Pellentesque ac porta ipsum, sed sodales leo. Suspendisse molestie est sit amet est porta, sit amet molestie dolor pharetra. Duis porta mollis sem vel aliquam. Maecenas laoreet turpis nunc, vitae mattis urna auctor ac. Donec mattis quis urna nec porta. Sed sit amet viverra ligula. Vivamus vitae sem sodales, malesuada dui sit amet, viverra lectus. Integer ullamcorper molestie ante, in blandit nunc tempus auctor.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
[[def: term 4, term four, Term Four]]
|
|
2
|
-
|
|
3
|
-
~ Sed lorem nunc, ultricies nec nibh eu, bibendum sollicitudin arcu. Nullam porttitor condimentum elit ac commodo. Aenean ac augue quis arcu congue aliquam vitae in massa. Aliquam erat volutpat. Curabitur lobortis, sapien vitae mattis dignissim, risus augue iaculis risus, sed tempus sapien ex nec massa. Integer quis maximus nunc. Nunc ultrices sapien erat, at congue augue mattis sit amet. Aliquam condimentum luctus nunc, ut euismod augue commodo in.
|