Skip to content

Commit 0d9dea7

Browse files
add npx script
1 parent 8a0b6e7 commit 0d9dea7

File tree

4 files changed

+9119
-11845
lines changed

4 files changed

+9119
-11845
lines changed

packages/generator-widget/bin.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env node
2+
3+
const { execSync } = require("child_process");
4+
const version = process.env.npm_package_version;
5+
6+
const args = process.argv.slice(2);
7+
execSync(`npm install -g yo @mendix/generator-widget@${version}`);
8+
execSync(`yo @mendix/widget@${version} ${args.join(" ")}`, { stdio: "inherit" });

packages/generator-widget/generators/app/lib/text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
`,
2020

2121
DIR_NOT_EMPTY_ERROR: chalk.bold.red(
22-
"The directory you are trying to use is not empty, please open the generator in an empty folder or type yo @mendix/widget WidgetName\n"
22+
"The directory you are trying to use is not empty, please open the generator in an empty folder or type npx @mendix/generator-widget WidgetName\n"
2323
),
2424
INSTALL_FINISH_MSG:
2525
"File configuration done, now running " + chalk.blueBright("npm install") + " to install dependencies",

0 commit comments

Comments
 (0)