forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.js
More file actions
55 lines (55 loc) · 1.71 KB
/
common.js
File metadata and controls
55 lines (55 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const glob = require("glob");
const path = require("path");
const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
const constants_1 = require("../constants");
exports.nodeModulesToExternalize = [
'unicode/category/Lu',
'unicode/category/Ll',
'unicode/category/Lt',
'unicode/category/Lo',
'unicode/category/Lm',
'unicode/category/Nl',
'unicode/category/Mn',
'unicode/category/Mc',
'unicode/category/Nd',
'unicode/category/Pc',
'@jupyterlab/services',
'azure-storage',
'request',
'request-progress',
'source-map-support',
'diff-match-patch',
'sudo-prompt',
'node-stream-zip',
'xml2js',
'vsls/vscode',
'pdfkit',
'crypto-js',
'fontkit',
'linebreak',
'png-js'
];
exports.nodeModulesToReplacePaths = [
...exports.nodeModulesToExternalize
];
function getDefaultPlugins(name) {
const plugins = [];
if (!constants_1.isCI) {
plugins.push(new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({
analyzerMode: 'static',
reportFilename: `${name}.analyzer.html`
}));
}
return plugins;
}
exports.getDefaultPlugins = getDefaultPlugins;
function getListOfExistingModulesInOutDir() {
const outDir = path.join(constants_1.ExtensionRootDir, 'out', 'client');
const files = glob.sync('**/*.js', { sync: true, cwd: outDir });
return files.map(filePath => `./${filePath.slice(0, -3)}`);
}
exports.getListOfExistingModulesInOutDir = getListOfExistingModulesInOutDir;