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');
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) {
@ -33,7 +36,7 @@ if (process.env['CODE_COVERAGE'] || process.argv.indexOf('--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';
}
@ -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);

View File

@ -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"

View File

@ -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": [