Skip to content

Commit a2cbaa9

Browse files
authored
Merge branch 'main' into PORT-16665-bug-update-account-admin-permission-scope-in-documentation
2 parents bf6a831 + 8425d08 commit a2cbaa9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

scripts/generate-guide-metadata.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ const path = require('path');
88
const constsPath = path.join(__dirname, '../src/components/guides-section/consts.js');
99
let constsContent = fs.readFileSync(constsPath, 'utf8');
1010

11-
// Convert ES6 imports and exports to require-compatible format for this script
11+
// Convert ES6 imports/exports and require statements to require-compatible format for this script
12+
// Remove both import and require statements for guide-metadata.json
1213
constsContent = constsContent.replace(/import guideMetadata from '\.\/guide-metadata\.json';\s*/, '');
14+
constsContent = constsContent.replace(/const guideMetadata = require\('\.\/guide-metadata\.json'\);\s*/, '');
1315
constsContent = constsContent.replace(/export const/g, 'const');
1416

1517
// Remove the enhancedAvailableGuides section that references guideMetadata

src/components/guides-section/consts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import guideMetadata from './guide-metadata.json';
1+
const guideMetadata = require('./guide-metadata.json');
22

33
export const tagsCategoryMap = {
44

0 commit comments

Comments
 (0)