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 2
2
import { transpileModule } from 'https://esm.sh/typescript@5.7.3' ;
3
3
import * as prettier from 'https://esm.sh/prettier@3.5.1/standalone' ;
4
4
import * 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' ;
6
5
import { marked } from 'https://esm.sh/marked@15.0.7' ;
7
6
8
7
export const showTip = async ( ) => {
9
8
const tipContainer = document . getElementById ( 'tip-container' ) ;
10
9
const tipElement = document . getElementById ( 'tip' ) ;
11
10
if ( ! tipElement ) return ;
12
11
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
+ ] ) ;
15
16
const all = tips . concat ( features ) ;
16
17
17
18
const content = all [ Math . floor ( Math . random ( ) * all . length ) ]
@@ -117,7 +118,7 @@ const transpileToJS = async tsCode => {
117
118
'\n\n'
118
119
) ,
119
120
{
120
- plugins : [ babel , estree ] ,
121
+ plugins : [ babel ] ,
121
122
parser : 'babel' ,
122
123
tabWidth : 4 ,
123
124
printWidth : 120 ,
You can’t perform that action at this time.
0 commit comments