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 {
9
9
Pattern ,
10
10
TextmateGrammar ,
11
11
} from "./textmate-grammar" ;
12
+ import { pipeline } from "stream/promises" ;
12
13
13
14
/**
14
15
* Replaces all rule references with the match pattern of the referenced rule.
@@ -276,7 +277,9 @@ export function transpileTextMateGrammar() {
276
277
}
277
278
278
279
export 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
+ ) ;
282
285
}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import esbuild from "gulp-esbuild";
4
4
import type { reporter } from "gulp-typescript" ;
5
5
import { createProject } from "gulp-typescript" ;
6
6
import del from "del" ;
7
+ import { pipeline } from "stream/promises" ;
7
8
8
9
export function goodReporter ( ) : reporter . Reporter {
9
10
return {
@@ -37,23 +38,23 @@ export function cleanOutput() {
37
38
}
38
39
39
40
export 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
+ ) ;
57
58
}
58
59
59
60
export function watchEsbuild ( ) {
Original file line number Diff line number Diff line change @@ -3,28 +3,29 @@ import esbuild from "gulp-esbuild";
3
3
import { createProject } from "gulp-typescript" ;
4
4
import { goodReporter } from "./typescript" ;
5
5
6
+ import { pipeline } from "stream/promises" ;
6
7
import chromiumVersion from "./chromium-version.json" ;
7
8
8
9
const tsProject = createProject ( "src/view/tsconfig.json" ) ;
9
10
10
11
export 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
+ ) ;
28
29
}
29
30
30
31
export function watchViewEsbuild ( ) {
You can’t perform that action at this time.
0 commit comments