UNPKG

adonis-spaces

Version:

Simplifies working with DigitalOcean Spaces through Adonis

19 lines (15 loc) 531 B
'use strict' const { join } = require('path') async function copyConfigFile (cli, appRoot) { try { const template = await cli.command.readFile(join(__dirname, 'config/spaces.js'), 'utf-8') await cli.command.generateFile(join(appRoot, 'config/spaces.js'), template, { name: 'spaces' }) cli.command.completed('create', 'config/spaces.js') } catch (error) { // ignore error } } module.exports = async (cli) => { const appRoot = cli.helpers.appRoot() await copyConfigFile(cli, appRoot) }