UNPKG

toka

Version:

A handy tool to generate common files in command line

16 lines (14 loc) 400 B
var fs = require('fs'); var path = require('path'); module.exports = function (options) { var lib = options._[1]; lib = lib || 'lib'; var json = { "directory": lib }; json = JSON.stringify(json, undefined, 2); fs.writeFile(path.join(process.cwd(), options.dir || '', '.bowerrc'), json, function (err) { if (err) throw err; log.success('The .bowerrc file is saved!'); }); }