File tree Expand file tree Collapse file tree 3 files changed +42
-37
lines changed
extensions/ql-vscode/gulpfile.ts Expand file tree Collapse file tree 3 files changed +42
-37
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import type {
99 Pattern ,
1010 TextmateGrammar ,
1111} from "./textmate-grammar" ;
12+ import { pipeline } from "stream/promises" ;
1213
1314/**
1415 * Replaces all rule references with the match pattern of the referenced rule.
@@ -276,7 +277,9 @@ export function transpileTextMateGrammar() {
276277}
277278
278279export function compileTextMateGrammar ( ) {
279- return src ( "syntaxes/*.tmLanguage.yml" )
280- . pipe ( transpileTextMateGrammar ( ) )
281- . pipe ( dest ( "out/syntaxes" ) ) ;
280+ return pipeline (
281+ src ( "syntaxes/*.tmLanguage.yml" ) ,
282+ transpileTextMateGrammar ( ) ,
283+ dest ( "out/syntaxes" ) ,
284+ ) ;
282285}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import esbuild from "gulp-esbuild";
44import type { reporter } from "gulp-typescript" ;
55import { createProject } from "gulp-typescript" ;
66import del from "del" ;
7+ import { pipeline } from "stream/promises" ;
78
89export function goodReporter ( ) : reporter . Reporter {
910 return {
@@ -37,23 +38,23 @@ export function cleanOutput() {
3738}
3839
3940export function compileEsbuild ( ) {
40- return src ( "./src/extension.ts" )
41- . pipe (
42- esbuild ( {
43- outfile : "extension.js" ,
44- bundle : true ,
45- external : [ "vscode" , "fsevents" ] ,
46- format : "cjs" ,
47- platform : "node" ,
48- target : "es2020" ,
49- sourcemap : "linked" ,
50- sourceRoot : ".." ,
51- loader : {
52- ".node" : "copy" ,
53- } ,
54- } ) ,
55- )
56- . pipe ( dest ( "out" ) ) ;
41+ return pipeline (
42+ src ( "./src/extension.ts" ) ,
43+ esbuild ( {
44+ outfile : "extension.js" ,
45+ bundle : true ,
46+ external : [ "vscode" , "fsevents" ] ,
47+ format : "cjs" ,
48+ platform : "node" ,
49+ target : "es2020" ,
50+ sourcemap : "linked" ,
51+ sourceRoot : ".." ,
52+ loader : {
53+ ".node" : "copy" ,
54+ } ,
55+ } ) ,
56+ dest ( "out" ) ,
57+ ) ;
5758}
5859
5960export function watchEsbuild ( ) {
Original file line number Diff line number Diff line change @@ -3,28 +3,29 @@ import esbuild from "gulp-esbuild";
33import { createProject } from "gulp-typescript" ;
44import { goodReporter } from "./typescript" ;
55
6+ import { pipeline } from "stream/promises" ;
67import chromiumVersion from "./chromium-version.json" ;
78
89const tsProject = createProject ( "src/view/tsconfig.json" ) ;
910
1011export function compileViewEsbuild ( ) {
11- return src ( "./src/view/webview.tsx" )
12- . pipe (
13- esbuild ( {
14- outfile : "webview.js" ,
15- bundle : true ,
16- format : "iife" ,
17- platform : "browser" ,
18- target : `chrome${ chromiumVersion . chromiumVersion } ` ,
19- jsx : "automatic" ,
20- sourcemap : "linked" ,
21- sourceRoot : ".." ,
22- loader : {
23- ".ttf" : "file" ,
24- } ,
25- } ) ,
26- )
27- . pipe ( dest ( "out" ) ) ;
12+ return pipeline (
13+ src ( "./src/view/webview.tsx" ) ,
14+ esbuild ( {
15+ outfile : "webview.js" ,
16+ bundle : true ,
17+ format : "iife" ,
18+ platform : "browser" ,
19+ target : `chrome${ chromiumVersion . chromiumVersion } ` ,
20+ jsx : "automatic" ,
21+ sourcemap : "linked" ,
22+ sourceRoot : ".." ,
23+ loader : {
24+ ".ttf" : "file" ,
25+ } ,
26+ } ) ,
27+ dest ( "out" ) ,
28+ ) ;
2829}
2930
3031export function watchViewEsbuild ( ) {
You can’t perform that action at this time.
0 commit comments