33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 *--------------------------------------------------------------------------------------------*/
55
6+ import { globSync } from 'fs' ;
7+ import { glob , rm , rmdir } from 'fs/promises' ;
68import gulp from 'gulp' ;
7-
89import yaml from 'gulp-yaml' ;
9- import { deleteSync } from 'del' ;
1010import nls from 'vscode-nls-dev' ;
1111
1212// If all VS Code languages are supported you can use nls.coreLanguages
@@ -16,22 +16,22 @@ const languages = [
1616 } ,
1717] ;
1818
19- gulp . task ( 'i18n-compile' , async function ( ) {
20- return gulp . src ( './locale/**/*.yaml' ) . pipe ( yaml ( ) ) . pipe ( gulp . dest ( './i18n/' ) ) ;
21- } ) ;
19+ gulp . task ( 'i18n-compile' , async ( ) =>
20+ gulp . src ( './locale/**/*.yaml' ) . pipe ( yaml ( ) ) . pipe ( gulp . dest ( './i18n/' ) )
21+ ) ;
2222
23- gulp . task ( 'i18n-additional' , async function ( ) {
24- return gulp
23+ gulp . task ( 'i18n-additional' , async ( ) =>
24+ gulp
2525 . src ( [ 'package.nls.json' ] )
2626 . pipe ( nls . createAdditionalLanguageFiles ( languages , 'i18n' ) )
27- . pipe ( gulp . dest ( '.' ) ) ;
28- } ) ;
27+ . pipe ( gulp . dest ( '.' ) )
28+ ) ;
2929
30- gulp . task ( 'clean' , async function ( ) {
31- return deleteSync ( [ 'package.nls.*.json' , 'vscode-wpilib*.vsix' , 'out/' ] ) ;
30+ gulp . task ( 'clean' , async ( ) => {
31+ await rm ( 'out/' , { force : true , recursive : true } ) ;
32+ globSync ( [ 'package.nls.*.json' , '*.vsix' ] ) . map ( async ( file ) => await rm ( file ) ) ;
3233} ) ;
3334
3435gulp . task ( 'build' , gulp . series ( 'clean' , 'i18n-compile' , 'i18n-additional' ) ) ;
3536
3637gulp . task ( 'default' , gulp . series ( 'build' ) ) ;
37-
0 commit comments