Skip to content

Commit

Permalink
add npx script
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffersonRibeiro committed Jan 30, 2024
1 parent 8a0b6e7 commit 0d9dea7
Show file tree
Hide file tree
Showing 4 changed files with 9,119 additions and 11,845 deletions.
8 changes: 8 additions & 0 deletions packages/generator-widget/bin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env node

const { execSync } = require("child_process");
const version = process.env.npm_package_version;

const args = process.argv.slice(2);
execSync(`npm install -g yo @mendix/generator-widget@${version}`);
execSync(`yo @mendix/widget@${version} ${args.join(" ")}`, { stdio: "inherit" });
2 changes: 1 addition & 1 deletion packages/generator-widget/generators/app/lib/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
`,

DIR_NOT_EMPTY_ERROR: chalk.bold.red(
"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"
"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"
),
INSTALL_FINISH_MSG:
"File configuration done, now running " + chalk.blueBright("npm install") + " to install dependencies",
Expand Down
Loading

0 comments on commit 0d9dea7

Please sign in to comment.