Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Sep 7, 2023
1 parent 0694bfa commit 34cea69
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
21 changes: 11 additions & 10 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,19 @@ gulp.task('compileCore', (done) => {
.on('finish', () => (failed ? done(new Error('TypeScript compilation errors')) : done()));
});

const apiTsProject = ts.createProject('./pythonExtensionApi/tsconfig.json', { typescript });

gulp.task('compileApi', (done) => {
let failed = false;
apiTsProject
.src()
.pipe(apiTsProject())
.on('error', () => {
failed = true;
spawnAsync('npm', ['run', 'compileApi'], undefined, true)
.then((stdout) => {
if (stdout.includes('error')) {
done(new Error(stdout));
} else {
done();
}
})
.js.pipe(gulp.dest('./pythonExtensionApi/out'))
.on('finish', () => (failed ? done(new Error('TypeScript compilation errors')) : done()));
.catch((ex) => {
console.log(ex);
done(new Error('TypeScript compilation errors', ex));
});
});

gulp.task('compile', gulp.series('compileCore', 'compileApi'));
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2070,6 +2070,7 @@
"package": "gulp clean && gulp prePublishBundle && vsce package -o ms-python-insiders.vsix",
"prePublish": "gulp clean && gulp prePublishNonBundle",
"compile": "tsc -watch -p ./",
"compileApi": "node ./node_modules/typescript/lib/tsc.js -b ./pythonExtensionApi/tsconfig.json",
"compiled": "deemon npm run compile",
"kill-compiled": "deemon --kill npm run compile",
"checkDependencies": "gulp checkDependencies",
Expand Down Expand Up @@ -2189,7 +2190,7 @@
"flat": "^5.0.2",
"get-port": "^5.1.1",
"gulp": "^4.0.0",
"gulp-typescript": "^5.0.0",
"gulp-typescript": "^6.0.0-alpha.1",
"mocha": "^9.2.2",
"mocha-junit-reporter": "^2.0.2",
"mocha-multi-reporters": "^1.1.7",
Expand Down

0 comments on commit 34cea69

Please sign in to comment.