Skip to content

Commit

Permalink
Merge pull request #479 from /issues/478-dep
Browse files Browse the repository at this point in the history
Issues/478 dep
  • Loading branch information
bmuenzenmeyer authored Sep 27, 2016
2 parents 4a7cf8d + 0da7f3a commit 1a26824
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions core/scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"use strict";
try{

try {
console.log('Beginning Pattern Lab postinstall...');

var sm = require('../lib/starterkit_manager.js');
var u = require('../lib/utilities.js');
var path = require('path');
var fs = require('fs-extra');
var smPath = path.resolve(__dirname, '..', 'lib/starterkit_manager.js');
var uPath = path.resolve(__dirname, '..', 'lib/utilities.js');
var sm = require(smPath);
var u = require(uPath);

//get the config
var configPath = path.resolve(process.cwd(), 'patternlab-config.json');
Expand All @@ -17,17 +18,15 @@ try{
var foundStarterkits = starterkit_manager.detect_starterkits();

//todo - enhance to support multiple kits with prompt for each or all
if(foundStarterkits && foundStarterkits.length > 0) {
if (foundStarterkits && foundStarterkits.length > 0) {
starterkit_manager.load_starterkit(foundStarterkits[0], true);
} else {
console.log('No starterkits found to automatically load.')
}
u.logGreen('Pattern Lab postinstall complete.');

} catch (ex) {
u.logOrange(ex);
console.log(ex);
u.logOrange('An error occurred during Pattern Lab Node postinstall.');
u.logOrange('Pattern Lab postinstall completed with errors.');
}


0 comments on commit 1a26824

Please sign in to comment.