@eui/tools 4.15.9 → 4.15.13
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.
- package/.version.properties +1 -1
- package/CHANGELOG.md +41 -0
- package/bin/eui-scripts.js +6 -2
- package/bin/scripts/build-package-sub.js +20 -0
- package/bin/scripts/version.js +12 -0
- package/global.test.js +3 -3
- package/package.json +12 -16
- package/sandbox.js +3 -2
- package/scripts/csdr/cli/app.js +30 -3
- package/scripts/csdr/cli/package.js +41 -5
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/angular-config.json +33 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/dependencies-composite.json +5 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/gitignore_TO_REPLACE +50 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/package.json +6 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/scripts.json +3 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app-routing.module.ts +21 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.html +26 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.ts +19 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.routes.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home-routing.module.ts +15 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.ts +8 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.module.ts +17 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/shared/shared.module.ts +15 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/app-metadata.json +8 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/config/env-json-config.json +41 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/index.html +22 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/assets/i18n/en.json +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/assets/i18n/fr.json +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/gitignore_TO_REPLACE +46 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/ng-package.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/package.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/index.ts +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/lib/module.ts +11 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/test.ts.TO_REPLACE +21 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.lib.json +32 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.spec.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/angular.json +3 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote/dependencies-composite.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.scss +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.spec.ts +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.component.ts +62 -28
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.ts +33 -33
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/routing.module.ts +22 -10
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/en.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/fr.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/config/global.ts +8 -5
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/index.html +1 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote/tsconfig.app.json +3 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/angular.json +90 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/browserslist +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/gitignore_TO_REPLACE +64 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/package.json_TO_REPLACE +8 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/dummy.scss +3 -0
- package/scripts/csdr/cli/skeletons/package/{frontend-remote/src/app/dummy.spec.ts.TO_REPLACE → frontend-remote-eui10/src/app/dummy.spec.ts} +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.component.ts +71 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.ts +165 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/custom-route-serializer.ts +28 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/index.ts +42 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/routing.module.ts +51 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/assets/.gitkeep +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/global.ts +31 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/index.ts +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/modules.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.prod.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.ts +15 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/favicon.ico +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/index.html +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/main.ts +12 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/polyfills.ts +86 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/test.ts.TO_REPLACE +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.app.json +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.spec.json +18 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint-remote.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/webpack.extra.js +15 -0
- package/scripts/csdr/config/angular.js +213 -3
- package/scripts/csdr/config/global.js +16 -0
- package/scripts/csdr/init/resources/yarn-eui13.lock +15857 -0
- package/scripts/csdr/install/common.js +26 -8
- package/scripts/csdr/jira/jira-utils.js +168 -168
- package/scripts/csdr/jira/update.js +150 -150
- package/scripts/csdr/metadata/app-envs.js +34 -33
- package/scripts/csdr/metadata/app-history.js +62 -61
- package/scripts/csdr/metadata/common.js +44 -41
- package/scripts/csdr/metadata/package-history.js +0 -1
- package/scripts/csdr/release/app/release-app.js +3 -0
- package/scripts/csdr/release/package/release-package.js +4 -0
- package/scripts/csdr/release/package/remote.js +3 -3
- package/scripts/csdr/release/package/ui.js +3 -3
- package/scripts/csdr/sync/sync-utils.js +6 -2
- package/scripts/utils/build/package/angular.js +4 -4
- package/scripts/utils/build/package/build-package-utils.js +50 -1
- package/scripts/utils/build/package/styles.js +100 -7
- package/scripts/utils/confluence-utils.js +126 -126
- package/scripts/utils/index.js +2 -2
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton/src/_generated/favicon.ico +0 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/app.module.ts +52 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/core/reducers/index.ts +40 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/global.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/index.ts +8 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/modules.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.dev.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.prod.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/favicon.ico +0 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/karma.conf.js +7 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/main.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/polyfills.ts +86 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/tst.ts +33 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.app.json +19 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.spec.json +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tslint.json +17 -0
- package/scripts/utils/pre-build/injection/skeletons.js +6 -2
- package/scripts/utils/pre-build/projects.js +5 -1
- package/scripts/utils/tools.js +30 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote/webpack.extra.js +0 -7
|
@@ -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.
|
package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/favicon.ico
ADDED
|
Binary file
|
package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/main.ts
ADDED
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
3
|
+
* You can add your own extra polyfills to this file.
|
|
4
|
+
*
|
|
5
|
+
* This file is divided into 2 sections:
|
|
6
|
+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
7
|
+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
8
|
+
* file.
|
|
9
|
+
*
|
|
10
|
+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
11
|
+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
12
|
+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
13
|
+
*
|
|
14
|
+
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/***************************************************************************************************
|
|
18
|
+
* BROWSER POLYFILLS
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
|
22
|
+
// import 'core-js/es6/symbol';
|
|
23
|
+
// import 'core-js/es6/object';
|
|
24
|
+
// import 'core-js/es6/function';
|
|
25
|
+
// import 'core-js/es6/parse-int';
|
|
26
|
+
// import 'core-js/es6/parse-float';
|
|
27
|
+
// import 'core-js/es6/number';
|
|
28
|
+
// import 'core-js/es6/math';
|
|
29
|
+
// import 'core-js/es6/string';
|
|
30
|
+
// import 'core-js/es6/date';
|
|
31
|
+
// import 'core-js/es6/array';
|
|
32
|
+
// import 'core-js/es6/regexp';
|
|
33
|
+
// import 'core-js/es6/map';
|
|
34
|
+
// import 'core-js/es6/weak-map';
|
|
35
|
+
// import 'core-js/es6/set';
|
|
36
|
+
|
|
37
|
+
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
|
38
|
+
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
39
|
+
|
|
40
|
+
/** IE10 and IE11 requires the following for the Reflect API. */
|
|
41
|
+
// import 'core-js/es6/reflect';
|
|
42
|
+
|
|
43
|
+
/** Evergreen browsers require these. **/
|
|
44
|
+
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
|
|
45
|
+
// import 'core-js/es7/reflect';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Web Animations `@angular/platform-browser/animations`
|
|
49
|
+
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
|
50
|
+
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
|
51
|
+
**/
|
|
52
|
+
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
56
|
+
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
60
|
+
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
61
|
+
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
65
|
+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
66
|
+
*/
|
|
67
|
+
// (window as any).__Zone_enable_cross_context_check = true;
|
|
68
|
+
|
|
69
|
+
/***************************************************************************************************
|
|
70
|
+
* Zone JS is required by default for Angular itself.
|
|
71
|
+
*/
|
|
72
|
+
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
|
73
|
+
|
|
74
|
+
/***************************************************************************************************
|
|
75
|
+
* APPLICATION IMPORTS
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Date, currency, decimal and percent pipes.
|
|
80
|
+
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
|
|
81
|
+
*/
|
|
82
|
+
// import 'intl'; // Run `npm install --save intl`.
|
|
83
|
+
/**
|
|
84
|
+
* Need to import at least one locale-data with intl.
|
|
85
|
+
*/
|
|
86
|
+
// import 'intl/locale-data/jsonp/en';
|
package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/tst.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
+
|
|
3
|
+
import 'zone.js/dist/long-stack-trace-zone';
|
|
4
|
+
import 'zone.js/dist/proxy.js';
|
|
5
|
+
import 'zone.js/dist/sync-test';
|
|
6
|
+
import 'zone.js/dist/jasmine-patch';
|
|
7
|
+
import 'zone.js/dist/async-test';
|
|
8
|
+
import 'zone.js/dist/fake-async-test';
|
|
9
|
+
import { APP_BASE_HREF } from '@angular/common';
|
|
10
|
+
import { getTestBed } from '@angular/core/testing';
|
|
11
|
+
import {
|
|
12
|
+
BrowserDynamicTestingModule,
|
|
13
|
+
platformBrowserDynamicTesting,
|
|
14
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
15
|
+
|
|
16
|
+
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
|
|
17
|
+
declare const __karma__: any;
|
|
18
|
+
declare const require: any;
|
|
19
|
+
|
|
20
|
+
// Prevent Karma from running prematurely.
|
|
21
|
+
__karma__.loaded = function () {};
|
|
22
|
+
|
|
23
|
+
// First, initialize the Angular testing environment.
|
|
24
|
+
getTestBed().initTestEnvironment(
|
|
25
|
+
BrowserDynamicTestingModule,
|
|
26
|
+
platformBrowserDynamicTesting([{ provide: APP_BASE_HREF, useValue: '/' }]),
|
|
27
|
+
);
|
|
28
|
+
// Then we find all the tests.
|
|
29
|
+
const context = require.context('./', true, /\.spec\.ts$/);
|
|
30
|
+
// And load the modules.
|
|
31
|
+
context.keys().map(context);
|
|
32
|
+
// Finally, start Karma to run the tests.
|
|
33
|
+
__karma__.start();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./dist",
|
|
5
|
+
"types": [],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"target": "ES2016",
|
|
8
|
+
"lib": ["es2020", "dom"]
|
|
9
|
+
},
|
|
10
|
+
"exclude": [
|
|
11
|
+
"test.ts",
|
|
12
|
+
"**/*.spec.ts",
|
|
13
|
+
"_todo/**/*.ts",
|
|
14
|
+
"**/_todo/**/*.ts",
|
|
15
|
+
"src/assets/samples/**/*.ts",
|
|
16
|
+
"dist/assets/samples/**/*.ts"
|
|
17
|
+
],
|
|
18
|
+
"include": ["**/*.ts"]
|
|
19
|
+
}
|
|
@@ -46,14 +46,18 @@ module.exports.injectCsdrSkeletonEuiShowcaseSources = (project) => {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
module.exports.injectCsdrFullSkeletonSources = (project) => {
|
|
49
|
+
module.exports.injectCsdrFullSkeletonSources = (project, euiVersion) => {
|
|
50
50
|
|
|
51
51
|
tools.logInfo(`Injecting CSDR full skeleton sources for : ${project.name}`);
|
|
52
52
|
|
|
53
53
|
return Promise.resolve()
|
|
54
54
|
.then(() => {
|
|
55
55
|
// copying skeleton sources
|
|
56
|
-
|
|
56
|
+
if (euiVersion === '13.x') {
|
|
57
|
+
tools.copydir(path.join(__dirname, 'app-sources-full-skeleton-eui13'), project.folder, false);
|
|
58
|
+
} else {
|
|
59
|
+
tools.copydir(path.join(__dirname, 'app-sources-full-skeleton'), project.folder, false);
|
|
60
|
+
}
|
|
57
61
|
|
|
58
62
|
// renaming tst.ts as it's conflicting with Jest... (TODO)
|
|
59
63
|
tools.move(path.join(project.folder, 'src', '_generated', 'tst.ts'), path.join(project.folder, 'src', '_generated', 'test.ts'));
|
|
@@ -73,7 +73,11 @@ module.exports.preBuild = (project, envTarget, build) => {
|
|
|
73
73
|
return injectionUtils.skeletons.injectCsdrSkeletonEuiShowcaseSources(project);
|
|
74
74
|
|
|
75
75
|
} else if (project.csdrFullSkeleton) {
|
|
76
|
-
|
|
76
|
+
if (project.build && project.build.euiVersion === '13.x') {
|
|
77
|
+
return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project, '13.x');
|
|
78
|
+
} else {
|
|
79
|
+
return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project);
|
|
80
|
+
}
|
|
77
81
|
}
|
|
78
82
|
})
|
|
79
83
|
|
package/scripts/utils/tools.js
CHANGED
|
@@ -439,6 +439,10 @@ const logWarning = (msg) => {
|
|
|
439
439
|
log(msg, 4);
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
+
const logAccent = (msg) => {
|
|
443
|
+
log(msg, 5);
|
|
444
|
+
}
|
|
445
|
+
|
|
442
446
|
const log = (msg, type) => {
|
|
443
447
|
var prefix;
|
|
444
448
|
if (type === 0 || !type) {
|
|
@@ -461,6 +465,10 @@ const log = (msg, type) => {
|
|
|
461
465
|
prefix = figures.pointer + figures.pointer + figures.pointer + figures.pointer + figures.pointer + figures.pointer;
|
|
462
466
|
console.info(chalk.keyword('orange')(prefix + ' ' + msg + '\n'));
|
|
463
467
|
}
|
|
468
|
+
if (type === 5) {
|
|
469
|
+
prefix = figures.star + figures.star + figures.star;
|
|
470
|
+
console.info(chalk.keyword('yellow')(prefix + ' ' + msg + '\n'));
|
|
471
|
+
}
|
|
464
472
|
}
|
|
465
473
|
|
|
466
474
|
|
|
@@ -584,6 +592,18 @@ function getFiles(parentPath) {
|
|
|
584
592
|
return fs.readdirSync(parentPath).filter(f => fs.statSync(path.join(parentPath, f)).isFile());
|
|
585
593
|
}
|
|
586
594
|
|
|
595
|
+
function getFilesGlob(from, fileGlob) {
|
|
596
|
+
return new Promise((resolve, reject) => {
|
|
597
|
+
glob(fileGlob, { cwd: from, nodir: true, follow: true, dot: true }, (err, files) => {
|
|
598
|
+
if (err) {
|
|
599
|
+
logError(err);
|
|
600
|
+
reject(err);
|
|
601
|
+
}
|
|
602
|
+
return resolve(files);
|
|
603
|
+
})
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
|
|
587
607
|
function logBigTitle(text) {
|
|
588
608
|
console.log('\n\n');
|
|
589
609
|
console.log(
|
|
@@ -624,7 +644,14 @@ function splitNpmPkg(npmPkg) {
|
|
|
624
644
|
return { scope: scope, name: name };
|
|
625
645
|
}
|
|
626
646
|
|
|
627
|
-
|
|
647
|
+
function logVersion() {
|
|
648
|
+
try {
|
|
649
|
+
const nmToolsPackageJsonPath = path.join(process.cwd(), 'node_modules', '@eui', 'tools', 'package.json');
|
|
650
|
+
const jsonContent = getJsonFileContent(nmToolsPackageJsonPath);
|
|
651
|
+
const version = jsonContent.version;
|
|
652
|
+
logAccent(`eUI TOOLS version : ${version}`)
|
|
653
|
+
} catch(e) {}
|
|
654
|
+
}
|
|
628
655
|
|
|
629
656
|
module.exports.relativeCopy = relativeCopy;
|
|
630
657
|
module.exports.relativeCopyEol = relativeCopyEol;
|
|
@@ -672,6 +699,8 @@ module.exports.getArgs = getArgs;
|
|
|
672
699
|
module.exports.getXMLJsContent = getXMLJsContent;
|
|
673
700
|
module.exports.getFolders = getFolders;
|
|
674
701
|
module.exports.getFiles = getFiles;
|
|
702
|
+
module.exports.getFilesGlob = getFilesGlob;
|
|
675
703
|
module.exports.logBigTitle = logBigTitle;
|
|
676
704
|
module.exports.removeFilesExtension = removeFilesExtension;
|
|
677
705
|
module.exports.splitNpmPkg = splitNpmPkg;
|
|
706
|
+
module.exports.logVersion = logVersion;
|