Commits

joneshf committed c13a77e

Stdio flag can take browser/bare flag.

Comments (0)

Files changed (1)

             source += data;
         });
         process.stdin.on('end', function() {
-            console.log(compile(source).output);
+            console.log(compile(source, null, null, opts).output);
         });
         return;
     case "-p":
         break;
     case "-b":
     case "--browser":
-        opts.browserModules = true;
+        opts.nodejs = false;
         argv.shift();
         break;
     case "-c":
         var sourceMap = new SourceMapGenerator({file: path.basename(outputPath)});
 
         var compiled = compile(source, env, aliases, {
-            nodejs: !opts.browserModules,
+            nodejs: opts.nodejs,
             filename: filename,
             run: opts.run,
             exported: exported,
     var opts = {
         colorConsole: false,
         info: JSON.parse(fs.readFileSync(path.dirname(__dirname) + '/package.json', 'utf8')),
-        browserModules: false,
+        nodejs: true,
         run: false,
         includePrelude: true
     };