spec-up-t 0.11.4 → 0.11.5
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/package.json +1 -1
- package/src/get-xrefs-data.js +8 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-up-t",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.5",
|
|
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": {
|
package/src/get-xrefs-data.js
CHANGED
|
@@ -5,17 +5,20 @@
|
|
|
5
5
|
* @since 2024-06-09
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
// Get the current working directory
|
|
9
|
+
const projectRoot = process.cwd();
|
|
8
10
|
const path = require('path');
|
|
9
11
|
const fs = require('fs-extra');
|
|
10
|
-
const config = fs.readJsonSync('
|
|
11
|
-
const specDirectories = config.specs.map(spec => spec.spec_directory + '/
|
|
12
|
+
const config = fs.readJsonSync(path.join(projectRoot, '/', 'specs.json'));
|
|
13
|
+
const specDirectories = config.specs.map(spec => spec.spec_directory + '/' + spec.spec_terms_directory);
|
|
12
14
|
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
+
// Create directory named “output” in the project root if it does not yet exist
|
|
16
|
+
if (!fs.existsSync(path.join(projectRoot, '/output'))) {
|
|
17
|
+
fs.mkdirSync(path.join(projectRoot, '/output'));
|
|
18
|
+
}
|
|
15
19
|
|
|
16
20
|
// Create a path for the output file in the project root
|
|
17
21
|
const outputPath = path.join(projectRoot, 'output/xrefs-data.js');
|
|
18
|
-
console.log('projectRoot: ', projectRoot);
|
|
19
22
|
|
|
20
23
|
function getXrefsData() {
|
|
21
24
|
let allXrefs = {};
|