Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
45710ded00 | |||
aa87ed9427 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartscaf",
|
"name": "@pushrocks/smartscaf",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartscaf",
|
"name": "@pushrocks/smartscaf",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "scaffold projects quickly",
|
"description": "scaffold projects quickly",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@ -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 };
|
||||||
|
Reference in New Issue
Block a user