Skip to content

Commit

Permalink
feat(lesy-plugin-demo): add input command
Browse files Browse the repository at this point in the history
  • Loading branch information
lokesh-coder committed Nov 23, 2020
1 parent 3ddad9d commit 829d658
Show file tree
Hide file tree
Showing 4 changed files with 273 additions and 0 deletions.
252 changes: 252 additions & 0 deletions packages/plugins/lesy-plugin-demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/plugins/lesy-plugin-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
"license": "MIT",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@lesy/lesy-plugin-prompt": "^1.0.0-beta.14"
}
}
17 changes: 17 additions & 0 deletions packages/plugins/lesy-plugin-demo/src/commands/input.command.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default {
name: "dummyInput",
description: `simple text input command`,
aliases: ["di", "inp"],
group: "Demo",
run: async ({ feature }) => {
console.log("feat", feature);
const answers = await feature.prompt([
{
name: "dummy-input",
message: "Type something",
type: "input",
},
]);
console.log(`you typed: ${answers["dummy-input"]}`);
},
};
1 change: 1 addition & 0 deletions packages/plugins/lesy-plugin-demo/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export default {
commands: [`${__dirname}/commands`],
plugins: ["@lesy/lesy-plugin-prompt"],
};

0 comments on commit 829d658

Please sign in to comment.