add launch & debug configurations
This commit is contained in:
parent
2bf4e91bd6
commit
6b703ef4b6
3 changed files with 44 additions and 2 deletions
20
.vscode/launch.json
vendored
Normal file
20
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Program",
|
||||
"program": "${workspaceFolder}/out/vsce",
|
||||
"args": [
|
||||
"--version"
|
||||
],
|
||||
"sourceMaps": true,
|
||||
"outputCapture": "std",
|
||||
"preLaunchTask": "compile"
|
||||
}
|
||||
]
|
||||
}
|
16
.vscode/tasks.json
vendored
Normal file
16
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "gulp",
|
||||
"task": "compile",
|
||||
"label": "compile",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
10
gulpfile.js
10
gulpfile.js
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const gulp = require('gulp');
|
||||
const gts = require('gulp-typescript');
|
||||
const sm = require('gulp-sourcemaps');
|
||||
|
@ -23,7 +24,12 @@ function compile() {
|
|||
.pipe(project());
|
||||
|
||||
const js = ts.js
|
||||
.pipe(sm.write('.'));
|
||||
.pipe(sm.write('.', {
|
||||
includeContent: false, sourceRoot: file => {
|
||||
const dirname = path.dirname(file.relative);
|
||||
return dirname === '.' ? '../src' : ('../src/' + dirname);
|
||||
}
|
||||
}));
|
||||
|
||||
const api = ts.dts
|
||||
.pipe(filter('**/api.d.ts'));
|
||||
|
@ -48,7 +54,7 @@ gulp.task('test', ['compile'], test);
|
|||
gulp.task('just-test', ['just-compile'], test);
|
||||
|
||||
function watch(task) {
|
||||
return () => gulp.watch(['src/**', 'typings/**'], [task]);
|
||||
return cb => gulp.watch(['src/**', 'typings/**'], [task]);
|
||||
}
|
||||
|
||||
gulp.task('watch', ['compile'], watch('just-compile'));
|
||||
|
|
Loading…
Add table
Reference in a new issue