-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,740 additions
and
1,578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v10.16.3 | ||
v12.18.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,8 @@ addons: | |
ssh_known_hosts: | ||
- github.com | ||
node_js: | ||
- 10 | ||
- 10.22.1 | ||
- 12.18.4 | ||
|
||
cache: | ||
directories: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
environment: | ||
matrix: | ||
- nodejs_version: "10" | ||
- nodejs_version: "12" | ||
platform: | ||
- x86 | ||
- x64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
#!/usr/bin/env node | ||
|
||
require('colors'); | ||
const apiHost = 'https://api.bigcommerce.com'; | ||
const dotStencilFilePath = './.stencil'; | ||
const options = { dotStencilFilePath }; | ||
const pkg = require('../package.json'); | ||
const Program = require('commander'); | ||
|
||
const { DOT_STENCIL_FILE_PATH, PACKAGE_INFO, API_HOST } = require('../constants'); | ||
const program = require('../lib/commander'); | ||
const stencilPull = require('../lib/stencil-pull'); | ||
const versionCheck = require('../lib/version-check'); | ||
const themeApiClient = require('../lib/theme-api-client'); | ||
const { printCliResultError} = require('../lib/cliCommon'); | ||
|
||
Program | ||
.version(pkg.version) | ||
.option('--host [hostname]', 'specify the api host', apiHost) | ||
program | ||
.version(PACKAGE_INFO.version) | ||
.option('--host [hostname]', 'specify the api host', API_HOST) | ||
.option('--save [filename]', 'specify the filename to save the config as', 'config.json') | ||
.parse(process.argv); | ||
|
||
if (!versionCheck()) { | ||
process.exit(2); | ||
} | ||
|
||
stencilPull(Object.assign({}, options, { | ||
apiHost: Program.host || apiHost, | ||
saveConfigName: Program.save, | ||
}), (err, result) => { | ||
const cliOptions = program.opts(); | ||
const options = { | ||
dotStencilFilePath: DOT_STENCIL_FILE_PATH, | ||
apiHost: cliOptions.host || API_HOST, | ||
saveConfigName: cliOptions.save, | ||
}; | ||
|
||
stencilPull(options, (err, result) => { | ||
if (err) { | ||
console.log("\n\n" + 'not ok'.red + ` -- ${err} see details below:`); | ||
themeApiClient.printErrorMessages(err.messages); | ||
console.log('If this error persists, please visit https://github.com/bigcommerce/stencil-cli/issues and submit an issue.'); | ||
} else { | ||
console.log('ok'.green + ` -- Pulled active theme config to ${result.saveConfigName}`); | ||
printCliResultError(err); | ||
return; | ||
} | ||
console.log('ok'.green + ` -- Pulled active theme config to ${result.saveConfigName}`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.