const path = require('path'); module.exports = { tags: async (tln) => [], options: async (tln) => [], env: async (tln, env) => { env.GRUNT_HOME = env.TLN_COMPONENT_HOME; env.PATH = [path.join(env.TLN_COMPONENT_HOME, 'node_modules', '.bin'), env.PATH].join(path.delimiter); }, dotenvs: async (tln) => [], inherits: async (tln) => [], depends: async (tln) => [], steps: async (tln) => [ { id: 'install', filter: '', builder: async (tln, script) => { const id = script.env.TLN_COMPONENT_ID; const home = script.env.TLN_COMPONENT_HOME; const {name, version} = tln.unpackId(id); if (version && tln.canInstallComponent(tln, id, home)) { script.set([ `npm i ${name}@${version}` ]); } } } ], components: async (tln) => require('./components.js') }