@eui/tools 4.15.11 → 4.15.12

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 (59) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +10 -0
  3. package/bin/eui-scripts.js +2 -0
  4. package/bin/scripts/build-package-sub.js +20 -0
  5. package/global.test.js +3 -3
  6. package/package.json +12 -16
  7. package/sandbox.js +3 -2
  8. package/scripts/csdr/cli/app.js +30 -3
  9. package/scripts/csdr/cli/skeletons/app-showcase-eui13/angular-config.json +33 -0
  10. package/scripts/csdr/cli/skeletons/app-showcase-eui13/dependencies-composite.json +5 -0
  11. package/scripts/csdr/cli/skeletons/app-showcase-eui13/gitignore_TO_REPLACE +50 -0
  12. package/scripts/csdr/cli/skeletons/app-showcase-eui13/package.json +6 -0
  13. package/scripts/csdr/cli/skeletons/app-showcase-eui13/scripts.json +3 -0
  14. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app-routing.module.ts +21 -0
  15. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.html +26 -0
  16. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.ts +19 -0
  17. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.routes.ts +7 -0
  18. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home-routing.module.ts +15 -0
  19. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.html +7 -0
  20. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.ts +8 -0
  21. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.module.ts +17 -0
  22. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/shared/shared.module.ts +15 -0
  23. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/app-metadata.json +8 -0
  24. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/config/env-json-config.json +41 -0
  25. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/index.html +22 -0
  26. package/scripts/csdr/config/angular.js +213 -3
  27. package/scripts/csdr/config/global.js +16 -0
  28. package/scripts/csdr/install/common.js +26 -8
  29. package/scripts/csdr/jira/jira-utils.js +168 -168
  30. package/scripts/csdr/jira/update.js +150 -150
  31. package/scripts/csdr/metadata/app-envs.js +34 -33
  32. package/scripts/csdr/metadata/app-history.js +62 -61
  33. package/scripts/csdr/metadata/common.js +2 -2
  34. package/scripts/csdr/metadata/package-history.js +0 -1
  35. package/scripts/csdr/sync/sync-utils.js +6 -2
  36. package/scripts/utils/build/package/build-package-utils.js +45 -0
  37. package/scripts/utils/build/package/styles.js +106 -7
  38. package/scripts/utils/confluence-utils.js +126 -126
  39. package/scripts/utils/index.js +2 -2
  40. package/scripts/utils/pre-build/injection/app-sources-full-skeleton/src/_generated/favicon.ico +0 -0
  41. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/app.module.ts +52 -0
  42. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/core/reducers/index.ts +40 -0
  43. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/global.ts +4 -0
  44. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/index.ts +8 -0
  45. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/modules.ts +4 -0
  46. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.dev.ts +9 -0
  47. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.prod.ts +9 -0
  48. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.ts +21 -0
  49. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/favicon.ico +0 -0
  50. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/karma.conf.js +7 -0
  51. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/main.ts +21 -0
  52. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/polyfills.ts +86 -0
  53. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/tst.ts +33 -0
  54. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.app.json +19 -0
  55. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.spec.json +9 -0
  56. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tslint.json +17 -0
  57. package/scripts/utils/pre-build/injection/skeletons.js +6 -2
  58. package/scripts/utils/pre-build/projects.js +5 -1
  59. package/scripts/utils/tools.js +13 -0
@@ -10,10 +10,11 @@ const tools = require('../../tools');
10
10
  const notificationUtils = require('../../notification/notification-utils');
11
11
 
12
12
  // FETCH ARGS
13
- let { deps, skipClean, skipLint, skipTest, skipCompile, skipDoc } = tools.getArgs();
13
+ let { skipCompile } = tools.getArgs();
14
14
 
15
15
 
