@eui/cli 18.2.0-snapshot-1727658460518 → 18.2.0
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/lib/cli.js +79 -82
- package/lib/generators.js +37 -52
- package/lib/install.js +1 -1
- package/lib/skeletons/_angular/base/package.json +2 -2
- package/lib/skeletons/_angular/base-mobile/package.json +4 -4
- package/lib/skeletons/web-symfony/myapp-web/package.json +2 -2
- package/package.json +2 -2
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
18.2.0
|
|
1
|
+
18.2.0
|
package/lib/cli.js
CHANGED
|
@@ -25,90 +25,87 @@ module.exports.start = (options) => {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// CLI interactions
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
},
|
|
28
|
+
return inquirer.prompt([
|
|
29
|
+
{
|
|
30
|
+
type: 'list',
|
|
31
|
+
name: 'appType',
|
|
32
|
+
message: 'Select an application type :',
|
|
33
|
+
choices: [
|
|
34
|
+
{ name: 'eUI Angular - Desktop', value: 'angular' },
|
|
35
|
+
{ name: 'eUI Angular - Mobile Ionic', value: 'mobile' },
|
|
36
|
+
{ name: 'eUI Angular + Spring Boot web module - JDK + Maven required !!!', value: 'web-spring-boot' },
|
|
37
|
+
{ name: 'eUI Angular + Maven web module (JEE Spring maven web module) - JDK + Maven required !!!', value: 'web-maven' },
|
|
38
|
+
{ name: 'eUI Angular + PHP/Symfony starter - PHP7 and composer required !!!', value: 'web-symfony' },
|
|
39
|
+
],
|
|
40
|
+
default: 0,
|
|
41
|
+
validate: function (value) {
|
|
42
|
+
if (value.length) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'groupId',
|
|
49
|
+
type: 'input',
|
|
50
|
+
message: 'Enter the groupId :',
|
|
51
|
+
default: defaultConfig.groupId,
|
|
52
|
+
validate: function (value) {
|
|
53
|
+
if (value.length) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
when: function (answers) {
|
|
58
|
+
return (answers.appType === 'web-spring-boot');
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'artifactId',
|
|
63
|
+
type: 'input',
|
|
64
|
+
message: 'Enter the artifactId :',
|
|
65
|
+
default: defaultConfig.artifactId,
|
|
66
|
+
validate: function (value) {
|
|
67
|
+
if (value.length) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
when: function (answers) {
|
|
72
|
+
return (answers.appType === 'web-spring-boot');
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: 'checkbox',
|
|
77
|
+
name: 'appOptions',
|
|
78
|
+
default: defaultConfig.appOptions,
|
|
79
|
+
message: 'Select one or more additional configuration options :',
|
|
80
|
+
choices: [
|
|
81
|
+
{ name: 'eUI ECL app-shell template and configuration - for ec.europa.eu apps', value: 'ecl' },
|
|
82
|
+
],
|
|
83
|
+
when: function (answers) {
|
|
84
|
+
return (answers.appType !== 'mobile');
|
|
85
|
+
}
|
|
86
|
+
},
|
|
89
87
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
88
|
+
{
|
|
89
|
+
type: 'list',
|
|
90
|
+
name: 'appOptionsEclTheme',
|
|
91
|
+
default: defaultConfig.appOptionsEclTheme,
|
|
92
|
+
message: 'Select which eUI ECL theme flavor you need :',
|
|
93
|
+
choices: [
|
|
94
|
+
{ name: 'eUI ECL - EC theme', value: 'ecl-ec' },
|
|
95
|
+
{ name: 'eUI ECL - EU theme', value: 'ecl-eu' },
|
|
96
|
+
],
|
|
97
|
+
when: function (answers) {
|
|
98
|
+
return (answers.appOptions && answers.appOptions.includes('ecl') && answers.appType !== 'mobile');
|
|
99
|
+
}
|
|
100
|
+
},
|
|
103
101
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
})
|
|
102
|
+
{
|
|
103
|
+
name: 'npmInstall',
|
|
104
|
+
type: 'confirm',
|
|
105
|
+
message: 'Yarn install dependencies when the app is generated :',
|
|
106
|
+
default: defaultConfig.npmInstall
|
|
107
|
+
}
|
|
108
|
+
])
|
|
112
109
|
.then((answers) => {
|
|
113
110
|
let outputConfig;
|
|
114
111
|
outputConfig = {
|
package/lib/generators.js
CHANGED
|
@@ -15,69 +15,54 @@ const appGenerate = (options) => {
|
|
|
15
15
|
console.info(chalk.cyan('Configuring your project : please answer the following : \n'));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
let cliConfig;
|
|
19
|
-
|
|
20
18
|
// Query the questions
|
|
21
19
|
// -------------------
|
|
22
|
-
return
|
|
23
|
-
.then(() => {
|
|
24
|
-
return cli.start(options);
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
// Storing config
|
|
28
|
-
// --------------
|
|
20
|
+
return cli.start(options)
|
|
29
21
|
.then((config) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// ---------------------------
|
|
36
|
-
.then(() => {
|
|
22
|
+
// Storing config
|
|
23
|
+
// --------------
|
|
24
|
+
const cliConfig = config;
|
|
25
|
+
// Building the file structure
|
|
26
|
+
// ---------------------------
|
|
37
27
|
return build.start({
|
|
38
|
-
config:
|
|
39
|
-
targetPath: options.targetPath
|
|
40
|
-
});
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
// Post build operations
|
|
44
|
-
// ---------------------
|
|
45
|
-
.then(() => {
|
|
46
|
-
return postBuild.start({
|
|
47
|
-
config: cliConfig,
|
|
28
|
+
config: config,
|
|
48
29
|
targetPath: options.targetPath
|
|
49
|
-
})
|
|
50
|
-
|
|
30
|
+
})
|
|
31
|
+
// Post build operations
|
|
32
|
+
// ---------------------
|
|
33
|
+
.then(() => {
|
|
34
|
+
return postBuild.start({
|
|
35
|
+
config: cliConfig,
|
|
36
|
+
targetPath: options.targetPath
|
|
37
|
+
});
|
|
38
|
+
})
|
|
39
|
+
// Install dependencies
|
|
40
|
+
// --------------------
|
|
41
|
+
.then(() => {
|
|
42
|
+
return install.start({
|
|
43
|
+
config: cliConfig,
|
|
44
|
+
targetPath: options.targetPath,
|
|
45
|
+
});
|
|
46
|
+
})
|
|
47
|
+
// starting app
|
|
48
|
+
.then(() => {
|
|
49
|
+
if (!cliConfig.appStart || typeof cliConfig.npmInstall !== 'boolean' || !cliConfig.npmInstall) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
console.log('');
|
|
53
|
+
console.log('');
|
|
54
|
+
console.log('*****************************************************************');
|
|
55
|
+
console.log(chalk.cyan(' Starting eUI app... browser will open soon on localhost:4200'));
|
|
56
|
+
console.log('*****************************************************************');
|
|
51
57
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return install.start({
|
|
56
|
-
config: cliConfig,
|
|
57
|
-
targetPath: options.targetPath,
|
|
58
|
-
});
|
|
58
|
+
const wd = path.resolve(utils.getAngularPath(options.targetPath, cliConfig.appName, cliConfig.appType, cliConfig.artifactId));
|
|
59
|
+
return execSync("npm start", { cwd: wd, stdio: "inherit" });
|
|
60
|
+
})
|
|
59
61
|
})
|
|
60
|
-
|
|
61
|
-
// starting app
|
|
62
|
-
.then(() => {
|
|
63
|
-
if (!cliConfig.appStart) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
console.log('');
|
|
67
|
-
console.log('');
|
|
68
|
-
console.log('*****************************************************************');
|
|
69
|
-
console.log(chalk.cyan(' Starting eUI app... browser will open soon on localhost:4200'));
|
|
70
|
-
console.log('*****************************************************************');
|
|
71
|
-
|
|
72
|
-
const wd = path.resolve(utils.getAngularPath(options.targetPath, cliConfig.appName, cliConfig.appType, cliConfig.artifactId));
|
|
73
|
-
return execSync("npm start", { cwd: wd, stdio: "inherit" });
|
|
74
|
-
})
|
|
75
|
-
|
|
76
62
|
.catch((e) => {
|
|
77
63
|
console.error(e);
|
|
78
64
|
process.exitCode = 1;
|
|
79
65
|
})
|
|
80
|
-
|
|
81
66
|
.finally(() => process.exit())
|
|
82
67
|
}
|
|
83
68
|
|
package/lib/install.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "18.2.0
|
|
3
|
+
"version": "18.2.0",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"ng": "ng",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@eui/deps-base": "18.2.0
|
|
24
|
+
"@eui/deps-base": "18.2.0"
|
|
25
25
|
},
|
|
26
26
|
"resolutions": {
|
|
27
27
|
"js-yaml": ">=3.13.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "18.2.0
|
|
3
|
+
"version": "18.2.0",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"ng": "ng",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
},
|
|
21
21
|
"private": true,
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@eui/deps-base": "16.2.
|
|
24
|
-
"@eui/mobile-core": "16.10.
|
|
25
|
-
"@eui/mobile-styles": "16.10.
|
|
23
|
+
"@eui/deps-base": "16.2.18",
|
|
24
|
+
"@eui/mobile-core": "16.10.0",
|
|
25
|
+
"@eui/mobile-styles": "16.10.0"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "18.2.0
|
|
3
|
+
"version": "18.2.0",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"description": "eUI JEE Symfony app scripts",
|
|
6
6
|
"scripts": {
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"private": true,
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@eui/deps-base": "18.2.0
|
|
21
|
+
"@eui/deps-base": "18.2.0"
|
|
22
22
|
}
|
|
23
23
|
}
|