Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Add init command
Browse files Browse the repository at this point in the history
  • Loading branch information
erming committed May 2, 2015
1 parent eb68a78 commit 1567548
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/command-line/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require("./add-user");
require("./edit-config");
require("./edit-user");
require("./list-users");
require("./init");
require("./remove-user");
require("./reset-config");
require("./reset-password");
Expand All @@ -24,6 +25,7 @@ function help() {
console.log(" edit-config");
console.log(" edit-user");
console.log(" help");
console.log(" init");
console.log(" list-users");
console.log(" remove-user");
console.log(" reset-config");
Expand Down
11 changes: 11 additions & 0 deletions src/command-line/init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var program = require("commander");

module.exports = init;

program
.command("init")
.action(init);

function init() {
console.log("Command 'init' triggered.");
}
6 changes: 6 additions & 0 deletions test/command-line/init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var tape = require("tape");
var init = require("../../src/command-line/init");

tape("init", function(t) {
t.end();
});

0 comments on commit 1567548

Please sign in to comment.