The class that implements node's require() function.
Example #1
0
      private static CSharp.Context SetupContext(ResourceHelper resourceHelper)
      {
         var context = new CSharp.Context();

         context.CreatePrintFunction();

         var require = new RequireDefinition(context, resourceHelper);
         require.Define();

         return context;
      }
Example #2
0
      private static CSharp.Context SetupContext(ResourceHelper resourceHelper)
      {
         var context = new CSharp.Context();

         //context.CreatePrintFunction();
         // Debug.registerConsolePrinter();
         // IronJS.Support.Debug.registerAstPrinter(AstPrinter);
         // IronJS.Support.Debug.registerExprPrinter(ExprPrinter);
         
         ConsoleConstructor.AttachToContext(context);
          var require = new RequireDefinition(context, resourceHelper);
         require.Define();

         return context;
      }