Skip to content

Commit

Permalink
Merge pull request #16 from prismicio/alw/base-infos
Browse files Browse the repository at this point in the history
improve prismic base management
  • Loading branch information
arnaudlewis authored May 31, 2017
2 parents 699c89d + 05cf276 commit b190ecb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions lib/prismic.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ function version() {

async function init(config, domain, args, theme) {
const base = config.base || Helpers.Domain.default;
if (args['--new'] && Helpers.Domain.default !== base) {
Helpers.UI.display(`CAREFUL, your current base is: ${base}\n`);
}

Helpers.UI.display('Let\'s get to it!');
const templates = await Helpers.Prismic.templates();
Repository.create(templates, base, domain, args, theme).catch((err) => {
Expand Down Expand Up @@ -196,6 +200,7 @@ function main() {
list();
break;
case 'base':
Helpers.UI.display(`Current base: ${config.base}\n`);
updateBase(firstArg);
break;
case 'version':
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"description": "Command line to bootstrap prismic projects.",
"scripts": {
"build": "babel ./lib/ -d ./bin/",
"watch": "npm run prebuild; nodemon --watch ./lib --exec \"npm run build\"",
"watch": "npm run prebuild; nodemon --watch ./lib --exec \"npm run lint; npm run build\"",
"prebuild": "mkdir -p ./bin",
"prepublish": "npm run prebuild; npm run build;",
"lint": "eslint lib/**/*.js",
Expand All @@ -15,7 +15,7 @@
"bin": {
"prismic": "bin/prismic.js"
},
"preferGlobal": "true",
"preferGlobal": true,
"dependencies": {
"adm-zip": "~0.4.7",
"babel-runtime": "~6.23.0",
Expand Down

0 comments on commit b190ecb

Please sign in to comment.