UNPKG

tronbox

Version:

TronBox - Simple development framework for Tron

1 lines 918 B
"use strict";var command={command:"init",description:"Initialize new and empty tronBox project",builder:{},run:function run(options,done){var fs=require("fs");var path=require("path");if(fs.existsSync(path.resolve(process.cwd(),"./truffle-config.js"))){var ConvertCommand=require("./convert");return ConvertCommand.run(options,done)}process.env.CURRENT="init";var Config=require("../../components/Config");var OS=require("os");var InitCommand=require("../../components/Init");var config=Config["default"]()["with"]({logger:console});if(options._&&options._.length>0){config.logger.log("Error: `tronbox init` no longer accepts a project template name as an argument.");config.logger.log();config.logger.log(" - For an empty project, use `tronbox init` with no arguments"+OS.EOL+" - Or, browse the tronbox Boxes at <https://github.com/tronsuper>!");process.exit(1)}InitCommand.run(options,done)}};module.exports=command;