mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
use project-src() to compile what tsconfig-defines
This commit is contained in:
parent
800fdbc11e
commit
f8daa9eac4
|
@ -44,6 +44,8 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
const root = path.join('extensions', relativeDirname);
|
||||
const srcBase = path.join(root, 'src');
|
||||
const src = path.join(srcBase, '**');
|
||||
const srcOpts = { cwd: path.dirname(__dirname), base: srcBase };
|
||||
|
||||
const out = path.join(root, 'out');
|
||||
const baseUrl = getBaseUrl(out);
|
||||
|
||||
|
@ -65,7 +67,7 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
|
||||
const compilation = tsb.create(absolutePath, overrideOptions, false, err => reporter(err.toString()));
|
||||
|
||||
return function () {
|
||||
const pipeline = function () {
|
||||
const input = es.through();
|
||||
const tsFilter = filter(['**/*.ts', '!**/lib/lib*.d.ts', '!**/node_modules/**'], { restore: true });
|
||||
const output = input
|
||||
|
@ -95,15 +97,19 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
|
||||
return es.duplex(input, output);
|
||||
};
|
||||
}
|
||||
|
||||
const srcOpts = { cwd: path.dirname(__dirname), base: srcBase };
|
||||
// add src-stream for project files
|
||||
pipeline.tsProjectSrc = () => {
|
||||
return compilation.src(srcOpts);
|
||||
};
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
const cleanTask = task.define(`clean-extension-${name}`, util.rimraf(out));
|
||||
|
||||
const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => {
|
||||
const pipeline = createPipeline(false, true);
|
||||
const input = gulp.src(src, srcOpts);
|
||||
const input = pipeline.tsProjectSrc();
|
||||
|
||||
return input
|
||||
.pipe(pipeline())
|
||||
|
@ -112,7 +118,7 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
|
||||
const watchTask = task.define(`watch-extension:${name}`, task.series(cleanTask, () => {
|
||||
const pipeline = createPipeline(false);
|
||||
const input = gulp.src(src, srcOpts);
|
||||
const input = pipeline.tsProjectSrc();
|
||||
const watchInput = watcher(src, srcOpts);
|
||||
|
||||
return watchInput
|
||||
|
@ -122,7 +128,7 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||
|
||||
const compileBuildTask = task.define(`compile-build-extension-${name}`, task.series(cleanTask, () => {
|
||||
const pipeline = createPipeline(true, true);
|
||||
const input = gulp.src(src, srcOpts);
|
||||
const input = pipeline.tsProjectSrc();
|
||||
|
||||
return input
|
||||
.pipe(pipeline())
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
"gulp-rename": "^1.2.0",
|
||||
"gulp-replace": "^0.5.4",
|
||||
"gulp-shell": "^0.6.5",
|
||||
"gulp-tsb": "4.0.0",
|
||||
"gulp-tsb": "4.0.1",
|
||||
"gulp-tslint": "^8.1.3",
|
||||
"gulp-untar": "^0.0.7",
|
||||
"gulp-vinyl-zip": "^2.1.2",
|
||||
|
|
|
@ -3697,10 +3697,10 @@ gulp-symdest@^1.1.1:
|
|||
queue "^3.1.0"
|
||||
vinyl-fs "^2.4.3"
|
||||
|
||||
gulp-tsb@4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/gulp-tsb/-/gulp-tsb-4.0.0.tgz#3e5a0d191cb070f1c936f70e8a41c54ce2e0b5a0"
|
||||
integrity sha512-Y1csbJ0g2ihZr2aYv7O3VR/IwBzgcK3pCrga3yJ1ZWi3Tx3hAd51Lra74VnLxfekK7aZAxqw7Y9QOmxNs8LW8w==
|
||||
gulp-tsb@4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/gulp-tsb/-/gulp-tsb-4.0.1.tgz#be2d8900d9227abf0e728a33139891e49b9e85d3"
|
||||
integrity sha512-HHR5qMjj/NyFlYdY6AIql7bWosFAknNfeJumwdkPkNaw6GtHVoaK+hPmWgmyK9Otf9nqcETtI5KI2vIla6Vhdw==
|
||||
dependencies:
|
||||
ansi-colors "^1.0.1"
|
||||
fancy-log "^1.3.2"
|
||||
|
|
Loading…
Reference in a new issue