Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 3 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 12 additions and 3 deletions.
  1. +12 −3 lib/run.js
View
15 lib/run.js
@@ -29,7 +29,9 @@ var run = module.exports = function(main) {
var proto = require('module').prototype;
var protoRequire = proto.require;
proto.require = function(path) {
- path = remap[path] || path;
+ if (options.r) {
+ path = remap[path] || path;
+ }
return ~all.modules.indexOf(path) ? all[path] : protoRequire.call(this,
path);
};
@@ -52,7 +54,14 @@ var run = module.exports = function(main) {
return;
}
- if (argv.length > 1) {
+ if (options.e) {
+ argv.shift();
+ spawn(function() {
+ argv.forEach(function(e) {
+ eval(e);
+ });
+ });
+ } else if (argv.length > 1) {
spawn(function() {
try {
if (typeof main == 'function') {
@@ -61,7 +70,7 @@ var run = module.exports = function(main) {
var module = require(mainPath);
if (module.app) {
var httpserver = require('./httpserver');
- if(!httpserver.started) {
+ if (!httpserver.started) {
httpserver.main(module.app, argv[2]);
}
}

No commit comments for this range

Something went wrong with that request. Please try again.