代码拉取完成,页面将自动刷新
'use strict';
const path = require('path');
const child_process = require('child_process');
const webpack = require('webpack'); //to access built-in plugins
const gitStatus = child_process
.execSync('git status --short')
.toString()
.trim();
const commitHash = child_process
.execSync('git rev-parse --short HEAD')
.toString()
.trim() + (gitStatus === '' ? '' : '+dirty');
const extensionConfig = {
target: 'node',
entry: './src/frontend/extension.ts',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'extension.js',
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: '../[resource-path]'
},
devtool: 'source-map',
externals: {
vscode: 'vscode',
serialport: 'serialport'
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader'
}
]
}
]
}
};
const adapterConfig = {
target: 'node',
entry: './src/gdb.ts',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'debugadapter.js',
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: '../[resource-path]'
},
devtool: 'source-map',
externals: {
vscode: 'vscode',
serialport: 'serialport'
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader'
}
]
}
]
},
plugins: [
new webpack.DefinePlugin({
__COMMIT_HASH__: JSON.stringify(commitHash)
})
]
}
const grapherConfig = {
target: 'web',
entry: {
'grapher': './src/grapher/main.ts'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].bundle.js',
devtoolModuleFilenameTemplate: '../[resource-path]'
},
devtool: 'source-map',
externals: {
vscode: 'vscode',
serialport: 'serialport'
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader'
}
]
}
]
}
};
const docgenConfig = {
target: 'node',
entry: './src/docgen.ts',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'docgen.js',
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: '../[resource-path]'
},
devtool: 'source-map',
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader'
}
]
}
]
},
plugins: [
new webpack.DefinePlugin({
__COMMIT_HASH__: JSON.stringify(commitHash)
})
]
}
module.exports = [extensionConfig, adapterConfig, grapherConfig, docgenConfig];
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。