Revert "WebPack builds for improved loading times (#3889)" (#4217)

This reverts commit 1f80b2d4cc.
This commit is contained in:
Ricardo Piro-Rael 2019-10-25 21:15:15 -07:00 committed by Jason Poon
parent 348857d493
commit e7f1cd7f42
7 changed files with 14 additions and 1627 deletions

View File

@ -38,8 +38,7 @@ script:
echo "Prettier Failed. Run `gulp forceprettier` and commit changes to resolve.";
exit 1;
fi
- gulp build
- gulp prepare-test
- npm run build
- npm test
before_deploy:

View File

@ -9,9 +9,4 @@ typings/**
**/*.map
.github_changelog_generator
.gitignore
*.yml
# Not needed, due to webpack
node_modules/
src/
tsconfig.json
webpack.config.js
*.yml

View File

@ -7,9 +7,7 @@ var gulp = require('gulp'),
ts = require('gulp-typescript'),
PluginError = require('plugin-error'),
minimist = require('minimist'),
path = require('path'),
webpack_stream = require('webpack-stream'),
webpack_config = require('./webpack.config.js');
path = require('path');
const exec = require('child_process').exec;
const spawn = require('child_process').spawn;
@ -128,10 +126,6 @@ function updateVersion(done) {
});
}
function copyPackageJson() {
return gulp.src('./package.json').pipe(gulp.dest('out'));
}
gulp.task('tsc', function() {
var isError = false;
@ -152,13 +146,6 @@ gulp.task('tsc', function() {
.pipe(gulp.dest('out'));
});
gulp.task('webpack', function() {
return gulp
.src('./extension.ts')
.pipe(webpack_stream(webpack_config))
.pipe(gulp.dest('out'));
});
gulp.task('tslint', function() {
const program = require('tslint').Linter.createProgram('./tsconfig.json');
return gulp
@ -190,7 +177,7 @@ gulp.task('commit-hash', function(done) {
});
// test
gulp.task('run-test', function(done) {
gulp.task('test', function(done) {
// the flag --grep takes js regex as a string and filters by test and test suite names
var knownOptions = {
string: 'grep',
@ -241,9 +228,7 @@ gulp.task('run-test', function(done) {
});
});
gulp.task('build', gulp.series('prettier', gulp.parallel('webpack', 'tslint'), 'commit-hash'));
gulp.task('prepare-test', gulp.parallel('tsc', copyPackageJson));
gulp.task('test', gulp.series('prepare-test', 'run-test'));
gulp.task('build', gulp.series('prettier', gulp.parallel('tsc', 'tslint'), 'commit-hash'));
gulp.task('changelog', gulp.series(validateArgs, createChangelog));
gulp.task(
'release',

1566
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -888,7 +888,6 @@
"ts-loader": "6.2.1",
"tslint": "5.20.0",
"typescript": "3.6.4",
"vscode": "1.1.36",
"webpack-stream": "5.2.1"
"vscode": "1.1.36"
}
}

View File

@ -19,7 +19,7 @@ const packagejson: {
contributes: {
keybindings: VSCodeKeybinding[];
};
} = require('../../package.json');
} = require('../../../package.json');
type OptionValue = number | string | boolean;

View File

@ -1,39 +0,0 @@
//@ts-check
'use strict';
const path = require('path');
/**@type {import('webpack').Configuration}*/
const config = {
target: 'node', // vscode extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
mode: 'production',
entry: './extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
output: {
// the bundle is stored in the 'out' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, 'out'),
filename: 'extension.js',
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: '../[resource-path]',
},
devtool: 'source-map',
externals: {
vscode: 'commonjs vscode', // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
},
resolve: {
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
extensions: ['.ts', '.js'],
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: ['ts-loader'],
},
],
},
};
module.exports = config;