File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -145,13 +145,15 @@ async function transformBundle({
145
145
: ( { } as SnippetSamples ) ;
146
146
147
147
if ( docs ) {
148
+ const snippets = transformCodeSamplesToGuideMethods ( JSON . parse ( JSON . stringify ( snippetSamples ) ) ) ;
149
+ // the JS file will be removed once algolia/doc leverages the JSON one
148
150
await fsp . writeFile (
149
151
toAbsolutePath ( `website/src/generated/${ clientName } -snippets.js` ) ,
150
- `export const snippets = ${ transformCodeSamplesToGuideMethods ( JSON . parse ( JSON . stringify ( snippetSamples ) ) ) } ` ,
152
+ `export const snippets = ${ snippets } ` ,
151
153
) ;
152
154
await fsp . writeFile (
153
155
toAbsolutePath ( `website/src/generated/${ clientName } -snippets.json` ) ,
154
- transformCodeSamplesToGuideMethods ( JSON . parse ( JSON . stringify ( snippetSamples ) ) ) ,
156
+ snippets ,
155
157
) ;
156
158
}
157
159
You can’t perform that action at this time.
0 commit comments