summaryrefslogtreecommitdiff
path: root/Examples/javascript/constant
diff options
context:
space:
mode:
authorOliver Buchtala <oliver.buchtala@googlemail.com>2014-02-26 22:44:37 +0100
committerOliver Buchtala <oliver.buchtala@googlemail.com>2014-02-26 22:44:37 +0100
commit15f12d9b59b9e8522853f010f9d443164774a6a6 (patch)
treeaee32ba5815bc10d16f4bdd81d40fda67760cf96 /Examples/javascript/constant
parentb216a739c45cfb595a5b70da7e811b6130148a63 (diff)
downloadswig-15f12d9b59b9e8522853f010f9d443164774a6a6.tar.gz
Make examples work with node.js and the custom interpreter.
Diffstat (limited to 'Examples/javascript/constant')
-rw-r--r--Examples/javascript/constant/example.js1
-rwxr-xr-xExamples/javascript/constant/runme.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/Examples/javascript/constant/example.js b/Examples/javascript/constant/example.js
new file mode 100644
index 000000000..79cd3913f
--- /dev/null
+++ b/Examples/javascript/constant/example.js
@@ -0,0 +1 @@
+module.exports = require("./build/Release/example");
diff --git a/Examples/javascript/constant/runme.js b/Examples/javascript/constant/runme.js
index b11c08c98..2188bf099 100755
--- a/Examples/javascript/constant/runme.js
+++ b/Examples/javascript/constant/runme.js
@@ -1,4 +1,4 @@
-var example = require("./build/Release/example");
+var example = require("./example");
console.log("ICONST = " + example.ICONST + " (should be 42)\n");
console.log("FCONST = " + example.FCONST + " (should be 2.1828)\n");