vscode-azurevirtualmachines/gulpfile.ts

30 строки
1.2 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// tslint:disable:no-console
// tslint:disable:no-implicit-dependencies (this allows the use of dev dependencies)
// Grandfathered in
// tslint:disable:typedef
// tslint:disable:no-unsafe-any
import * as cp from 'child_process';
import * as gulp from 'gulp';
import * as path from 'path';
import { gulp_installAzureAccount, gulp_webpack } from 'vscode-azureextensiondev';
function test() {
const env = process.env;
env.DEBUGTELEMETRY = '1';
env.MOCHA_timeout = String(20 * 1000);
env.CODE_TESTS_WORKSPACE = path.join(__dirname, 'test/test.code-workspace');
env.CODE_TESTS_PATH = path.join(__dirname, 'dist/test');
return cp.spawn('node', ['./node_modules/vscode/bin/test'], { stdio: 'inherit', env });
}
exports['webpack-dev'] = () => gulp_webpack('development');
exports['webpack-prod'] = () => gulp_webpack('production');
exports.test = gulp.series(gulp_installAzureAccount, test);