antelope-cli 1.0.16 → 1.1.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/index.js +0 -0
- package/onboarding/brand.js +2 -1
- package/onboarding/favicon.js +1 -1
- package/onboarding/index.js +4 -4
- package/onboarding/logo.js +3 -29
- package/onboarding/themes.js +1 -1
- package/package.json +6 -3
package/index.js
CHANGED
|
File without changes
|
package/onboarding/brand.js
CHANGED
package/onboarding/favicon.js
CHANGED
|
@@ -40,7 +40,7 @@ async function start(rl) {
|
|
|
40
40
|
await Promise.all(
|
|
41
41
|
zipContents.files.map(async (file) => {
|
|
42
42
|
const content = await file.buffer();
|
|
43
|
-
const dest = path.join(
|
|
43
|
+
const dest = path.join(faviconDirLocation, file.path);
|
|
44
44
|
await fs.promises.mkdir(path.dirname(dest), { recursive: true });
|
|
45
45
|
await fs.promises.writeFile(dest, content);
|
|
46
46
|
})
|
package/onboarding/index.js
CHANGED
|
@@ -42,12 +42,12 @@ const startOnBoarding = async () => {
|
|
|
42
42
|
try {
|
|
43
43
|
console.log(chalk.bold(chalk.yellow('\nStep 1: Add to variables-colors.scss')));
|
|
44
44
|
await variableColors.start(rl);
|
|
45
|
-
console.log(chalk.bold(chalk.yellow('\nStep 2:
|
|
45
|
+
console.log(chalk.bold(chalk.yellow('\nStep 2: Adding the logo')));
|
|
46
|
+
await logo.start(rl);
|
|
47
|
+
console.log(chalk.bold(chalk.yellow('\nStep 3: Add to themes.scss')));
|
|
46
48
|
await themes.start(rl);
|
|
47
|
-
console.log(chalk.bold(chalk.yellow('\nStep
|
|
49
|
+
console.log(chalk.bold(chalk.yellow('\nStep 4: Create favicon package')));
|
|
48
50
|
await favicon.start(rl);
|
|
49
|
-
console.log(chalk.bold(chalk.yellow('\nStep 4: Adding the logo')));
|
|
50
|
-
await logo.start(rl);
|
|
51
51
|
console.log(chalk.bold(chalk.yellow('\nStep 5: Adding translations')));
|
|
52
52
|
await translations.start(rl);
|
|
53
53
|
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 {
|
package/package.json
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antelope-cli",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "CLI-Tool for automating processes for Antelope-Systems ",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ant-cli": "./index.js"
|
|
8
8
|
},
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": "^16.20.2"
|
|
11
|
+
},
|
|
9
12
|
"scripts": {
|
|
10
13
|
"test": "test"
|
|
11
14
|
},
|
|
12
15
|
"repository": {
|
|
13
16
|
"type": "git",
|
|
14
|
-
"url": "
|
|
17
|
+
"url": ""
|
|
15
18
|
},
|
|
16
19
|
"keywords": [
|
|
17
20
|
"cli"
|
|
18
21
|
],
|
|
19
22
|
"author": "Idan Atias",
|
|
20
23
|
"license": "ISC",
|
|
21
|
-
"homepage": "
|
|
24
|
+
"homepage": "",
|
|
22
25
|
"dependencies": {
|
|
23
26
|
"chalk": "^2.0.0",
|
|
24
27
|
"node-fetch": "^2.6.1",
|