Compare commits

..

2 Commits

Author SHA1 Message Date
45710ded00 2.0.1 2018-08-28 00:20:02 +02:00
aa87ed9427 fix(dependencies): resolve dependencies 2018-08-28 00:20:02 +02:00
4 changed files with 23 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartscaf",
"version": "2.0.0",
"version": "2.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartscaf",
"version": "2.0.0",
"version": "2.0.1",
"private": false,
"description": "scaffold projects quickly",
"main": "dist/index.js",
@ -33,6 +33,7 @@
"@types/node": "^10.9.2"
},
"dependencies": {
"@pushrocks/lik": "^3.0.1",
"@pushrocks/smartfile": "^6.0.8",
"@pushrocks/smartfm": "^2.0.1",
"@pushrocks/smarthbs": "^2.0.0",

View File

@ -19,6 +19,8 @@ export class ScafTemplate {
suppliedVariables: any = {};
missingVariables: string[] = [];
dependencies: ScafTemplate[];
/**
* read a template from a directory
*/
@ -28,6 +30,7 @@ export class ScafTemplate {
await this._findVariablesInTemplate();
await this._checkSuppliedVariables();
await this._checkDefaultVariables();
await this._resolveTemplateDependencies();
}
/**
@ -153,4 +156,19 @@ export class ScafTemplate {
this.defaultVariables = {};
}
}
/**
* resolve template dependencies
*/
private async _resolveTemplateDependencies() {
const dependencies = this.templateSmartfileArray.find(smartfileArg => {
return smartfileArg.parsedPath.base === "dependencies.yml"
});
if(!dependencies) {
console.log('No further template dependencies defined!');
return;
}
console.log('Found template dependencies! Resolving them now!')
}
}

View File

@ -1,4 +1,5 @@
import * as path from 'path';
import * as lik from '@pushrocks/lik';
import * as smartfile from '@pushrocks/smartfile';
import * as smartfm from '@pushrocks/smartfm';
import * as smarthbs from '@pushrocks/smarthbs';
@ -6,4 +7,4 @@ import * as smartinteract from '@pushrocks/smartinteract';
import * as smartq from '@pushrocks/smartpromise';
import * as smartyaml from '@pushrocks/smartyaml';
export { path, smartfile, smartfm, smarthbs, smartinteract, smartq, smartyaml };
export { path, lik, smartfile, smartfm, smarthbs, smartinteract, smartq, smartyaml };