Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit ecfd123

Browse files
chore: download url from master to main branch
1 parent 5efc5d9 commit ecfd123

File tree

7 files changed

+34
-25
lines changed

7 files changed

+34
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
### Others
1515

16+
- cli: v2.2.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/master/cli/CHANGELOG.md))
1617
- deck-utils: v3.4.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/master/utils/deck/CHANGELOG.md))
1718
- kit: v2.1.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/master/kit/CHANGELOG.md))
1819
- starter kit: v7.1.5 ([CHANGELOG](https://github.com/deckgo/starter-kit/blob/master/CHANGELOG.md))

cli/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<a name="2.2.0"></a>
2+
3+
# 2.2.0 (2021-03-11)
4+
5+
### Chore
6+
7+
- we have renamed our `master` branch in `main` therefore kits have to be fetched with a new url
8+
19
<a name="2.1.1"></a>
210

311
# 2.1.1 (2021-01-24)

cli/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-deckdeckgo",
3-
"version": "2.1.1",
3+
"version": "2.2.0",
44
"description": "Create a new DeckDeckGo presentation or template",
55
"main": "dist/index.js",
66
"scripts": {

cli/src/presentation.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import {Spinner} from 'cli-spinner';
44

55
import {installFont} from './utils/fonts';
66
import {rimraf} from './utils/utils';
7-
import {downloadStarterMaster} from './utils/download';
7+
import {downloadStarterMain} from './utils/download';
88
import {unZipBuffer} from './utils/unzip';
9-
import { installDependencies } from "./utils/install";
9+
import {installDependencies} from './utils/install';
1010

1111
interface Answers {
1212
folder: string;
@@ -74,36 +74,36 @@ const prompt = (): Promise<Answers> => {
7474
const inquirer = require('inquirer');
7575

7676
return inquirer.prompt(questions);
77-
}
77+
};
7878

7979
const info = (answers: Answers) => {
8080
console.log(
8181
'\nRun ' +
82-
cyan('npm run start') +
83-
' in the newly created folder ' +
84-
cyan(answers.folder) +
85-
' to serve your presentation locally at the address ' +
86-
cyan('http://localhost:3000') +
87-
'\n'
82+
cyan('npm run start') +
83+
' in the newly created folder ' +
84+
cyan(answers.folder) +
85+
' to serve your presentation locally at the address ' +
86+
cyan('http://localhost:3000') +
87+
'\n'
8888
);
8989

9090
console.log('Find this presentation in the remote control with the keyword: ' + cyan(answers.title) + '\n');
9191
console.log(
9292
'If you rather like not to use the remote control while developing your deck, run ' +
93-
cyan('npm run start-no-remote') +
94-
' instead of the previous command\n'
93+
cyan('npm run start-no-remote') +
94+
' instead of the previous command\n'
9595
);
9696

9797
console.log('Dive deeper with the "Getting Started" guide at ' + cyan('https://docs.deckdeckgo.com') + '\n');
98-
}
98+
};
9999

100100
const createPresentation = async (answers: Answers) => {
101101
await downloadInstallPresentation(answers);
102102

103103
await installDependencies(answers.folder, '2/3');
104104

105105
await updatePresentation(answers);
106-
}
106+
};
107107

108108
const downloadInstallPresentation = async (answers: Answers) => {
109109
const loading = new Spinner(bold('[1/3] Creating your presentation...'));
@@ -114,11 +114,11 @@ const downloadInstallPresentation = async (answers: Answers) => {
114114
rimraf(answers.folder);
115115

116116
// 2. Download starter
117-
const buffer = await downloadStarterMaster();
117+
const buffer = await downloadStarterMain();
118118
await unZipBuffer(buffer, answers.folder);
119119

120120
loading.stop(true);
121-
}
121+
};
122122

123123
const updatePresentation = async (answers: Answers) => {
124124
const loading = new Spinner(bold('[3/3] Updating presentation...'));
@@ -129,7 +129,7 @@ const updatePresentation = async (answers: Answers) => {
129129
replaceAnswers(answers);
130130

131131
loading.stop(true);
132-
}
132+
};
133133

134134
const replaceAnswers = (answers: Answers) => {
135135
const replaceResources = [
@@ -171,4 +171,4 @@ const replaceAnswers = (answers: Answers) => {
171171
recursive: false,
172172
silent: true
173173
});
174-
}
174+
};

cli/src/template.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {bold, cyan} from 'colorette';
22
import {Spinner} from 'cli-spinner';
33

44
import {rimraf} from './utils/utils';
5-
import {downloadTemplateMaster} from './utils/download';
5+
import {downloadTemplateMain} from './utils/download';
66
import {unZipBuffer} from './utils/unzip';
77
import {installDependencies} from './utils/install';
88

@@ -62,7 +62,7 @@ const downloadTemplate = async (answers: Answers) => {
6262
rimraf(answers.name);
6363

6464
// 2. Download starter
65-
const buffer = await downloadTemplateMaster();
65+
const buffer = await downloadTemplateMain();
6666
await unZipBuffer(buffer, answers.name);
6767

6868
loading.stop(true);

cli/src/utils/download.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import {get, RequestOptions} from 'https';
22
import fs from 'fs';
33
import path from 'path';
44

5-
export function downloadStarterMaster() {
6-
return downloadFromURL(`https://github.com/deckgo/starter-kit/archive/master.zip`);
5+
export function downloadStarterMain() {
6+
return downloadFromURL(`https://github.com/deckgo/starter-kit/archive/main.zip`);
77
}
88

99
export function downloadFontsKey() {
1010
return downloadFromURL(`https://api.deckdeckgo.com/googlefonts/`);
1111
}
1212

13-
export function downloadTemplateMaster() {
14-
return downloadFromURL(`https://github.com/deckgo/template-kit/archive/master.zip`);
13+
export function downloadTemplateMain() {
14+
return downloadFromURL(`https://github.com/deckgo/template-kit/archive/main.zip`);
1515
}
1616

1717
export function downloadFontsList(key: string) {

0 commit comments

Comments
 (0)