16
- const compileSassFile = (folder, filename, isNodeSassTildeImporterActive) => {
16
+ const compileSassFileNodeSass = (folder, filename, isNodeSassTildeImporterActive) => {
17
+
17
18
  const filePath = path.join(folder, 'styles', filename);
18
19
 
19
20
  tools.logInfo(`Compiling ${filePath}.scss...`);
@@ -92,6 +93,102 @@ const compileSassFile = (folder, filename, isNodeSassTildeImporterActive) => {
92
93
 
93
94
 
94
95
 
96
+ const compileSassFileDartSass = (folder, filename) => {
97
+ const filePath = path.join(folder, 'styles', filename);
98
+
99
+ tools.logInfo(`Compiling ${filePath}.scss...`);
100
+
101
+ return Promise.resolve()
102
+ .then(() => {
103
+ tools.logInfo('Compiling SCSS...');
104
+
105
+ const sass = require('sass');
106
+
107
+ return sass.renderSync({
108
+ file: filePath + '.scss',
109
+ outFile: filePath + '.temp.css',
110
+ sourceMap: true,
111
+ sourceMapContents: true,
112
+ sourceMapEmbed: true,
113
+ includePaths: [
114
+ path.resolve(process.cwd(), 'node_modules'),
115
+ ],
116
+ });
117
+ })
118
+
119
+ .then((sassResult) => {
120
+ const finalDest = filePath + '.css';
121
+
122
+ const cssnano = require('cssnano');
123
+ const autoprefixer = require('autoprefixer');
124
+ const postcss = require('postcss');
125
+
126
+ const plugins = [];
127
+
128
+ plugins.push(autoprefixer({
129
+ grid: 'no-autoplace',
130
+ // browsers: [
131
+ // "> 0.5% in alt-eu",
132
+ // "last 2 version",
133
+ // "not dead",
134
+ // "not op_mini all"
135
+ // ]
136
+ }));
137
+ plugins.push(cssnano({ safe: true }));
138
+
139
+ return postcss(plugins)
140
+ .process(sassResult.css, {
141
+ map: { inline: false, prev: sassResult.map.toString() },
142
+ from: filePath + '.scss',
143
+ to: finalDest,
144
+ })
145
+ .then((postcssResult) => {
146
+ // fs.mkdirSync(path.dirname(dest), { recursive: true });
147
+ fs.writeFileSync(finalDest, postcssResult.css);
148
+
149
+ if (postcssResult.map) {
150
+ fs.writeFileSync(`${finalDest}.map`, postcssResult.map);
151
+ }
152
+ });
153
+ })
154
+
155
+ .then((output) => {
156
+ // console.log(output);
157
+ console.log('Size ::: ' + fs.statSync(filePath + '.css').size);
158
+
159
+ tools.logSuccess(`OK ==> generated ${filePath}.css`);
160
+ })
161
+
162
+ .then(() => {
163
+ tools.remove(filePath + '.temp.css');
164
+ tools.remove(filePath + '.temp.css.map');
165
+ })
166
+
167
+ .catch((e) => {
168
+ console.log(e);
169
+ throw e;
170
+ })
171
+ }
172
+
173
+
174
+
175
+ const compileSassFile = (pkg, folder, filename, isNodeSassTildeImporterActive) => {
176
+ return Promise.resolve()
177
+ .then(() => {
178
+ if (pkg.build && pkg.build.euiVersion === '13.x') {
179
+ return compileSassFileDartSass(folder, filename);
180
+ } else {
181
+ return compileSassFileNodeSass(folder, filename, isNodeSassTildeImporterActive);
182
+ }
183
+ })
184
+
185
+ .catch((e) => {
186
+ console.log(e);
187
+ throw e;
188
+ })
189
+ }
190
+
191
+
95
192
 
96
193
  module.exports.build = (pkg) => {
97
194
  tools.logInfo('Building STYLES package...');
@@ -123,9 +220,12 @@ module.exports.build = (pkg) => {
123
220
  console.log('Sources copy succeeded.')
124
221
  })
125
222
  .then(() => Promise.resolve().then(() => {
223
+ tools.logInfo('Processing stylesheets entries : ');
224
+ console.log(pkg.stylesheets);
225
+
126
226
  return pkg.stylesheets.reduce((promise, file) => {
127
227
  return promise.then(() => (
128
- compileSassFile(tmpFolder, file, pkg.build && pkg.build.isNodeSassTildeImporterActive)
228
+ compileSassFile(pkg, tmpFolder, file, pkg.build && pkg.build.isNodeSassTildeImporterActive)
129
229
  )).catch((e) => {
130
230
  console.log(e);
131
231
  throw e;
@@ -150,6 +250,9 @@ module.exports.build = (pkg) => {
150
250
  tools.copy(path.join(pkg.paths.pkgRootDirectory, 'README.md'), path.join(pkg.paths.pkgBuild, 'README.md'));
151
251
  tools.copy(path.join(pkg.paths.pkgRootDirectory, 'LICENSE'), path.join(pkg.paths.pkgBuild, 'LICENSE'));
152
252
  })
253
+ .then(() => {
254
+ return tools.rimraf(tmpFolder);
255
+ })
153
256
  .then(() => {
154
257
  return notificationUtils.package.sendPackageMessage({
155
258
  package: pkg
@@ -162,7 +265,3 @@ module.exports.build = (pkg) => {
162
265
  }
163
266
  }
164
267
 
165
- // EXPORTS
166
- module.exports.compileSassFile = compileSassFile;
167
-
168
-
@@ -1,126 +1,126 @@
1
- 'use strict';
2
-
3
- var Confluence = require("confluence-api");
4
-
5
- const tools = require('./tools');
6
- const configUtils = require('../csdr/config/config-utils');
7
-
8
- const { jiraUser, jiraPassword, dryRun } = tools.getArgs();
9
-
10
- const updatePageContent = (pageId, pageContent) => {
11
-
12
- const config = configUtils.global.getConfig();
13
-
14
- const confluenceHost = config.confluence && config.confluence.host;
15
- const confluenceProjectName = config.confluence && config.confluence.projectName;
16
-
17
- const confluenceConfig = {
18
- username: jiraUser,
19
- password: jiraPassword,
20
- baseUrl: confluenceHost,
21
- version: 6 // Confluence major version, optional
22
- };
23
-
24
- tools.logTitle('Update confluence DEVOPS page...');
25
-
26
- if (dryRun) {
27
- return Promise.resolve();
28
- }
29
-
30
- var confluence = new Confluence(confluenceConfig);
31
-
32
- return Promise.resolve()
33
- .then(() => {
34
- return new Promise((resolve, reject) => {
35
- confluence.getContentById(
36
- pageId
37
- , function (err, response) {
38
- if (err) {
39
- return reject(err);
40
- } else {
41
- return resolve(response);
42
- }
43
- })
44
- })
45
- })
46
- .then((content) => {
47
- const newVersion = content.version.number + 1;
48
-
49
- return new Promise((resolve, reject) => {
50
- confluence.putContent(
51
- confluenceProjectName,
52
- pageId,
53
- newVersion,
54
- content.title,
55
- pageContent
56
- , function (err, response) {
57
- if (err) {
58
- return reject(err);
59
- } else {
60
- return resolve(response);
61
- }
62
- })
63
- })
64
- })
65
- .then(() => {
66
- tools.logSuccess();
67
- })
68
- .catch((e) => {
69
- // error is not thrown as this failure to update is just a side-effect of the pipeline
70
- tools.logError('ERROR!!! error encountered while trying to publish on Confluence');
71
- console.log(e);
72
- })
73
- }
74
-
75
-
76
- const getContentByPageTitle = (pageTitle) => {
77
-
78
- const config = configUtils.global.getConfig();
79
-
80
- const confluenceHost = config.confluence && config.confluence.host;
81
- const confluenceProjectName = config.confluence && config.confluence.projectName;
82
-
83
- const confluenceConfig = {
84
- username: jiraUser,
85
- password: jiraPassword,
86
- baseUrl: confluenceHost,
87
- version: 6 // Confluence major version, optional
88
- };
89
-
90
- var confluence = new Confluence(confluenceConfig);
91
-
92
- return Promise.resolve()
93
- .then(() => {
94
- return new Promise((resolve, reject) => {
95
- confluence.getContentByPageTitle(
96
- confluenceProjectName,
97
- pageTitle
98
- , function (err, response) {
99
- if (err) {
100
- return reject(err);
101
- } else {
102
- return resolve(response);
103
- }
104
- })
105
- })
106
- })
107
- }
108
-
109
-
110
-
111
- const updatePackagesHistoryPageContent = (tableContent) => {
112
- const config = configUtils.global.getConfig();
113
- const confluencePackagesHistoryPageId = config.confluence && config.confluence.packagesHistoryPageId;
114
-
115
- return updatePageContent(confluencePackagesHistoryPageId, tableContent);
116
- }
117
-
118
-
119
-
120
- // EXPORTS
121
-
122
- module.exports = {
123
- getContentByPageTitle,
124
- updatePageContent,
125
- updatePackagesHistoryPageContent,
126
- }
1
+ // 'use strict';
2
+
3
+ // var Confluence = require("confluence-api");
4
+
5
+ // const tools = require('./tools');
6
+ // const configUtils = require('../csdr/config/config-utils');
7
+
8
+ // const { jiraUser, jiraPassword, dryRun } = tools.getArgs();
9
+
10
+ // const updatePageContent = (pageId, pageContent) => {
11
+
12
+ // const config = configUtils.global.getConfig();
13
+
14
+ // const confluenceHost = config.confluence && config.confluence.host;
15
+ // const confluenceProjectName = config.confluence && config.confluence.projectName;
16
+
17
+ // const confluenceConfig = {
18
+ // username: jiraUser,
19
+ // password: jiraPassword,
20
+ // baseUrl: confluenceHost,
21
+ // version: 6 // Confluence major version, optional
22
+ // };
23
+
24
+ // tools.logTitle('Update confluence DEVOPS page...');
25
+
26
+ // if (dryRun) {
27
+ // return Promise.resolve();
28
+ // }
29
+
30
+ // var confluence = new Confluence(confluenceConfig);
31
+
32
+ // return Promise.resolve()
33
+ // .then(() => {
34
+ // return new Promise((resolve, reject) => {
35
+ // confluence.getContentById(
36
+ // pageId
37
+ // , function (err, response) {
38
+ // if (err) {
39
+ // return reject(err);
40
+ // } else {
41
+ // return resolve(response);
42
+ // }
43
+ // })
44
+ // })
45
+ // })
46
+ // .then((content) => {
47
+ // const newVersion = content.version.number + 1;
48
+
49
+ // return new Promise((resolve, reject) => {
50
+ // confluence.putContent(
51
+ // confluenceProjectName,
52
+ // pageId,
53
+ // newVersion,
54
+ // content.title,
55
+ // pageContent
56
+ // , function (err, response) {
57
+ // if (err) {
58
+ // return reject(err);
59
+ // } else {
60
+ // return resolve(response);
61
+ // }
62
+ // })
63
+ // })
64
+ // })
65
+ // .then(() => {
66
+ // tools.logSuccess();
67
+ // })
68
+ // .catch((e) => {
69
+ // // error is not thrown as this failure to update is just a side-effect of the pipeline
70
+ // tools.logError('ERROR!!! error encountered while trying to publish on Confluence');
71
+ // console.log(e);
72
+ // })
73
+ // }
74
+
75
+
76
+ // const getContentByPageTitle = (pageTitle) => {
77
+
78
+ // const config = configUtils.global.getConfig();
79
+
80
+ // const confluenceHost = config.confluence && config.confluence.host;
81
+ // const confluenceProjectName = config.confluence && config.confluence.projectName;
82
+
83
+ // const confluenceConfig = {
84
+ // username: jiraUser,
85
+ // password: jiraPassword,
86
+ // baseUrl: confluenceHost,
87
+ // version: 6 // Confluence major version, optional
88
+ // };
89
+
90
+ // var confluence = new Confluence(confluenceConfig);
91
+
92
+ // return Promise.resolve()
93
+ // .then(() => {
94
+ // return new Promise((resolve, reject) => {
95
+ // confluence.getContentByPageTitle(
96
+ // confluenceProjectName,
97
+ // pageTitle
98
+ // , function (err, response) {
99
+ // if (err) {
100
+ // return reject(err);
101
+ // } else {
102
+ // return resolve(response);
103
+ // }
104
+ // })
105
+ // })
106
+ // })
107
+ // }
108
+
109
+
110
+
111
+ // const updatePackagesHistoryPageContent = (tableContent) => {
112
+ // const config = configUtils.global.getConfig();
113
+ // const confluencePackagesHistoryPageId = config.confluence && config.confluence.packagesHistoryPageId;
114
+
115
+ // return updatePageContent(confluencePackagesHistoryPageId, tableContent);
116
+ // }
117
+
118
+
119
+
120
+ // // EXPORTS
121
+
122
+ // module.exports = {
123
+ // getContentByPageTitle,
124
+ // updatePageContent,
125
+ // updatePackagesHistoryPageContent,
126
+ // }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const changelogUtils = require('./changelog-utils');
4
- const confluenceUtils = require('./confluence-utils');
4
+ // const confluenceUtils = require('./confluence-utils');
5
5
  const gitUtils = require('./git-utils');
6
6
  const mavenUtils = require('./maven-utils');
7
7
  const pipelineUtils = require('./pipeline-utils');
@@ -19,7 +19,7 @@ const sonarUtils = require('./sonar/sonar-utils');
19
19
 
20
20
  module.exports = {
21
21
  changelog: changelogUtils,
22
- confluence: confluenceUtils,
22
+ // confluence: confluenceUtils,
23
23
  git: gitUtils,
24
24
  maven: mavenUtils,
25
25
  pipeline: pipelineUtils,
@@ -0,0 +1,52 @@
1
+ // ANGULAR & 3rd PARTIES
2
+ import { NgModule } from '@angular/core';
3
+ import { BrowserModule } from '@angular/platform-browser';
4
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
5
+ import { HttpClientModule } from '@angular/common/http';
6
+ import { StoreModule } from '@ngrx/store';
7
+ import { EffectsModule } from '@ngrx/effects';
8
+ import { StoreDevtoolsModule } from '@ngrx/store-devtools';
9
+ import { TranslateModule } from '@ngx-translate/core';
10
+
11
+ // eUI IMPORTS
12
+ import {
13
+ CoreModule, CoreModuleEffects, translateConfig, EUI_CONFIG_TOKEN,
14
+ } from '@eui/core';
15
+ import { EuiAllModule } from '@eui/components';
16
+
17
+ import { appConfig } from '../config/index';
18
+ import { environment } from '../environments/environment';
19
+
20
+ // APP ROUTES & ROOT COMPONENTS
21
+ import { AppRoutingModule } from '../../app/app-routing.module';
22
+ import { AppComponent } from '../../app/app.component';
23
+
24
+ import { TOKEN, reducerProvider, metaReducers } from './core/reducers/index';
25
+
26
+ // APP ROOT MODULE
27
+ @NgModule({
28
+ imports: [
29
+ BrowserModule,
30
+ BrowserAnimationsModule,
31
+ HttpClientModule,
32
+ StoreModule.forRoot(TOKEN, { metaReducers }),
33
+ StoreDevtoolsModule.instrument({ name: 'CSDR App', maxAge: 150, logOnly: environment.production }),
34
+ EffectsModule.forRoot([...CoreModuleEffects]),
35
+ TranslateModule.forRoot(translateConfig),
36
+ CoreModule.forRoot(),
37
+ AppRoutingModule,
38
+ EuiAllModule,
39
+ ],
40
+ declarations: [
41
+ AppComponent,
42
+ ],
43
+ providers: [
44
+ { provide: EUI_CONFIG_TOKEN, useValue: { appConfig: appConfig, environment: environment } },
45
+ reducerProvider,
46
+ ],
47
+ bootstrap: [
48
+ AppComponent,
49
+ ],
50
+ })
51
+ export class AppModule {
52
+ }
@@ -0,0 +1,40 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { ActionReducer, ActionReducerMap, combineReducers, MetaReducer } from '@ngrx/store';
3
+ import * as fromRouter from '@ngrx/router-store';
4
+ import { storeFreeze } from 'ngrx-store-freeze';
5
+ import { reducers as coreReducers, CoreState, localStorageSync } from '@eui/core';
6
+
7
+ export interface AppState extends CoreState {
8
+ router: fromRouter.RouterReducerState<any>;
9
+ }
10
+
11
+ // -----------------
12
+ // ------------ AOT
13
+ export const TOKEN = new InjectionToken<any>('AppReducers');
14
+
15
+ export function getReducers(): ActionReducerMap<AppState, any> {
16
+ return {
17
+ router: fromRouter.routerReducer,
18
+ ...coreReducers,
19
+ };
20
+ }
21
+
22
+ export const reducerProvider = [
23
+ { provide: TOKEN, useFactory: getReducers },
24
+ ];
25
+
26
+ // console.log all actions
27
+ export function logger(reducer: ActionReducer<AppState>): ActionReducer<AppState> {
28
+ return (state, action) => {
29
+ const result = reducer(state, action);
30
+ console.groupCollapsed(action.type);
31
+ console.log('prev state', state);
32
+ console.log('action', action);
33
+ console.log('next state', result);
34
+ console.groupEnd();
35
+
36
+ return result;
37
+ };
38
+ }
39
+
40
+ export const metaReducers: MetaReducer<AppState>[] = [logger, localStorageSync, storeFreeze];
@@ -0,0 +1,4 @@
1
+ import { GlobalConfig } from '@eui/core';
2
+
3
+ export const GLOBAL: GlobalConfig = {
4
+ };
@@ -0,0 +1,8 @@
1
+ import { EuiAppConfig } from '@eui/core';
2
+ import { GLOBAL } from './global';
3
+ import { MODULES } from './modules';
4
+
5
+ export const appConfig: EuiAppConfig = {
6
+ global: GLOBAL,
7
+ modules: MODULES,
8
+ };
@@ -0,0 +1,4 @@
1
+ import { ModulesConfig } from '@eui/core';
2
+
3
+ export const MODULES: ModulesConfig = {
4
+ };
@@ -0,0 +1,9 @@
1
+ // activated by running :
2
+ // npm run build -- --configuration=dev
3
+ // OR
4
+ // npm run build-dev
5
+
6
+ export const environment = {
7
+ production: false,
8
+ enableDevToolRedux: true,
9
+ };
@@ -0,0 +1,9 @@
1
+ import { EuiEnvConfig } from '@eui/core';
2
+
3
+ export const environment: EuiEnvConfig = {
4
+ production: true,
5
+ enableDevToolRedux: false,
6
+ envDynamicConfig: {
7
+ uri: 'assets/config/env-json-config.json',
8
+ },
9
+ };
@@ -0,0 +1,21 @@
1
+ // used by serve / when no configuration is provided on the build script
2
+ // run npm run build
3
+
4
+ import { EuiEnvConfig } from '@eui/core';
5
+
6
+ export const environment: EuiEnvConfig = {
7
+ production: false,
8
+ enableDevToolRedux: true,
9
+ envDynamicConfig: {
10
+ uri: 'assets/config/env-json-config.json',
11
+ },
12
+ };
13
+
14
+ /*
15
+ * For easier debugging in development mode, you can import the following file
16
+ * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
17
+ *
18
+ * This import should be commented out in production mode because it will have a negative impact
19
+ * on performance if an error is thrown.
20
+ */
21
+ // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
@@ -0,0 +1,7 @@
1
+ const karmaConfig = require('@eui/tools/karma/karma.conf');
2
+
3
+ module.exports = function (config) {
4
+ config.set(
5
+ karmaConfig.get(config)
6
+ );
7
+ }
@@ -0,0 +1,21 @@
1
+ import { enableProdMode } from '@angular/core';
2
+ import { preInitApp } from '@eui/core';
3
+ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4
+
5
+ import { AppModule } from './app/app.module';
6
+ import { environment } from './environments/environment';
7
+ import { ApplicationRef } from '@angular/core';
8
+ import { enableDebugTools } from '@angular/platform-browser';
9
+
10
+ if (environment.production) {
11
+ enableProdMode();
12
+ }
13
+ preInitApp(environment).then(() => {
14
+ platformBrowserDynamic().bootstrapModule(AppModule)
15
+ .then(moduleRef => {
16
+ const applicationRef = moduleRef.injector.get(ApplicationRef);
17
+ const componentRef = applicationRef.components[0];
18
+ enableDebugTools(componentRef);
19
+ })
20
+ .catch(err => console.log(err));
21
+ });