@wmfs/tymly
Version:
A framework for building and sharing workflows in Node.js
23 lines (18 loc) • 420 B
JavaScript
const path = require('path')
module.exports = function defaultFileLoader (blueprintMeta, originalKey, filePath) {
const ext = path.extname(filePath)
const keyParts = [
blueprintMeta.namespace,
originalKey
]
return {
key: keyParts.join('_') + ext,
content: {
filePath,
filename: path.basename(filePath),
namespace: blueprintMeta.namespace,
ext
}
}
}