mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-10 02:40:59 +00:00
New: We now support source maps when compiling both from command line and in browsers.
To add source maps add the ”-S” flag to the Jake file when compiling from command line. In the browser you need to add the compiler option into your index.html file. It should look something like this: OBJJ_COMPILER_FLAGS = [... , "SourceMap"]; All browsers has support for source maps but currently Chrome works best.
This commit is contained in:
1 parent
033e8583db
commit
94a5995197
7 files changed
+3214
-43
No files matched your search
@@ -248,7 +248,8 @@ function decompile(/*String*/ aString, /*CFURL*/ aURL)
|
||||
*/
|
||||
var marker = NULL,
|
||||
code = "",
|
||||
dependencies = [];
|
||||
dependencies = [],
|
||||
sourceMap;
|
||||
|
||||
while (marker = stream.getMarker())
|
||||
{
|
||||
@@ -262,14 +263,17 @@ function decompile(/*String*/ aString, /*CFURL*/ aURL)
|
||||
|
||||
else if (marker === MARKER_IMPORT_LOCAL)
|
||||
dependencies.push(new FileDependency(new CFURL(text), YES));
|
||||
|
||||
else if (marker === MARKER_SOURCE_MAP)
|
||||
sourceMap = text;
|
||||
}
|
||||
|
||||
var fn = FileExecutable._lookupCachedFunction(aURL);
|
||||
|
||||
if (fn)
|
||||
return new Executable(code, dependencies, aURL, fn);
|
||||
return new Executable(code, dependencies, aURL, fn, null, null, sourceMap);
|
||||
|
||||
return new Executable(code, dependencies, aURL);
|
||||
return new Executable(code, dependencies, aURL, null, null, null, sourceMap);
|
||||
}
|
||||
|
||||
var FunctionCache = { };
|
||||
|
||||
Reference in new issue
Block a user