mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Add inlineSourceMap option
This commit is contained in:
9
tests/baselines/reference/inlineSourceMap.errors.txt
Normal file
9
tests/baselines/reference/inlineSourceMap.errors.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
tests/cases/compiler/inlineSourceMap.ts(3,1): error TS2304: Cannot find name 'console'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/inlineSourceMap.ts (1 errors) ====
|
||||
|
||||
var x = 0;
|
||||
console.log(x);
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
9
tests/baselines/reference/inlineSourceMap.js
Normal file
9
tests/baselines/reference/inlineSourceMap.js
Normal file
@@ -0,0 +1,9 @@
|
||||
//// [inlineSourceMap.ts]
|
||||
|
||||
var x = 0;
|
||||
console.log(x);
|
||||
|
||||
//// [inlineSourceMap.js]
|
||||
var x = 0;
|
||||
console.log(x);
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lU291cmNlTWFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaW5saW5lU291cmNlTWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJcbnZhciB4ID0gMDtcbmNvbnNvbGUubG9nKHgpOyJdfQ==
|
||||
61
tests/baselines/reference/inlineSourceMap.sourcemap.txt
Normal file
61
tests/baselines/reference/inlineSourceMap.sourcemap.txt
Normal file
@@ -0,0 +1,61 @@
|
||||
===================================================================
|
||||
JsFile: inlineSourceMap.js
|
||||
mapUrl: inlineSourceMap.js.map
|
||||
sourceRoot:
|
||||
sources: inlineSourceMap.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/compiler/inlineSourceMap.js
|
||||
sourceFile:inlineSourceMap.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var x = 0;
|
||||
1 >
|
||||
2 >^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^
|
||||
7 > ^^^^^^->
|
||||
1 >
|
||||
>
|
||||
2 >var
|
||||
3 > x
|
||||
4 > =
|
||||
5 > 0
|
||||
6 > ;
|
||||
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 5) Source(2, 5) + SourceIndex(0)
|
||||
3 >Emitted(1, 6) Source(2, 6) + SourceIndex(0)
|
||||
4 >Emitted(1, 9) Source(2, 9) + SourceIndex(0)
|
||||
5 >Emitted(1, 10) Source(2, 10) + SourceIndex(0)
|
||||
6 >Emitted(1, 11) Source(2, 11) + SourceIndex(0)
|
||||
---
|
||||
>>>console.log(x);
|
||||
1->
|
||||
2 >^^^^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^
|
||||
7 > ^
|
||||
8 > ^
|
||||
9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->
|
||||
>
|
||||
2 >console
|
||||
3 > .
|
||||
4 > log
|
||||
5 > (
|
||||
6 > x
|
||||
7 > )
|
||||
8 > ;
|
||||
1->Emitted(2, 1) Source(3, 1) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(3, 8) + SourceIndex(0)
|
||||
3 >Emitted(2, 9) Source(3, 9) + SourceIndex(0)
|
||||
4 >Emitted(2, 12) Source(3, 12) + SourceIndex(0)
|
||||
5 >Emitted(2, 13) Source(3, 13) + SourceIndex(0)
|
||||
6 >Emitted(2, 14) Source(3, 14) + SourceIndex(0)
|
||||
7 >Emitted(2, 15) Source(3, 15) + SourceIndex(0)
|
||||
8 >Emitted(2, 16) Source(3, 16) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lU291cmNlTWFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaW5saW5lU291cmNlTWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJcbnZhciB4ID0gMDtcbmNvbnNvbGUubG9nKHgpOyJdfQ==
|
||||
19
tests/baselines/reference/inlineSourceMap2.errors.txt
Normal file
19
tests/baselines/reference/inlineSourceMap2.errors.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
error TS5051: Option 'out' cannot be specified with option 'inlineSourceMap'.
|
||||
error TS5050: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'.
|
||||
error TS5049: Option 'sourceRoot' cannot be specified with option 'inlineSourceMap'.
|
||||
error TS5048: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'.
|
||||
tests/cases/compiler/inlineSourceMap2.ts(5,1): error TS2304: Cannot find name 'console'.
|
||||
|
||||
|
||||
!!! error TS5051: Option 'out' cannot be specified with option 'inlineSourceMap'.
|
||||
!!! error TS5050: Option 'mapRoot' cannot be specified with option 'inlineSourceMap'.
|
||||
!!! error TS5049: Option 'sourceRoot' cannot be specified with option 'inlineSourceMap'.
|
||||
!!! error TS5048: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'.
|
||||
==== tests/cases/compiler/inlineSourceMap2.ts (1 errors) ====
|
||||
|
||||
// configuration errors
|
||||
|
||||
var x = 0;
|
||||
console.log(x);
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
12
tests/baselines/reference/inlineSourceMap2.js
Normal file
12
tests/baselines/reference/inlineSourceMap2.js
Normal file
@@ -0,0 +1,12 @@
|
||||
//// [inlineSourceMap2.ts]
|
||||
|
||||
// configuration errors
|
||||
|
||||
var x = 0;
|
||||
console.log(x);
|
||||
|
||||
//// [outfile.js]
|
||||
// configuration errors
|
||||
var x = 0;
|
||||
console.log(x);
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0ZmlsZS5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJcbi8vIGNvbmZpZ3VyYXRpb24gZXJyb3JzXG5cbnZhciB4ID0gMDtcbmNvbnNvbGUubG9nKHgpOyJdfQ==
|
||||
71
tests/baselines/reference/inlineSourceMap2.sourcemap.txt
Normal file
71
tests/baselines/reference/inlineSourceMap2.sourcemap.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
===================================================================
|
||||
JsFile: outfile.js
|
||||
mapUrl: file:///folder/outfile.js.map
|
||||
sourceRoot: file:///folder/
|
||||
sources: inlineSourceMap2.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:outfile.js
|
||||
sourceFile:inlineSourceMap2.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>// configuration errors
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1 >
|
||||
>
|
||||
2 >// configuration errors
|
||||
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 24) Source(2, 24) + SourceIndex(0)
|
||||
---
|
||||
>>>var x = 0;
|
||||
1 >
|
||||
2 >^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^
|
||||
7 > ^^^^^^->
|
||||
1 >
|
||||
>
|
||||
>
|
||||
2 >var
|
||||
3 > x
|
||||
4 > =
|
||||
5 > 0
|
||||
6 > ;
|
||||
1 >Emitted(2, 1) Source(4, 1) + SourceIndex(0)
|
||||
2 >Emitted(2, 5) Source(4, 5) + SourceIndex(0)
|
||||
3 >Emitted(2, 6) Source(4, 6) + SourceIndex(0)
|
||||
4 >Emitted(2, 9) Source(4, 9) + SourceIndex(0)
|
||||
5 >Emitted(2, 10) Source(4, 10) + SourceIndex(0)
|
||||
6 >Emitted(2, 11) Source(4, 11) + SourceIndex(0)
|
||||
---
|
||||
>>>console.log(x);
|
||||
1->
|
||||
2 >^^^^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^
|
||||
7 > ^
|
||||
8 > ^
|
||||
9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->
|
||||
>
|
||||
2 >console
|
||||
3 > .
|
||||
4 > log
|
||||
5 > (
|
||||
6 > x
|
||||
7 > )
|
||||
8 > ;
|
||||
1->Emitted(3, 1) Source(5, 1) + SourceIndex(0)
|
||||
2 >Emitted(3, 8) Source(5, 8) + SourceIndex(0)
|
||||
3 >Emitted(3, 9) Source(5, 9) + SourceIndex(0)
|
||||
4 >Emitted(3, 12) Source(5, 12) + SourceIndex(0)
|
||||
5 >Emitted(3, 13) Source(5, 13) + SourceIndex(0)
|
||||
6 >Emitted(3, 14) Source(5, 14) + SourceIndex(0)
|
||||
7 >Emitted(3, 15) Source(5, 15) + SourceIndex(0)
|
||||
8 >Emitted(3, 16) Source(5, 16) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0ZmlsZS5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJcbi8vIGNvbmZpZ3VyYXRpb24gZXJyb3JzXG5cbnZhciB4ID0gMDtcbmNvbnNvbGUubG9nKHgpOyJdfQ==
|
||||
5
tests/cases/compiler/inlineSourceMap.ts
Normal file
5
tests/cases/compiler/inlineSourceMap.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// @target: ES3
|
||||
// @inlinesourcemap: true
|
||||
|
||||
var x = 0;
|
||||
console.log(x);
|
||||
11
tests/cases/compiler/inlineSourceMap2.ts
Normal file
11
tests/cases/compiler/inlineSourceMap2.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
// @target: ES3
|
||||
// @sourcemap: true
|
||||
// @maproot: file:///folder
|
||||
// @sourceroot: file:///folder
|
||||
// @out: outfile.js
|
||||
// @inlinesourcemap: true
|
||||
|
||||
// configuration errors
|
||||
|
||||
var x = 0;
|
||||
console.log(x);
|
||||
Reference in New Issue
Block a user