create-sitecore-jss 22.2.0-canary.16 → 22.2.0-canary.18

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.
@@ -24,8 +24,16 @@ const defaultConfigValue: JssConfig = {
24
24
  defaultServerRoute: '/',
25
25
  };
26
26
 
27
- generateConfig('src/environments/environment.js', defaultConfigValue, { production: false });
28
- generateConfig('src/environments/environment.prod.js', defaultConfigValue, { production: true });
27
+ async function main() {
28
+ await generateConfig('src/environments/environment.js', defaultConfigValue, {
29
+ production: false,
30
+ });
31
+ await generateConfig('src/environments/environment.prod.js', defaultConfigValue, {
32
+ production: true,
33
+ });
34
+ }
35
+
36
+ main();
29
37
 
30
38
  /**
31
39
  * Generates the JSS config based on config plugins (under ./config/plugins)
@@ -47,7 +55,7 @@ export function generateConfig(
47
55
  };
48
56
  }, {});
49
57
 
50
- jssConfigFactory
58
+ return jssConfigFactory
51
59
  .create(defaultConfig)
52
60
  .then((config) => {
53
61
  writeConfig(Object.assign(config, configOverrides), outputPath);
@@ -1,5 +1,4 @@
1
1
  import * as fs from 'fs';
2
- import { generateConfig } from './generate-config';
3
2
  import clientFactory from 'lib/graphql-client-factory';
4
3
  import { getGraphQLClientFactoryConfig } from 'lib/graphql-client-factory/config';
5
4
 
@@ -10,7 +9,7 @@ import { getGraphQLClientFactoryConfig } from 'lib/graphql-client-factory/config
10
9
  //
11
10
  // The `jss graphql:update` command should be executed when Sitecore templates related to the site are altered.
12
11
 
13
- generateConfig('src/environments/environment.js');
12
+ import './generate-config';
14
13
 
15
14
  const clientFactoryConfig = getGraphQLClientFactoryConfig();
16
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sitecore-jss",
3
- "version": "22.2.0-canary.16",
3
+ "version": "22.2.0-canary.18",
4
4
  "description": "Sitecore JSS initializer",
5
5
  "bin": "./dist/index.js",
6
6
  "scripts": {
@@ -63,5 +63,5 @@
63
63
  "ts-node": "^10.9.1",
64
64
  "typescript": "~4.9.5"
65
65
  },
66
- "gitHead": "40fde917c5ffee0244d997612cc638496fd26f10"
66
+ "gitHead": "757f81ef24c9cec4bc09813de19a9d54b5b3cf4c"
67
67
  }