create-sitecore-jss 22.2.0-canary.17 → 22.2.0-canary.19
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
|
-
|
|
28
|
-
generateConfig('src/environments/environment.
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "22.2.0-canary.19",
|
|
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": "
|
|
66
|
+
"gitHead": "cb4b95560f4fc0863ca240f29ffed7dfa810cf15"
|
|
67
67
|
}
|