File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 22import { transpileModule } from 'https://esm.sh/typescript@5.7.3' ;
33import * as prettier from 'https://esm.sh/prettier@3.5.1/standalone' ;
44import * as babel from 'https://esm.sh/prettier@3.5.1/plugins/babel' ;
5- import * as estree from 'https://esm.sh/prettier@3.5.1/plugins/estree' ;
65import { marked } from 'https://esm.sh/marked@15.0.7' ;
76
87export const showTip = async ( ) => {
98 const tipContainer = document . getElementById ( 'tip-container' ) ;
109 const tipElement = document . getElementById ( 'tip' ) ;
1110 if ( ! tipElement ) return ;
1211
13- const tips = await getContents ( '/assets/tips.md' ) ;
14- const features = await getContents ( '/assets/features.md' ) ;
12+ const [ tips , features ] = await Promise . all ( [
13+ getContents ( '/assets/tips.md' ) ,
14+ getContents ( '/assets/features.md' ) ,
15+ ] ) ;
1516 const all = tips . concat ( features ) ;
1617
1718 const content = all [ Math . floor ( Math . random ( ) * all . length ) ]
@@ -117,7 +118,7 @@ const transpileToJS = async tsCode => {
117118 '\n\n'
118119 ) ,
119120 {
120- plugins : [ babel , estree ] ,
121+ plugins : [ babel ] ,
121122 parser : 'babel' ,
122123 tabWidth : 4 ,
123124 printWidth : 120 ,
You can’t perform that action at this time.
0 commit comments