antelope-cli 1.0.17 → 1.1.1
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/onboarding/brand.js +2 -1
- package/onboarding/index.js +5 -4
- package/onboarding/logo.js +3 -29
- package/onboarding/themes.js +2 -2
- package/onboarding/variablesColors.js +2 -1
- package/package.json +30 -30
package/onboarding/brand.js
CHANGED
package/onboarding/index.js
CHANGED
|
@@ -39,15 +39,16 @@ const finishOnboarding = () => {
|
|
|
39
39
|
|
|
40
40
|
const startOnBoarding = async () => {
|
|
41
41
|
console.log(chalk.underline(chalk.cyan("Welcome to Antelope's on-boarding bot \n")));
|
|
42
|
+
console.log(chalk.underline(chalk.yellowBright("Wowwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww")));
|
|
42
43
|
try {
|
|
43
44
|
console.log(chalk.bold(chalk.yellow('\nStep 1: Add to variables-colors.scss')));
|
|
44
45
|
await variableColors.start(rl);
|
|
45
|
-
console.log(chalk.bold(chalk.yellow('\nStep 2:
|
|
46
|
+
console.log(chalk.bold(chalk.yellow('\nStep 2: Adding the logo')));
|
|
47
|
+
await logo.start(rl);
|
|
48
|
+
console.log(chalk.bold(chalk.yellow('\nStep 3: Add to themes.scss')));
|
|
46
49
|
await themes.start(rl);
|
|
47
|
-
console.log(chalk.bold(chalk.yellow('\nStep
|
|
50
|
+
console.log(chalk.bold(chalk.yellow('\nStep 4: Create favicon package')));
|
|
48
51
|
await favicon.start(rl);
|
|
49
|
-
console.log(chalk.bold(chalk.yellow('\nStep 4: Adding the logo')));
|
|
50
|
-
await logo.start(rl);
|
|
51
52
|
console.log(chalk.bold(chalk.yellow('\nStep 5: Adding translations')));
|
|
52
53
|
await translations.start(rl);
|
|
53
54
|
console.log(chalk.bold(chalk.yellow('\nStep 6: Editing the config file')));
|
package/onboarding/logo.js
CHANGED
|
@@ -1,39 +1,13 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const https = require('https');
|
|
4
2
|
const brandModule = require('./brand.js');
|
|
5
3
|
|
|
6
4
|
|
|
7
|
-
const downloadLogo = (url, dest) => {
|
|
8
|
-
const file = fs.createWriteStream(dest);
|
|
9
|
-
return new Promise((resolve, reject) => {
|
|
10
|
-
https
|
|
11
|
-
.get(url, (response) => {
|
|
12
|
-
response.pipe(file).on('finish', () => {
|
|
13
|
-
file.close(resolve);
|
|
14
|
-
});
|
|
15
|
-
})
|
|
16
|
-
.on('error', (err) => {
|
|
17
|
-
reject(err.message);
|
|
18
|
-
fs.unlink(dest, (error) => reject(error));
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
5
|
|
|
23
6
|
function start(rl) {
|
|
24
|
-
const brand = brandModule.getBrand();
|
|
25
7
|
return new Promise((resolve, reject) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
console.log(chalk.inverse('Downloading logo...'));
|
|
30
|
-
await downloadLogo(url, logoDirLocation, brand.connectedBrandName);
|
|
31
|
-
console.log(chalk.cyan('Logo downloaded successfully!'));
|
|
32
|
-
resolve(null);
|
|
33
|
-
} catch (err) {
|
|
34
|
-
console.error(err);
|
|
35
|
-
return start(rl);
|
|
36
|
-
}
|
|
8
|
+
rl.question('Please enter the URL to the logo image suitable for a black background:\n', (url) => {
|
|
9
|
+
console.log(chalk.cyan('Logo saved successfully!'));
|
|
10
|
+
brandModule.updateBrand({logo: url})
|
|
37
11
|
});
|
|
38
12
|
});
|
|
39
13
|
}
|
package/onboarding/themes.js
CHANGED
|
@@ -26,7 +26,7 @@ function start(rl) {
|
|
|
26
26
|
display: inline-block;
|
|
27
27
|
width: 240px;
|
|
28
28
|
height: 120px;
|
|
29
|
-
background: url('
|
|
29
|
+
background: url('${brand.logo}') no-repeat center center;
|
|
30
30
|
background-size: contain;
|
|
31
31
|
}
|
|
32
32
|
.navbar-toggle-container {
|
|
@@ -62,7 +62,7 @@ function start(rl) {
|
|
|
62
62
|
data = addColorToMap(
|
|
63
63
|
'theme-colors',
|
|
64
64
|
brand.connectedBrandName,
|
|
65
|
-
brand.color ?
|
|
65
|
+
brand.color ? `,$${brand.connectedBrandName}` : '$corp',
|
|
66
66
|
data
|
|
67
67
|
);
|
|
68
68
|
data = addColorToMap(
|
|
@@ -21,9 +21,10 @@ function start(rl) {
|
|
|
21
21
|
const colorsMap = match[1];
|
|
22
22
|
|
|
23
23
|
// Append the new brand to the colors map
|
|
24
|
-
const newColorsMap = `$colors: (${colorsMap}
|
|
24
|
+
const newColorsMap = `$colors: (${colorsMap} '${connectedBrandName}': ${
|
|
25
25
|
hexColor ? '$' + connectedBrandName : defaultColor
|
|
26
26
|
},\n)`;
|
|
27
|
+
console.log(chalk.yellowBright(colorsMap, newColorsMap));
|
|
27
28
|
|
|
28
29
|
// Replace the $colors map in the file with the new one
|
|
29
30
|
data = data.replace(colorsRegex, newColorsMap);
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "antelope-cli",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "CLI-Tool for automating processes for Antelope-Systems ",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"ant-cli": "./index.js"
|
|
8
|
-
},
|
|
9
|
-
"engines": {
|
|
10
|
-
"node": "^16.20.2"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"test": "test"
|
|
14
|
-
},
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "
|
|
18
|
-
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"cli"
|
|
21
|
-
],
|
|
22
|
-
"author": "Idan Atias",
|
|
23
|
-
"license": "ISC",
|
|
24
|
-
"homepage": "
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"chalk": "^2.0.0",
|
|
27
|
-
"node-fetch": "^2.6.1",
|
|
28
|
-
"unzipper": "^0.12.1"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "antelope-cli",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "CLI-Tool for automating processes for Antelope-Systems ",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"ant-cli": "./index.js"
|
|
8
|
+
},
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": "^16.20.2"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "test"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": ""
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"cli"
|
|
21
|
+
],
|
|
22
|
+
"author": "Idan Atias",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"homepage": "",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"chalk": "^2.0.0",
|
|
27
|
+
"node-fetch": "^2.6.1",
|
|
28
|
+
"unzipper": "^0.12.1"
|
|
29
|
+
}
|
|
30
|
+
}
|