From 9c02129a788a71dd90cecc558c39e3a14e0a5884 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 19 May 2014 09:55:24 -0400 Subject: [PATCH] Note that commonjs requires aren't supported --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 2cef153..f5429c0 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,18 @@ A longer example, demonstrating how to invoke the CoffeeScript compiler: $ gem install execjs + +# FAQ + +### Why can't I use CommonJS `require()` inside ExecJS? + +ExecJS provides a lowest common denominator interface to any JavaScript runtime. +Use ExecJS when it doesn't matter which JavaScript interpreter your code runs +in. If you want to access the Node API, you should check another library like +[commonjs.rb](https://github.com/cowboyd/commonjs.rb) designed to provide a +consistent interface. + + # License Copyright (c) 2013 Sam Stephenson and Josh Peek.