Skip to content

Commit 829d658

Browse files
committed
feat(lesy-plugin-demo): add input command
1 parent 3ddad9d commit 829d658

File tree

4 files changed

+273
-0
lines changed

4 files changed

+273
-0
lines changed

packages/plugins/lesy-plugin-demo/package-lock.json

Lines changed: 252 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/plugins/lesy-plugin-demo/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@
2020
"license": "MIT",
2121
"publishConfig": {
2222
"access": "public"
23+
},
24+
"dependencies": {
25+
"@lesy/lesy-plugin-prompt": "^1.0.0-beta.14"
2326
}
2427
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export default {
2+
name: "dummyInput",
3+
description: `simple text input command`,
4+
aliases: ["di", "inp"],
5+
group: "Demo",
6+
run: async ({ feature }) => {
7+
console.log("feat", feature);
8+
const answers = await feature.prompt([
9+
{
10+
name: "dummy-input",
11+
message: "Type something",
12+
type: "input",
13+
},
14+
]);
15+
console.log(`you typed: ${answers["dummy-input"]}`);
16+
},
17+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export default {
22
commands: [`${__dirname}/commands`],
3+
plugins: ["@lesy/lesy-plugin-prompt"],
34
};

0 commit comments

Comments
 (0)