From 185b7a38d5e4ee99f7619bcc1ac598dc09b62c24 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sun, 25 Jun 2023 00:29:02 +0200 Subject: [PATCH] fix(core): update --- package.json | 4 +--- ts/00_commitinfo_data.ts | 2 +- ts/smarthbs.plugins.ts | 15 +++++++++++---- ts/smarthbs.variables.ts | 5 ++++- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 90953ff..8841d82 100644 --- a/package.json +++ b/package.json @@ -27,9 +27,7 @@ "@pushrocks/smartfile": "^10.0.2", "@pushrocks/smartpath": "^5.0.5", "@pushrocks/smartpromise": "^3.1.7", - "@types/lodash.uniq": "^4.5.7", - "handlebars": "^4.7.7", - "lodash.uniq": "^4.5.0" + "handlebars": "^4.7.7" }, "devDependencies": { "@gitzone/tsbuild": "^2.1.63", diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 678c5b3..e56e113 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/smarthbs', - version: '3.0.1', + version: '3.0.2', description: 'handlebars with better fs support' } diff --git a/ts/smarthbs.plugins.ts b/ts/smarthbs.plugins.ts index 1b95a57..131ce28 100644 --- a/ts/smarthbs.plugins.ts +++ b/ts/smarthbs.plugins.ts @@ -1,8 +1,15 @@ -import handlebars from 'handlebars'; -import lodashUniq from 'lodash.uniq'; -import * as smartpath from '@pushrocks/smartpath'; +// node native import * as path from 'path'; + +export { path }; + +import * as smartpath from '@pushrocks/smartpath'; import * as smartfile from '@pushrocks/smartfile'; import * as smartpromise from '@pushrocks/smartpromise'; -export { handlebars, lodashUniq, path, smartfile, smartpromise }; +export { smartpath, smartfile, smartpromise }; + +// third party +import handlebars from 'handlebars'; + +export { handlebars }; diff --git a/ts/smarthbs.variables.ts b/ts/smarthbs.variables.ts index eb0bd6f..2fce41a 100644 --- a/ts/smarthbs.variables.ts +++ b/ts/smarthbs.variables.ts @@ -31,7 +31,10 @@ export let findVarsInHbsString = async (hbsStringArg: string) => { }); // make sure are uniq - varNameArray = plugins.lodashUniq(varNameArray); + function uniqueArray(input: string[]): string[] { + return Array.from(new Set(input)); + } + varNameArray = uniqueArray(varNameArray); return varNameArray; };