File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/components/guides-section Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,10 @@ const path = require('path');
88const constsPath = path . join ( __dirname , '../src/components/guides-section/consts.js' ) ;
99let 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
1213constsContent = constsContent . replace ( / i m p o r t g u i d e M e t a d a t a f r o m ' \. \/ g u i d e - m e t a d a t a \. j s o n ' ; \s * / , '' ) ;
14+ constsContent = constsContent . replace ( / c o n s t g u i d e M e t a d a t a = r e q u i r e \( ' \. \/ g u i d e - m e t a d a t a \. j s o n ' \) ; \s * / , '' ) ;
1315constsContent = constsContent . replace ( / e x p o r t c o n s t / g, 'const' ) ;
1416
1517// Remove the enhancedAvailableGuides section that references guideMetadata
Original file line number Diff line number Diff line change 1- import guideMetadata from './guide-metadata.json' ;
1+ const guideMetadata = require ( './guide-metadata.json' ) ;
22
33export const tagsCategoryMap = {
44
You can’t perform that action at this time.
0 commit comments