This commit is contained in:
2019-09-10 17:58:14 +02:00
parent f5b86154db
commit 1d35da50cd
21 changed files with 804 additions and 332 deletions

View File

@ -1,7 +1,7 @@
import * as handlebars from 'handlebars';
import * as lodash from 'lodash';
import lodashUniq from 'lodash.uniq';
import * as path from 'path';
import * as smartfile from '@pushrocks/smartfile';
import * as smartpromise from '@pushrocks/smartpromise';
export { handlebars, lodash, path, smartfile, smartpromise };
export { handlebars, lodashUniq, path, smartfile, smartpromise };

View File

@ -18,11 +18,11 @@ export let findVarsInHbsString = async (hbsStringArg: string) => {
let tripleCurlyMatches = hbsString.match(tripleCurlyRegex);
if (tripleCurlyMatches) {
hbsString = hbsString.replace(tripleCurlyRegex, '[[[replaced]]]');
varNameArray = plugins.lodash.concat(varNameArray, tripleCurlyMatches);
varNameArray = varNameArray.concat(tripleCurlyMatches);
}
let doubleCurlyMatches = hbsString.match(doubleCurlyRegex);
if (doubleCurlyMatches) {
varNameArray = plugins.lodash.concat(varNameArray, doubleCurlyMatches);
varNameArray = varNameArray.concat(doubleCurlyMatches);
}
// make sure we are clean from curly brackets
@ -31,7 +31,7 @@ export let findVarsInHbsString = async (hbsStringArg: string) => {
});
// make sure are uniq
varNameArray = plugins.lodash.uniq(varNameArray);
varNameArray = plugins.lodashUniq(varNameArray);
return varNameArray;
};