@eui/cli 18.0.0-rc.19 → 18.0.0-rc.20

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.
@@ -1 +1 @@
1
- 18.0.0-rc.19
1
+ 18.0.0-rc.20
package/bin/eui-cli.js CHANGED
@@ -19,8 +19,7 @@ console.info(
19
19
  );
20
20
 
21
21
  // remapping config if passed as argument - automated mode
22
- var inputConfig = config.parseInputConfig(args.config);
23
-
22
+ let inputConfig = config.parseInputConfig(args.config);
24
23
 
25
24
  // Detecting targetPath and create it if present as argument - local and automated mode
26
25
  let targetPath;
@@ -28,22 +27,13 @@ let targetPath;
28
27
  if (args.targetPath) {
29
28
  targetPath = path.join(config.targetPath, args.targetPath);
30
29
 
31
- if (args.m) {
32
- targetPath = path.join(targetPath, 'packages');
33
- }
34
-
35
- if (fs.readdirSync(targetPath).length < 1) {
36
- fs.mkdirSync(targetPath);
30
+ if (!tools.isDirExists(targetPath)) {
31
+ tools.mkdir(targetPath);
37
32
  }
38
33
 
39
34
  // otherwise taking the default config targetPath defined
40
35
  } else {
41
- if (args.m) {
42
- targetPath = path.join(config.targetPath, 'packages');
43
-
44
- } else {
45
- targetPath = config.targetPath;
46
- }
36
+ targetPath = config.targetPath;
47
37
  }
48
38
 
49
39
  if (args.v) {
package/lib/config.js CHANGED
@@ -22,6 +22,9 @@ module.exports.optionsPath = {
22
22
 
23
23
  module.exports.version = version;
24
24
 
25
+ // f.e. :
26
+ // eui-cli --config appType:angular,npmInstall:false --targetPath eui-angular
27
+ // eui-cli --config appType:angular,appOptions:ecl,npmInstall:false --targetPath eui-angular-ecl-ec
25
28
 
26
29
  module.exports.parseInputConfig = (inputConfig) => {
27
30
 
@@ -32,7 +35,8 @@ module.exports.parseInputConfig = (inputConfig) => {
32
35
  const configArray = inputConfig.split(',').map(item => {
33
36
  const x = item.split(':');
34
37
 
35
- var value = x[1];
38
+ const propName = x[0];
39
+ let value = x[1];
36
40
 
37
41
  // treating text to boolean values : f.e. : npmInstall=true
38
42
  if (value === 'true') {
@@ -42,12 +46,12 @@ module.exports.parseInputConfig = (inputConfig) => {
42
46
  value = false;
43
47
  }
44
48
 
45
- // treating string array values : f.e. : appFeatures=feature1_feature2_feature3
46
- if (typeof value === 'string' && value.indexOf('_')) {
49
+ // treating string array values : f.e. : appOptions=ecl_something
50
+ if (propName === 'appOptions') {
47
51
  value = value.split('_');
48
52
  }
49
53
 
50
- return { [x[0]]: value };
54
+ return { [propName]: value };
51
55
  });
52
56
 
53
57
  return Object.assign({}, ...configArray);
package/lib/generators.js CHANGED
@@ -5,9 +5,13 @@ const postBuild = require('./post-build');
5
5
  const install = require('./install');
6
6
 
7
7
  const appGenerate = (options) => {
8
- console.info(chalk.cyan('Configuring your project : please answer the following : \n'));
8
+ if (options.inputConfig) {
9
+ console.info(chalk.cyan('Creating your project - automated mode : \n'));
10
+ } else {
11
+ console.info(chalk.cyan('Configuring your project : please answer the following : \n'));
12
+ }
9
13
 
10
- var cliConfig;
14
+ let cliConfig;
11
15
 
12
16
  // Query the questions
13
17
  // -------------------
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "18.0.0-rc.19",
3
+ "version": "18.0.0-rc.20",
4
4
  "license": "EUPL-1.1",
5
5
  "scripts": {
6
6
  "ng": "ng",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "private": true,
22
22
  "dependencies": {
23
- "@eui/deps-base": "18.0.0-rc.19"
23
+ "@eui/deps-base": "18.0.0-rc.20"
24
24
  },
25
25
  "resolutions": {
26
26
  "js-yaml": ">=3.13.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "18.0.0-rc.19",
3
+ "version": "18.0.0-rc.20",
4
4
  "license": "EUPL-1.1",
5
5
  "scripts": {
6
6
  "ng": "ng",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "18.0.0-rc.19",
3
+ "version": "18.0.0-rc.20",
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.0.0-rc.19"
21
+ "@eui/deps-base": "18.0.0-rc.20"
22
22
  }
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/cli",
3
- "version": "18.0.0-rc.19",
3
+ "version": "18.0.0-rc.20",
4
4
  "tag": "next",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI CLI app generator",