Issue
The following code is edited with a new generator build.
|
/** |
|
* Replace all instances of [npm], [name], [Name], [namespace] and [Namespace] accordingly |
|
*/ |
|
|
|
function formatTemplateFileContents(content, destination) { |
|
let nameExtractionData = nameExtraction(); |
|
let result = content; |
|
|
|
/** |
|
* Replace placeholder strings |
|
*/ |
|
result = result.replace(/\[npm]/g, nameExtractionData.npm); |
|
result = result.replace(/\[name](?!\()/g, nameExtractionData.name); |
|
result = result.replace(/\[Name](?!\()/g, nameExtractionData.nameCap); |
|
result = result.replace(/\[namespace]/g, nameExtractionData.namespace); |
|
result = result.replace(/\[Namespace]/g, nameExtractionData.namespaceCap); |
Here is the output from a recently generated repo
/**
* Replace all instances of @aurodesignsystem, menu, Menu, auro and Auro accordingly
*/
function formatTemplateFileContents(content, destination) {
let nameExtractionData = nameExtraction();
let result = content;
/**
* Replace placeholder strings
*/
result = result.replace(/\@aurodesignsystem/g, nameExtractionData.npm);
result = result.replace(/\menu(?!\()/g, nameExtractionData.name);
result = result.replace(/\Menu(?!\()/g, nameExtractionData.nameCap);
result = result.replace(/\auro/g, nameExtractionData.namespace);
result = result.replace(/\Auro/g, nameExtractionData.namespaceCap);
Band-aid fix, replace contents of this file with that from the auro-library, here is the diff when done.
/**
- * Replace all instances of @aurodesignsystem, menu, Menu, auro and Auro accordingly
+ * Replace all instances of [npm], [name], [Name], [namespace] and [Namespace] accordingly
*/
function formatTemplateFileContents(content, destination) {
@@ -48,11 +48,11 @@ function formatTemplateFileContents(content, destination) {
/**
* Replace placeholder strings
*/
- result = result.replace(/\@aurodesignsystem/g, nameExtractionData.npm);
- result = result.replace(/\menu(?!\()/g, nameExtractionData.name);
- result = result.replace(/\Menu(?!\()/g, nameExtractionData.nameCap);
- result = result.replace(/\auro/g, nameExtractionData.namespace);
- result = result.replace(/\Auro/g, nameExtractionData.namespaceCap);
+ result = result.replace(/\[npm]/g, nameExtractionData.npm);
+ result = result.replace(/\[name](?!\()/g, nameExtractionData.name);
+ result = result.replace(/\[Name](?!\()/g, nameExtractionData.nameCap);
+ result = result.replace(/\[namespace]/g, nameExtractionData.namespace);
+ result = result.replace(/\[Namespace]/g, nameExtractionData.namespaceCap);
/**
* Cleanup line breaks
*
Expected behavior
The contents of the script are not edited or corrected with a generated repo.
Exit criteria
This issue can be closed once the contents of this file are either not edited or corrected with the building of a new element repo.
Issue
The following code is edited with a new generator build.
WC-Generator/template/scripts/generateDocs.mjs
Lines 40 to 55 in 424610f
Here is the output from a recently generated repo
Band-aid fix, replace contents of this file with that from the auro-library, here is the diff when done.
Expected behavior
The contents of the script are not edited or corrected with a generated repo.
Exit criteria
This issue can be closed once the contents of this file are either not edited or corrected with the building of a new element repo.