spec-up-t 1.0.49 → 1.0.51
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/index.js +8 -7
- package/package.json +3 -3
- package/src/create-versions-index.js +1 -7
- package/specs.json +0 -59
package/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
module.exports = function(options = {}) {
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
const path = require('path');
|
|
3
5
|
|
|
4
6
|
const {
|
|
5
7
|
fetchExternalSpecs,
|
|
@@ -7,24 +9,23 @@ module.exports = function(options = {}) {
|
|
|
7
9
|
findExternalSpecByKey
|
|
8
10
|
} = require('./src/references.js');
|
|
9
11
|
|
|
10
|
-
const createVersionsIndex = require('./src/create-versions-index.js');
|
|
11
|
-
createVersionsIndex();
|
|
12
|
-
|
|
13
12
|
const { runJsonKeyValidatorSync } = require('./src/json-key-validator.js');
|
|
14
13
|
runJsonKeyValidatorSync();
|
|
15
14
|
|
|
16
15
|
const { createTermRelations } = require('./src/create-term-relations.js');
|
|
17
16
|
createTermRelations();
|
|
18
|
-
|
|
17
|
+
|
|
19
18
|
const { insertTermIndex } = require('./src/insert-term-index.js');
|
|
20
19
|
insertTermIndex();
|
|
21
|
-
|
|
20
|
+
|
|
22
21
|
const gulp = require('gulp');
|
|
23
|
-
const fs = require('fs-extra');
|
|
24
|
-
const path = require('path');
|
|
25
22
|
const findPkgDir = require('find-pkg-dir');
|
|
26
23
|
const modulePath = findPkgDir(__dirname);
|
|
27
24
|
let config = fs.readJsonSync('./output/specs-generated.json');
|
|
25
|
+
|
|
26
|
+
const createVersionsIndex = require('./src/create-versions-index.js');
|
|
27
|
+
createVersionsIndex(config.specs[0].output_path);
|
|
28
|
+
|
|
28
29
|
let template = fs.readFileSync(path.join(modulePath, 'templates/template.html'), 'utf8');
|
|
29
30
|
let assets = fs.readJsonSync(modulePath + '/src/asset-map.json');
|
|
30
31
|
let externalReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-up-t",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.51",
|
|
4
4
|
"description": "Technical specification drafting tool that generates rich specification documents from markdown. Forked from https://github.com/decentralized-identity/spec-up by Daniel Buchner (https://github.com/csuwildcat)",
|
|
5
5
|
"main": "./index",
|
|
6
6
|
"repository": {
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"standards"
|
|
21
21
|
],
|
|
22
22
|
"author": "Blockchain Bird",
|
|
23
|
-
"license": "Apache
|
|
23
|
+
"license": "Apache-2.0",
|
|
24
24
|
"bugs": {
|
|
25
25
|
"url": "https://github.com/blockchainbird/spec-up-t/issues"
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/blockchainbird/spec-up-t#readme",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@traptitech/markdown-it-katex": "3.3.0",
|
|
29
|
+
"@traptitech/markdown-it-katex": "^3.3.0",
|
|
30
30
|
"axios": "^0.28.0",
|
|
31
31
|
"diff": "^7.0.0",
|
|
32
32
|
"find-pkg-dir": "2.0.0",
|
|
@@ -15,13 +15,7 @@
|
|
|
15
15
|
const fs = require('fs-extra');
|
|
16
16
|
const path = require('path');
|
|
17
17
|
|
|
18
|
-
function createVersionsIndex() {
|
|
19
|
-
// Read and parse the specs.json file
|
|
20
|
-
const config = fs.readJsonSync('specs.json');
|
|
21
|
-
|
|
22
|
-
// Extract the output_path from the specs.json file
|
|
23
|
-
const outputPath = config.specs[0].output_path;
|
|
24
|
-
|
|
18
|
+
function createVersionsIndex(outputPath) {
|
|
25
19
|
// Directory containing the version files
|
|
26
20
|
const versionsDir = path.join(outputPath, 'versions');
|
|
27
21
|
|
package/specs.json
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"specs": [
|
|
3
|
-
{
|
|
4
|
-
"title": "Spec-Up-T",
|
|
5
|
-
"spec_directory": "./spec",
|
|
6
|
-
"spec_terms_directory": "terms-definitions",
|
|
7
|
-
"output_path": "./docs",
|
|
8
|
-
"markdown_paths": [
|
|
9
|
-
"intro.md",
|
|
10
|
-
"terms-and-definitions-intro.md",
|
|
11
|
-
"example-markup-in-markdown.md",
|
|
12
|
-
"outro.md"
|
|
13
|
-
],
|
|
14
|
-
"logo": "https://raw.githubusercontent.com/blockchainbird/spec-up-t/master/logo.svg",
|
|
15
|
-
"logo_link": "https://github.com/blockchainbird/spec-up-t",
|
|
16
|
-
"source": {
|
|
17
|
-
"host": "github",
|
|
18
|
-
"account": "blockchainbird",
|
|
19
|
-
"repo": "spec-up-t"
|
|
20
|
-
},
|
|
21
|
-
"external_specs": [
|
|
22
|
-
{
|
|
23
|
-
"test-1": "https://blockchainbird.github.io/spec-up-xref-test-1/"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"test-2": "https://blockchainbird.github.io/spec-up-xref-test-2/"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"external_specs_repos": [
|
|
30
|
-
{
|
|
31
|
-
"external_spec": "test-1",
|
|
32
|
-
"url": "https://github.com/blockchainbird/spec-up-xref-test-1",
|
|
33
|
-
"terms_dir": "spec/term-definitions"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"external_spec": "test-2",
|
|
37
|
-
"url": "https://github.com/blockchainbird/spec-up-xref-test-2",
|
|
38
|
-
"terms_dir": "spec/term-definitions"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"assets": [
|
|
42
|
-
{
|
|
43
|
-
"path": "/custom-assets/custom.css"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"path": "/custom-assets/custom-head.js",
|
|
47
|
-
"inject": "head"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"path": "/custom-assets/custom-body.js",
|
|
51
|
-
"inject": "body",
|
|
52
|
-
"module": true
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
"katex": false,
|
|
56
|
-
"searchHighlightStyle": "ssi"
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|