Add date functions
This commit is contained in:
parent
ef08c699d6
commit
60574196b9
1 changed files with 9 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
// import { addedHelpers } from "./helpers/external"
|
const { date, duration } = require("./helpers/date")
|
||||||
|
|
||||||
// https://github.com/evanw/esbuild/issues/56
|
// https://github.com/evanw/esbuild/issues/56
|
||||||
const externalCollections = {
|
const externalCollections = {
|
||||||
|
@ -13,6 +13,11 @@ const externalCollections = {
|
||||||
// uuid: require("@budibase/handlebars-helpers/lib/uuid"),
|
// uuid: require("@budibase/handlebars-helpers/lib/uuid"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const addedHelpers = {
|
||||||
|
date: date,
|
||||||
|
duration: duration,
|
||||||
|
}
|
||||||
|
|
||||||
let helpers = undefined
|
let helpers = undefined
|
||||||
|
|
||||||
const getHelperList = () => {
|
const getHelperList = () => {
|
||||||
|
@ -26,9 +31,9 @@ const getHelperList = () => {
|
||||||
helpers[key] = func
|
helpers[key] = func
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// for (let key of Object.keys(addedHelpers)) {
|
for (let key of Object.keys(addedHelpers)) {
|
||||||
// helpers[key] = addedHelpers[key]
|
helpers[key] = addedHelpers[key]
|
||||||
// }
|
}
|
||||||
return helpers
|
return helpers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue