Skip to content

Commit

Permalink
build: remove generation of inline sourcemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin authored and hansl committed Mar 25, 2019
1 parent 78889f0 commit 3d313ae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
13 changes: 8 additions & 5 deletions lib/bootstrap-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,20 @@ const tmpRoot = temp.mkdirSync('angular-devkit-');

debugLocal('starting bootstrap local');

const compilerOptions = ts.readConfigFile(path.join(__dirname, '../tsconfig.json'), p => {
return fs.readFileSync(p, 'utf-8');
}).config;
// This processes any extended configs
const compilerOptions = ts.getParsedCommandLineOfConfigFile(
path.join(__dirname, '../tsconfig-test.json'),
{ },
ts.sys,
).options;

let _istanbulRequireHook = null;
if (process.env['CODE_COVERAGE'] || process.argv.indexOf('--code-coverage') !== -1) {
debugLocal('setup code coverage');
_istanbulRequireHook = require('./istanbul-local').istanbulRequireHook;
// async keyword isn't supported by the Esprima version used by Istanbul version used by us.
// TODO: update istanbul to istanbul-lib-* (see http://istanbul.js.org/) and remove this hack.
compilerOptions.compilerOptions.target = 'es2016';
compilerOptions.target = 'es2016';
}


Expand Down Expand Up @@ -98,7 +101,7 @@ require.extensions['.ts'] = function (m, filename) {
const source = fs.readFileSync(filename).toString();

try {
let result = ts.transpile(source, compilerOptions['compilerOptions'], filename);
let result = ts.transpile(source, compilerOptions, filename);

if (_istanbulRequireHook) {
result = _istanbulRequireHook(result, filename);
Expand Down
6 changes: 6 additions & 0 deletions tsconfig-test.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"inlineSourceMap": true,
"sourceRoot": ".",
// Inline sources are necessary for our tests to show the proper sources, since we are using
// Istanbul (not Constantinople) as well, and applying both source maps to get the original
// source in devtools.
"inlineSources": true,
"types": [
"node",
"jasmine"
Expand Down
6 changes: 0 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
"rootDir": ".",
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"inlineSourceMap": true,
"sourceRoot": ".",
// Inline sources are necessary for our tests to show the proper sources, since we are using
// Istanbul (not Constantinople) as well, and applying both source maps to get the original
// source in devtools.
"inlineSources": true,
"strictNullChecks": true,
"target": "es2017",
"lib": [
Expand Down

0 comments on commit 3d313ae

Please sign in to comment.