create-powerapps-project 0.21.3 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +19 -10
  2. package/package.json +4 -2
package/lib/index.js CHANGED
@@ -6,13 +6,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const node_path_1 = __importDefault(require("node:path"));
8
8
  const plop_1 = require("plop");
9
- plop_1.Plop.launch({
10
- cwd: process.cwd(),
11
- configPath: node_path_1.default.join(__dirname, 'plopfile.js')
12
- }, env => {
13
- const options = {
14
- ...env,
15
- dest: process.cwd() // this will make the destination path to be based on the cwd when calling the wrapper
16
- };
17
- return (0, plop_1.run)(options, undefined, true);
18
- });
9
+ const minimist_1 = __importDefault(require("minimist"));
10
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
11
+ const packageJson = require('../package.json');
12
+ const argv = (0, minimist_1.default)(process.argv.slice(2));
13
+ if (argv.version || argv.v) {
14
+ console.log(`${packageJson.version}`);
15
+ }
16
+ else {
17
+ plop_1.Plop.launch({
18
+ cwd: process.cwd(),
19
+ configPath: node_path_1.default.join(__dirname, 'plopfile.js')
20
+ }, env => {
21
+ const options = {
22
+ ...env,
23
+ dest: process.cwd()
24
+ };
25
+ return (0, plop_1.run)(options, undefined, true);
26
+ });
27
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-powerapps-project",
3
3
  "description": "💧 plop generator for Dataverse development",
4
- "version": "0.21.3",
4
+ "version": "0.22.0",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
7
7
  "bin": {
@@ -22,9 +22,11 @@
22
22
  "clean": "rimraf lib"
23
23
  },
24
24
  "dependencies": {
25
- "plop": "^2.7.6"
25
+ "plop": "^2.7.6",
26
+ "minimist": "^1.2.6"
26
27
  },
27
28
  "devDependencies": {
29
+ "@types/minimist": "^1.2.2",
28
30
  "@types/node": "^14.14.21"
29
31
  }
30
32
  }