Skip to content

Commit

Permalink
[Angular] Adjust config generation messages order (#1885)
Browse files Browse the repository at this point in the history
  • Loading branch information
illiakovalenko authored Aug 13, 2024
1 parent b70d7b0 commit 713c2b8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ Our versioning strategy is as follows:

* `[create-sitecore-jss]` Introduced "node-xmcloud-proxy" addon ([#1863](https://github.com/Sitecore/jss/pull/1863))
* `[create-sitecore-jss]` `[template/angular]` `[template/angular-sxp]` `[template/angular-xmcloud]` Introduced "angular-sxp", "angular-xmcloud" addons ([#1838](https://github.com/Sitecore/jss/pull/1838))([#1845](https://github.com/Sitecore/jss/pull/1845))([#1858](https://github.com/Sitecore/jss/pull/1858))([#1865](https://github.com/Sitecore/jss/pull/1865)):
* The Angular app should now be initialized by providing both templates (or using CLI prompts):
* The Angular app should now be initialized by providing both templates (or using CLI prompts):
* SXP-based: 'angular,angular-sxp'
* XMCloud-based: 'angular,angular-xmcloud'
* Rework Angular initializer to support XMCloud and SXP journeys;
* Add SXA styles to xmcloud addon
* `[create-sitecore-jss]` `[template/angular]` `[template/angular-xmcloud]` `[template/node-xmcloud-proxy]` Edge Proxy / Context Id support ([#1875](https://github.com/Sitecore/jss/pull/1875))
* `[create-sitecore-jss]` `[template/angular]` `[template/angular-xmcloud]` `[template/node-xmcloud-proxy]` Edge Proxy / Context Id support ([#1875](https://github.com/Sitecore/jss/pull/1875))([#1885](https://github.com/Sitecore/jss/pull/1885))

* `[create-sitecore-jss]` Rework Angular initializer to support XMCloud and SXP journeys ([#1845](https://github.com/Sitecore/jss/pull/1845))([#1858](https://github.com/Sitecore/jss/pull/1858))([#1868](https://github.com/Sitecore/jss/pull/1868))([#1881](https://github.com/Sitecore/jss/pull/1881))([#1882](https://github.com/Sitecore/jss/pull/1882))
* `[create-sitecore-jss]` Allow node-xmcloud-proxy app to be installed alongside Angular SPA application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,16 @@ const defaultConfigValue: JssConfig = {
defaultServerRoute: '/',
};

generateConfig('src/environments/environment.js', defaultConfigValue, { production: false });
generateConfig('src/environments/environment.prod.js', defaultConfigValue, { production: true });
async function main() {
await generateConfig('src/environments/environment.js', defaultConfigValue, {
production: false,
});
await generateConfig('src/environments/environment.prod.js', defaultConfigValue, {
production: true,
});
}

main();

/**
* Generates the JSS config based on config plugins (under ./config/plugins)
Expand All @@ -47,7 +55,7 @@ export function generateConfig(
};
}, {});

jssConfigFactory
return jssConfigFactory
.create(defaultConfig)
.then((config) => {
writeConfig(Object.assign(config, configOverrides), outputPath);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as fs from 'fs';
import { generateConfig } from './generate-config';
import clientFactory from 'lib/graphql-client-factory';
import { getGraphQLClientFactoryConfig } from 'lib/graphql-client-factory/config';

Expand All @@ -10,7 +9,7 @@ import { getGraphQLClientFactoryConfig } from 'lib/graphql-client-factory/config
//
// The `jss graphql:update` command should be executed when Sitecore templates related to the site are altered.

generateConfig('src/environments/environment.js');
import './generate-config';

const clientFactoryConfig = getGraphQLClientFactoryConfig();

Expand Down

0 comments on commit 713c2b8

Please sign in to comment.