From 03dcee598c1846c278a1e7ef707030351aeea0a5 Mon Sep 17 00:00:00 2001 From: Thomas Wood <thomas.wood09@imperial.ac.uk> Date: Thu, 10 Mar 2016 12:53:29 +0000 Subject: [PATCH] Fixup relative paths after directory flattening --- driver.html | 6 +++--- esprima-to-ast.js | 14 +++++++++----- navig-poc.html | 6 +++--- navig.html | 6 +++--- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/driver.html b/driver.html index a859ea3..1f374fb 100644 --- a/driver.html +++ b/driver.html @@ -4,10 +4,10 @@ <meta charset="utf-8"> <title>JavaScript Reference Tracer</title> -<script src="../../interp/tracer/jquery-2.1.1.min.js"></script> +<script src="../interp/tracer/jquery-2.1.1.min.js"></script> -<link rel=stylesheet href="../../interp/tracer/codemirror/lib/codemirror.css"> -<script src="../../interp/tracer/codemirror/lib/codemirror.js"></script> +<link rel=stylesheet href="../interp/tracer/codemirror/lib/codemirror.css"> +<script src="../interp/tracer/codemirror/lib/codemirror.js"></script> <!-- styles needed by jScrollPane - include in your own sites --> diff --git a/esprima-to-ast.js b/esprima-to-ast.js index e86aaf8..44ade73 100644 --- a/esprima-to-ast.js +++ b/esprima-to-ast.js @@ -616,8 +616,12 @@ function NewASTErrorType(name, parentError) { var EsprimaToASTError = NewASTErrorType("EsprimaToASTError", Error); var UnsupportedSyntaxError = NewASTErrorType("UnsupportedSyntaxError", EsprimaToASTError); -// For testing purposes with node -module.exports.esprimaToAST = esprimaToAST; -module.exports.EsprimaToASTError = EsprimaToASTError; -module.exports.UnsupportedSyntaxError = UnsupportedSyntaxError; -module.exports.toString = toString; +try { + // For testing purposes with node + module.exports.esprimaToAST = esprimaToAST; + module.exports.EsprimaToASTError = EsprimaToASTError; + module.exports.UnsupportedSyntaxError = UnsupportedSyntaxError; + module.exports.toString = toString; +} catch (e) { + // Ignore these, as we're not using node +} diff --git a/navig-poc.html b/navig-poc.html index 54c7701..9a168f8 100644 --- a/navig-poc.html +++ b/navig-poc.html @@ -6,10 +6,10 @@ -<script src="../../interp/tracer/jquery-2.1.1.min.js"></script> +<script src="../interp/tracer/jquery-2.1.1.min.js"></script> -<link rel=stylesheet href="../../interp/tracer/codemirror/lib/codemirror.css"> -<script src="../../interp/tracer/codemirror/lib/codemirror.js"></script> +<link rel=stylesheet href="../interp/tracer/codemirror/lib/codemirror.css"> +<script src="../interp/tracer/codemirror/lib/codemirror.js"></script> <!-- styles needed by jScrollPane - include in your own sites --> diff --git a/navig.html b/navig.html index 4fd9701..7e49b21 100644 --- a/navig.html +++ b/navig.html @@ -8,10 +8,10 @@ -<script src="../../interp/tracer/jquery-2.1.1.min.js"></script> +<script src="../interp/tracer/jquery-2.1.1.min.js"></script> -<link rel=stylesheet href="../../interp/tracer/codemirror/lib/codemirror.css"> -<script src="../../interp/tracer/codemirror/lib/codemirror.js"></script> +<link rel=stylesheet href="../interp/tracer/codemirror/lib/codemirror.css"> +<script src="../interp/tracer/codemirror/lib/codemirror.js"></script> <!-- styles needed by jScrollPane - include in your own sites --> -- GitLab