File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 272272 "yaml" : " ^2.8.1"
273273 },
274274 "scripts" : {
275- "prebuild" : " mkdir -p dist && bun run src/grammar/nix.ts && bun run src/grammar/injection .ts" ,
275+ "prebuild" : " mkdir -p dist && bun run src/grammar/build .ts" ,
276276 "build" : " bun build src/extension.ts --outdir=dist --external=vscode --target=node --format=cjs" ,
277277 "postinstall" : " lefthook install" ,
278278 "clean" : " rm -rd dist" ,
Original file line number Diff line number Diff line change 1+ /// Generate json files from the grammar definitions.
2+
3+ import * as helpers from "./helpers" ;
4+ import { nixInjectionGrammar } from "./injection" ;
5+ import { source_nix } from "./nix" ;
6+
7+ // This code only runs when 'bun run index.ts' is executed directly.
8+ helpers . toJson ( "dist/injection.json" , nixInjectionGrammar ) ;
9+ helpers . toJson ( "dist/nix.tmLanguage.json" , source_nix ) ;
Original file line number Diff line number Diff line change 1- import * as helpers from "./helpers" ;
2-
3- const nixInjectionGrammar = {
1+ export const nixInjectionGrammar = {
42 fileTypes : [ ] ,
53 injectionSelector : "L:text.html.markdown" ,
64 patterns : [
@@ -45,8 +43,3 @@ const nixInjectionGrammar = {
4543 } ,
4644 scopeName : "markdown.nix.codeblock" ,
4745} ;
48-
49- if ( import . meta. main ) {
50- // This code only runs when 'bun run index.ts' is executed directly.
51- helpers . toJson ( "dist/injection.json" , nixInjectionGrammar ) ;
52- }
Original file line number Diff line number Diff line change @@ -1238,8 +1238,3 @@ export const source_nix = {
12381238 } ,
12391239 } ,
12401240} ;
1241-
1242- if ( import . meta. main ) {
1243- // This code only runs when 'bun run index.ts' is executed directly.
1244- helpers . toJson ( "dist/nix.tmLanguage.json" , source_nix ) ;
1245- }
You can’t perform that action at this time.
0 commit comments