antelope-cli 1.0.17 → 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 CHANGED
File without changes
@@ -5,7 +5,8 @@ let brand = {
5
5
  color: '',
6
6
  languages: null,
7
7
  type: '',
8
- FCMSenderId: ''
8
+ FCMSenderId: '',
9
+ logo: ''
9
10
  };
10
11
 
11
12
  function updateBrand(updatedBrand) {
@@ -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: Add to themes.scss')));
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 3: Create favicon package')));
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')));
@@ -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
- const logoDirLocation = `src/assets/img/logos/${brand.connectedBrandName}.png`;
27
- rl.question('Please enter the URL to the logo image suitable for a black background:\n', async (url) => {
28
- try {
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
  }
@@ -26,7 +26,7 @@ function start(rl) {
26
26
  display: inline-block;
27
27
  width: 240px;
28
28
  height: 120px;
29
- background: url('src/assets/img/logos/${brand.connectedBrandName}.png') no-repeat center center;
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,6 +1,6 @@
1
1
  {
2
2
  "name": "antelope-cli",
3
- "version": "1.0.17",
3
+ "version": "1.1.0",
4
4
  "description": "CLI-Tool for automating processes for Antelope-Systems ",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -14,14 +14,14 @@
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "git+https://bitbucket.org/xsitesinc/antelope-cli.git"
17
+ "url": ""
18
18
  },
19
19
  "keywords": [
20
20
  "cli"
21
21
  ],
22
22
  "author": "Idan Atias",
23
23
  "license": "ISC",
24
- "homepage": "https://bitbucket.org/xsitesinc/antelope-cli#readme",
24
+ "homepage": "",
25
25
  "dependencies": {
26
26
  "chalk": "^2.0.0",
27
27
  "node-fetch": "^2.6.1",