mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
* Revert "Revert "Merge from vscode merge-base (#22769)" (#22779)"
This reverts commit 47a1745180.
* Fix notebook download task
* Remove done call from extensions-ci
48 lines
1.2 KiB
JavaScript
48 lines
1.2 KiB
JavaScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
//@ts-check
|
|
|
|
const path = require('path');
|
|
const fse = require('fs-extra');
|
|
const esbuild = require('esbuild');
|
|
|
|
const args = process.argv.slice(2);
|
|
|
|
const isWatch = args.indexOf('--watch') >= 0;
|
|
|
|
let outputRoot = __dirname;
|
|
const outputRootIndex = args.indexOf('--outputRoot');
|
|
if (outputRootIndex >= 0) {
|
|
outputRoot = args[outputRootIndex + 1];
|
|
}
|
|
|
|
const srcDir = path.join(__dirname, 'src');
|
|
const outDir = path.join(outputRoot, 'notebook-out');
|
|
|
|
async function build() {
|
|
await esbuild.build({
|
|
entryPoints: [
|
|
path.join(srcDir, 'cellAttachmentRenderer.ts'),
|
|
],
|
|
bundle: true,
|
|
minify: false,
|
|
sourcemap: false,
|
|
format: 'esm',
|
|
outdir: outDir,
|
|
platform: 'browser',
|
|
target: ['es2020'],
|
|
});
|
|
}
|
|
|
|
|
|
build().catch(() => process.exit(1));
|
|
|
|
if (isWatch) {
|
|
const watcher = require('@parcel/watcher');
|
|
watcher.subscribe(srcDir, () => {
|
|
return build();
|
|
});
|
|
}
|