bajo 0.2.20 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/boot/lib/build-helper.js +2 -2
- package/package.json +1 -1
package/boot/lib/build-helper.js
CHANGED
|
@@ -37,13 +37,13 @@ export default async function (dir, pkg = 'bajo') {
|
|
|
37
37
|
const files = await fastGlob([`!${dir}/**/_*.{js,json}`, `${dir}/**/*.{js,json}`])
|
|
38
38
|
const helper = {}
|
|
39
39
|
for (const f of files) {
|
|
40
|
-
const ext = path.extname()
|
|
40
|
+
const ext = path.extname(f)
|
|
41
41
|
const base = f.replace(dir, '').replace(ext, '')
|
|
42
42
|
const name = camelCase(base)
|
|
43
43
|
const fnName = pkg + '.' + name
|
|
44
44
|
let mod
|
|
45
45
|
if (ext === '.json') mod = readJson(f)
|
|
46
|
-
else await importModule(f)
|
|
46
|
+
else mod = await importModule(f)
|
|
47
47
|
if (isFunction(mod)) {
|
|
48
48
|
if (mod.constructor.name === 'AsyncFunction') mod = wrapAsyncFn.call(this, fnName, mod, true)
|
|
49
49
|
else mod = wrapFn.call(this, fnName, mod, true)
|