Skip to content

Commit

Permalink
fix: let sub class can override getFrameworkOrEggPath
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jun 19, 2016
1 parent 261a47a commit 1320144
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/DebugCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DebugCommand extends Command {
args.push('--cluster');
args.push('1');

const eggPath = this.helper.getFrameworkOrEggPath(cwd);
const eggPath = this.getFrameworkOrEggPath(cwd);
if (eggPath) {
args.push(`--eggPath=${eggPath}`);
}
Expand Down Expand Up @@ -56,6 +56,10 @@ class DebugCommand extends Command {
help() {
return 'Debug mode start';
}

getFrameworkOrEggPath(cwd) {
return this.helper.getFrameworkOrEggPath(cwd);
}
}

module.exports = DebugCommand;
6 changes: 5 additions & 1 deletion lib/DevCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class DevCommand extends Command {
args.push('--cluster');
args.push('1');

const eggPath = this.helper.getFrameworkOrEggPath(cwd);
const eggPath = this.getFrameworkOrEggPath(cwd);
if (eggPath) {
args.push(`--eggPath=${eggPath}`);
}
Expand All @@ -29,6 +29,10 @@ class DevCommand extends Command {
help() {
return 'local env start';
}

getFrameworkOrEggPath(cwd) {
return this.helper.getFrameworkOrEggPath(cwd);
}
}

module.exports = DevCommand;

0 comments on commit 1320144

Please sign in to comment.