@aurodesignsystem/auro-library 2.2.5 → 2.2.6
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/CHANGELOG.md +7 -0
- package/bin/generateDocs.mjs +10 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Semantic Release Automated Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.6](https://github.com/AlaskaAirlines/auro-library/compare/v2.2.5...v2.2.6) (2024-01-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* update to current version of docs generator script ([31f3ea9](https://github.com/AlaskaAirlines/auro-library/commit/31f3ea9b03a87345ac69c3d84e33375bcdf403a9))
|
|
9
|
+
|
|
3
10
|
## [2.2.5](https://github.com/AlaskaAirlines/auro-library/compare/v2.2.4...v2.2.5) (2024-01-11)
|
|
4
11
|
|
|
5
12
|
|
package/bin/generateDocs.mjs
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This version is sans dependencies
|
|
3
|
-
* Create for use with the SSR updates
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
1
|
import path from 'path';
|
|
7
2
|
import markdownMagic from 'markdown-magic';
|
|
8
3
|
import fs from 'fs';
|
|
@@ -54,8 +49,8 @@ function formatTemplateFileContents(content, destination) {
|
|
|
54
49
|
* Replace placeholder strings
|
|
55
50
|
*/
|
|
56
51
|
result = result.replace(/\[npm]/g, nameExtractionData.npm);
|
|
57
|
-
result = result.replace(/\[name]/g, nameExtractionData.name);
|
|
58
|
-
result = result.replace(/\[Name]/g, nameExtractionData.nameCap);
|
|
52
|
+
result = result.replace(/\[name](?!\()/g, nameExtractionData.name);
|
|
53
|
+
result = result.replace(/\[Name](?!\()/g, nameExtractionData.nameCap);
|
|
59
54
|
result = result.replace(/\[namespace]/g, nameExtractionData.namespace);
|
|
60
55
|
result = result.replace(/\[Namespace]/g, nameExtractionData.namespaceCap);
|
|
61
56
|
|
|
@@ -81,14 +76,14 @@ function formatApiTableContents(content, destination) {
|
|
|
81
76
|
let result = content;
|
|
82
77
|
|
|
83
78
|
result = result
|
|
84
|
-
.replace(/\r\n|\r|\n####\s`([a-zA-Z]*)`/g, `\r\n#### <a name="$1"></a>\`$1\`<a href="
|
|
79
|
+
.replace(/\r\n|\r|\n####\s`([a-zA-Z]*)`/g, `\r\n#### <a name="$1"></a>\`$1\`<a href="#" style="float: right; font-size: 1rem; font-weight: 100;">back to top</a>`)
|
|
85
80
|
.replace(/\r\n|\r|\n\|\s`([a-zA-Z]*)`/g, '\r\n| [$1](#$1)')
|
|
86
81
|
.replace(/\| \[\]\(#\)/g, "");
|
|
87
82
|
|
|
88
83
|
fs.writeFileSync(destination, result, { encoding: 'utf8'});
|
|
89
84
|
|
|
90
|
-
fs.readFile('./demo/
|
|
91
|
-
formatTemplateFileContents(data, './demo/
|
|
85
|
+
fs.readFile('./demo/apiExamples.md', 'utf8', function(err, data) {
|
|
86
|
+
formatTemplateFileContents(data, './demo/apiExamples.md');
|
|
92
87
|
});
|
|
93
88
|
}
|
|
94
89
|
|
|
@@ -149,12 +144,12 @@ function processDemo() {
|
|
|
149
144
|
|
|
150
145
|
function processApiExamples() {
|
|
151
146
|
const callback = function(updatedContent, outputConfig) {
|
|
152
|
-
if (fs.existsSync('./demo/
|
|
153
|
-
fs.readFile('./demo/
|
|
154
|
-
formatApiTableContents(data, './demo/
|
|
147
|
+
if (fs.existsSync('./demo/apiExamples.md')) {
|
|
148
|
+
fs.readFile('./demo/apiExamples.md', 'utf8', function(err, data) {
|
|
149
|
+
formatApiTableContents(data, './demo/apiExamples.md');
|
|
155
150
|
});
|
|
156
151
|
} else {
|
|
157
|
-
console.log('ERROR: ./demo/
|
|
152
|
+
console.log('ERROR: ./demo/apiExamples.md file is missing');
|
|
158
153
|
}
|
|
159
154
|
};
|
|
160
155
|
|
|
@@ -163,7 +158,7 @@ function processApiExamples() {
|
|
|
163
158
|
outputDir: './demo'
|
|
164
159
|
};
|
|
165
160
|
|
|
166
|
-
const markdownPath = path.join(__dirname, '../docs/partials/
|
|
161
|
+
const markdownPath = path.join(__dirname, '../docs/partials/apiExamples.md');
|
|
167
162
|
|
|
168
163
|
markdownMagic(markdownPath, config, callback);
|
|
169
164
|
}
|
package/package.json
CHANGED