create-powerapps-project 0.17.2 → 0.19.1

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.
@@ -25,9 +25,9 @@ const install = (cwd, type) => {
25
25
  }
26
26
  }
27
27
  else {
28
- (0, child_process_1.spawnSync)(getNpm(), ['add', ...packages.devDependencies], { stdio: 'inherit', cwd });
28
+ (0, child_process_1.spawnSync)(getNpm(), ['install', ...packages.devDependencies], { stdio: 'inherit', cwd });
29
29
  if (packages.dependencies) {
30
- (0, child_process_1.spawnSync)(getNpm(), ['add', ...packages.dependencies], { stdio: 'inherit', cwd });
30
+ (0, child_process_1.spawnSync)(getNpm(), ['install', ...packages.dependencies], { stdio: 'inherit', cwd });
31
31
  }
32
32
  }
33
33
  };
@@ -36,16 +36,17 @@ function getPackages(type) {
36
36
  if (type === 'pcf') {
37
37
  return {
38
38
  dependencies: [
39
- 'react',
40
- 'react-dom',
39
+ 'react@17.0.2',
40
+ 'react-dom@17.0.2',
41
41
  '@fluentui/react',
42
42
  '@fluentui/font-icons-mdl2'
43
43
  ],
44
44
  devDependencies: [
45
45
  //`powerapps-project-${type}`,
46
- '@types/react',
47
- '@types/react-dom',
48
- '@types/xrm'
46
+ '@types/react@17.0.39',
47
+ '@types/react-dom@17.0.11',
48
+ '@types/xrm',
49
+ '-D'
49
50
  ]
50
51
  };
51
52
  }
package/lib/plopfile.js CHANGED
@@ -224,7 +224,9 @@ exports.default = (plop) => {
224
224
  destination: `${process.cwd()}/{{ name }}`,
225
225
  force: true,
226
226
  skip: (answers) => {
227
- return !answers.react;
227
+ if (!answers.react) {
228
+ return 'react not included';
229
+ }
228
230
  }
229
231
  },
230
232
  {
@@ -233,20 +235,26 @@ exports.default = (plop) => {
233
235
  path: path_1.default.resolve(process.cwd(), 'tsconfig.json'),
234
236
  force: true,
235
237
  skip: (answers) => {
236
- return !answers.react;
238
+ if (!answers.react) {
239
+ return 'react not included';
240
+ }
237
241
  }
238
242
  },
239
243
  {
240
244
  type: 'addGenScript',
241
245
  skip: (answers) => {
242
- return !answers.react;
246
+ if (!answers.react) {
247
+ return 'react not included';
248
+ }
243
249
  }
244
250
  },
245
251
  {
246
252
  type: 'npmInstall',
247
253
  projectType: 'pcf',
248
254
  skip: (answers) => {
249
- return !answers.react;
255
+ if (!answers.react) {
256
+ return 'react not included';
257
+ }
250
258
  }
251
259
  }
252
260
  ]
@@ -274,13 +282,6 @@ exports.default = (plop) => {
274
282
  base: '../plop-templates/webresource',
275
283
  destination: process.cwd(),
276
284
  force: true
277
- },
278
- {
279
- type: 'npmInstall',
280
- projectType: 'webresource',
281
- skip: (answers) => {
282
- return !answers.react;
283
- }
284
285
  }
285
286
  ]
286
287
  });
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.17.2",
4
+ "version": "0.19.1",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
7
7
  "main": "lib/index.js",
@@ -7,6 +7,7 @@ import { App, AppProps } from './App';
7
7
 
8
8
  export class {{name}} implements ComponentFramework.StandardControl<IInputs, IOutputs> {
9
9
  container: HTMLDivElement;
10
+ root: Root;
10
11
  context: ComponentFramework.Context<IInputs>;
11
12
  isTestHarness: boolean;
12
13
  props: AppProps;