build: remove generation of inline sourcemaps

This commit is contained in:
Charles Lyding 2019-03-22 17:54:46 -04:00 committed by Hans
parent 78889f03ac
commit 3d313aede8
3 changed files with 14 additions and 11 deletions

View File

@ -23,9 +23,12 @@ const tmpRoot = temp.mkdirSync('angular-devkit-');
debugLocal('starting bootstrap local'); debugLocal('starting bootstrap local');
const compilerOptions = ts.readConfigFile(path.join(__dirname, '../tsconfig.json'), p => { // This processes any extended configs
return fs.readFileSync(p, 'utf-8'); const compilerOptions = ts.getParsedCommandLineOfConfigFile(
}).config; path.join(__dirname, '../tsconfig-test.json'),
{ },
ts.sys,
).options;
let _istanbulRequireHook = null; let _istanbulRequireHook = null;
if (process.env['CODE_COVERAGE'] || process.argv.indexOf('--code-coverage') !== -1) { if (process.env['CODE_COVERAGE'] || process.argv.indexOf('--code-coverage') !== -1) {
@ -33,7 +36,7 @@ if (process.env['CODE_COVERAGE'] || process.argv.indexOf('--code-coverage') !==
_istanbulRequireHook = require('./istanbul-local').istanbulRequireHook; _istanbulRequireHook = require('./istanbul-local').istanbulRequireHook;
// async keyword isn't supported by the Esprima version used by Istanbul version used by us. // 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. // TODO: update istanbul to istanbul-lib-* (see http://istanbul.js.org/) and remove this hack.
compilerOptions.compilerOptions.target = 'es2016'; compilerOptions.target = 'es2016';
} }
@ -98,7 +101,7 @@ require.extensions['.ts'] = function (m, filename) {
const source = fs.readFileSync(filename).toString(); const source = fs.readFileSync(filename).toString();
try { try {
let result = ts.transpile(source, compilerOptions['compilerOptions'], filename); let result = ts.transpile(source, compilerOptions, filename);
if (_istanbulRequireHook) { if (_istanbulRequireHook) {
result = _istanbulRequireHook(result, filename); result = _istanbulRequireHook(result, filename);

View File

@ -1,6 +1,12 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "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": [ "types": [
"node", "node",
"jasmine" "jasmine"

View File

@ -15,12 +15,6 @@
"rootDir": ".", "rootDir": ".",
"skipDefaultLibCheck": true, "skipDefaultLibCheck": true,
"skipLibCheck": 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, "strictNullChecks": true,
"target": "es2017", "target": "es2017",
"lib": [ "lib": [