Skip to content

Commit e37b5de

Browse files
authored
Merge pull request #26 from vegarringdal/master
v2.3.2 cleanup/tsconfig more setting and sourcemaps added
2 parents 2113aae + 2d2dfa8 commit e37b5de

24 files changed

+194
-203
lines changed

.vscode/extensions.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"recommendations": [
33
"eg2.tslint",
44
"HookyQR.beautify",
5-
"joelday.docthis"
5+
"joelday.docthis",
6+
"patrys.vscode-code-outline",
7+
"hnw.vscode-auto-open-markdown-preview"
68
]
79
}

.vscode/launch.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"request": "launch",
1010
"name": "Launch Program",
1111
"program": "${workspaceRoot}\\test.js",
12+
"smartStep":true,
13+
"sourceMaps": true,
1214
"outFiles": [
1315
"${workspaceRoot}/out/**/*.js"
1416
]

build/build.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ var sourcemaps = require('gulp-sourcemaps');
44
var plumber = require('gulp-plumber');
55
var merge = require('merge2');
66
var paths = require('./paths');
7+
var changed = require('gulp-changed');
78
var runSequence = require('run-sequence');
89

910

10-
1111
/**
1212
* Create typescript project from tsconfig in "commonjs" output
1313
*
@@ -29,11 +29,21 @@ var tsProjectCJS = ts.createProject('./tsconfig.json', {
2929
function build(tsProject, outputPath) {
3030
var tsResult = gulp.src(paths.dtsSrc.concat(paths.source))
3131
.pipe(plumber())
32+
.pipe(changed(outputPath, {
33+
extension: '.ts'
34+
}))
35+
.pipe(sourcemaps.init({
36+
loadMaps: true
37+
}))
3238
.pipe(tsProject());
3339
return merge([ // Merge the two output streams, so this task is finished when the IO of both operations is done.
3440
tsResult.dts.pipe(gulp.dest(outputPath)),
3541
tsResult.js.pipe(gulp.dest(outputPath))
3642
])
43+
.pipe(sourcemaps.write('.', {
44+
includeContent: true,
45+
sourceRoot: paths.root
46+
}))
3747
.pipe(gulp.dest(outputPath))
3848
}
3949

@@ -59,5 +69,4 @@ gulp.task('build', function (callback) {
5969
'clean', ['build-commonjs'],
6070
callback
6171
);
62-
});
63-
72+
});

build/paths.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
var srcRoot = 'src/';
22
var distRoot = 'dist/';
3+
var distDevRoot = 'distTemp/';
34

45

56
module.exports = {
67
root: srcRoot,
78
source: srcRoot + '**/*.ts',
89
output: distRoot,
10+
outputDev: distDevRoot,
911
dtsSrc: [
1012
'./typings/**/*.d.ts',
1113
'./custom_typings/**/*.d.ts'

dist/commonjs/checker.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export declare class Checker {
55
private elapsedInspectionTime;
66
private tsDiagnostics;
77
private lintFileResult;
8-
private END_LINE;
98
constructor();
109
inspectCode(options: InternalTypeCheckerOptions): void;
1110
printResult(isWorker?: boolean): number;

dist/commonjs/checker.js

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/commonjs/checker.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/commonjs/index.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)