fix(dependencies): resolve dependencies
This commit is contained in:
parent
f3594447ac
commit
aa87ed9427
@ -33,6 +33,7 @@
|
|||||||
"@types/node": "^10.9.2"
|
"@types/node": "^10.9.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@pushrocks/lik": "^3.0.1",
|
||||||
"@pushrocks/smartfile": "^6.0.8",
|
"@pushrocks/smartfile": "^6.0.8",
|
||||||
"@pushrocks/smartfm": "^2.0.1",
|
"@pushrocks/smartfm": "^2.0.1",
|
||||||
"@pushrocks/smarthbs": "^2.0.0",
|
"@pushrocks/smarthbs": "^2.0.0",
|
||||||
|
@ -19,6 +19,8 @@ export class ScafTemplate {
|
|||||||
suppliedVariables: any = {};
|
suppliedVariables: any = {};
|
||||||
missingVariables: string[] = [];
|
missingVariables: string[] = [];
|
||||||
|
|
||||||
|
dependencies: ScafTemplate[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* read a template from a directory
|
* read a template from a directory
|
||||||
*/
|
*/
|
||||||
@ -28,6 +30,7 @@ export class ScafTemplate {
|
|||||||
await this._findVariablesInTemplate();
|
await this._findVariablesInTemplate();
|
||||||
await this._checkSuppliedVariables();
|
await this._checkSuppliedVariables();
|
||||||
await this._checkDefaultVariables();
|
await this._checkDefaultVariables();
|
||||||
|
await this._resolveTemplateDependencies();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -153,4 +156,19 @@ export class ScafTemplate {
|
|||||||
this.defaultVariables = {};
|
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!')
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
import * as lik from '@pushrocks/lik';
|
||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartfile from '@pushrocks/smartfile';
|
||||||
import * as smartfm from '@pushrocks/smartfm';
|
import * as smartfm from '@pushrocks/smartfm';
|
||||||
import * as smarthbs from '@pushrocks/smarthbs';
|
import * as smarthbs from '@pushrocks/smarthbs';
|
||||||
@ -6,4 +7,4 @@ import * as smartinteract from '@pushrocks/smartinteract';
|
|||||||
import * as smartq from '@pushrocks/smartpromise';
|
import * as smartq from '@pushrocks/smartpromise';
|
||||||
import * as smartyaml from '@pushrocks/smartyaml';
|
import * as smartyaml from '@pushrocks/smartyaml';
|
||||||
|
|
||||||
export { path, smartfile, smartfm, smarthbs, smartinteract, smartq, smartyaml };
|
export { path, lik, smartfile, smartfm, smarthbs, smartinteract, smartq, smartyaml };
|
||||||
|
Loading…
Reference in New Issue
Block a user