File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,14 @@ import fs from 'fs';
22import path from 'path' ;
33import yaml from 'js-yaml' ;
44import { glob } from 'glob' ;
5+ import { fileURLToPath } from 'url' ;
56
6- const functionsDir = path . resolve ( '../../functions' ) ;
7- const basePath = path . resolve ( './lua-base.tmLanguage.json' ) ;
8- const outputPath = path . resolve ( '../src/grammars/lua-mta.tmLanguage.json' ) ;
7+ const __filename = fileURLToPath ( import . meta. url ) ;
8+ const __dirname = path . dirname ( __filename ) ;
9+
10+ const functionsDir = path . resolve ( __dirname , '../../functions' ) ;
11+ const basePath = path . resolve ( __dirname , './lua-base.tmLanguage.json' ) ;
12+ const outputPath = path . resolve ( __dirname , '../src/grammars/lua-mta.tmLanguage.json' ) ;
913
1014function extractFunctionsWithScope ( yamlContent ) {
1115 if ( yamlContent . shared ?. name ) {
Original file line number Diff line number Diff line change 33 "type" : " module" ,
44 "version" : " 0.0.1" ,
55 "scripts" : {
6+ "predev" : " node mta_highlighting/generate-lua-tmlanguage.js" ,
67 "dev" : " astro dev" ,
78 "start" : " astro dev" ,
9+ "prebuild" : " node mta_highlighting/generate-lua-tmlanguage.js" ,
810 "build" : " astro build" ,
911 "preview" : " astro preview" ,
1012 "astro" : " astro"
You can’t perform that action at this time.
0 commit comments