Skip to content

Commit

Permalink
Change theme to quickStart
Browse files Browse the repository at this point in the history
  • Loading branch information
dvonlehman committed Jul 31, 2017
1 parent 0c3fbe1 commit 7ad3050
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bin/aero.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ program.version(pkg.version)
.option('-s, --stage [stage]')
.option('-d, --directory [directory]')
.option('-S, --source [source]')
.option('-t, --theme [theme]')
.option('-q, --quick-start [quickStart]')
.option('-r, --repo [repo]')
.option('-c, --commit-url [commitUrl]')
.option('-R, --reset [reset]')
Expand Down
14 changes: 7 additions & 7 deletions commands/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = program => {
.then(() => {
// If a repo argument was provided then create a new folder to extract
// the repo contents to.
if (program.source || program.theme) {
if (program.source || program.quickStart) {
return createSourceDirectory(program);
}
return null;
Expand All @@ -71,7 +71,7 @@ module.exports = program => {
output.blankLine();

var nextCommand;
if (program.source || program.theme) {
if (program.source || program.quickStart) {
nextCommand = 'cd ' + program.name + ' && aero deploy';
} else {
nextCommand = 'aero deploy';
Expand Down Expand Up @@ -143,8 +143,8 @@ function createWebsite(program) {
const appData = {
name: _.isString(program.name) ? program.name : null
};
if (!_.isEmpty(program.theme)) {
appData.theme = program.theme;
if (!_.isEmpty(program.quickStart)) {
appData.theme = program.quickStart;
}

return api.post({
Expand Down Expand Up @@ -180,9 +180,9 @@ function createSourceDirectory(program) {
.then(() => {
program.cwd = path.join(program.cwd, program.name);
var sourceUrl;
if (program.theme) {
sourceUrl = urlJoin(program.themesBaseUrl, program.theme + '.tar.gz');
output(' ' + chalk.dim('Downloading theme ' + program.theme));
if (program.quickStart) {
sourceUrl = urlJoin(program.quickStartBaseUrl, program.quickStart + '.tar.gz');
output(' ' + chalk.dim('Downloading quick start ' + program.quickStart));
} else {
sourceUrl = program.source;
output(' ' + chalk.dim('Downloading source archive ' + sourceUrl));
Expand Down
8 changes: 4 additions & 4 deletions commands/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ create:
- name: name
short: n
summary: Specify the unique name for the website. The name must be URL friendly consiting of lowercase letters, numbers, and dashes.
- name: theme
short: t
summary: Specify a theme from the Aerobatic gallery to use to kickstart the website.
- name: quick-start
short: q
summary: Specify a quikc start from the Aerobatic gallery to use to kickstart the website.
- name: source
short: S
summary: Specify a URL to a .zip or .tar.gz archive to create the new website from.
examples:
- aero create
- aero create --name my-new-site
- aero create -n my-new-site
- aero create --theme hugo/agency
- aero create --quick-start hugo/agency
- aero create --source https://html5up.net/editorial/download
- aero create -S https://html5up.net/editorial/download -n my-new-site

Expand Down
4 changes: 2 additions & 2 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ dashboardUrl: https://dashboard.aerobatic.com
awsCertificatesEmail: [email protected]
userConfigFile: .aerorc.test.yml
deployTimeoutSeconds: 360
# The URL to the bucket where the Aerobatic themes reside
themesBaseUrl: https://aerobatic-themes.s3-accelerate.amazonaws.com/
# The URL to the bucket where the Aerobatic quick starts reside
quickStartBaseUrl: https://aerobatic-themes.s3-accelerate.amazonaws.com/
2 changes: 1 addition & 1 deletion lib/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function downloadTempArchive(url, tempArchive) {
return reject(Error.create('Source archive ' + url + ' could not be found.', {formatted: true}));
}
if (resp.statusCode === 403 && url.indexOf('/aerobatic-themes') !== -1) {
return reject(Error.create('Invalid theme', {formatted: true}));
return reject(Error.create('Invalid quick start', {formatted: true}));
}
if (resp.statusCode !== 200) {
downloadError = true;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aerobatic-cli",
"version": "1.0.45",
"version": "1.0.46",
"description": "Command line interface for Aerobatic static hosting platform",
"main": "bin/aero",
"bin": {
Expand Down

0 comments on commit 7ad3050

Please sign in to comment.