create-nocobase-app
Advanced tools
Comparing version 0.5.0-alpha.25 to 0.5.0-alpha.26
@@ -73,7 +73,7 @@ "use strict"; | ||
const program = new (_commander().default.Command)(packageJson.name).version(packageJson.version).option('--simple', 'create nocobase app without install dependencies').option('--quickstart', 'create quickstart nocobase app').arguments('<project-directory>').usage(`${_utils().chalk.green('<project-directory>')}`).action( /*#__PURE__*/function () { | ||
const program = new (_commander().default.Command)(packageJson.name).version(packageJson.version).option('--simple', 'create nocobase app without install dependencies').option('--quickstart', 'create quickstart nocobase app').option('--lang [lang]', 'language settings').arguments('<project-directory>').usage(`${_utils().chalk.green('<project-directory>')}`).action( /*#__PURE__*/function () { | ||
var _ref = _asyncToGenerator(function* (directory, options) { | ||
var _runner$stdout, _runner$stderr; | ||
console.log(`Creating a new Nocobase application at ${_utils().chalk.green(directory)}.`); | ||
console.log(`Creating a new NocoBase application at ${_utils().chalk.green(directory)}.`); | ||
console.log('Creating files.'); | ||
@@ -126,3 +126,3 @@ | ||
// Using Sqlite as Database | ||
const prefix = _utils().chalk.yellow('Nocobase init'); | ||
const prefix = _utils().chalk.yellow('NocoBase init'); | ||
@@ -136,3 +136,3 @@ const initLoader = (0, _ora().default)(prefix).start(); | ||
const init = (0, _utils2.runInit)(fullPath); | ||
const init = (0, _utils2.runInit)(fullPath, ['--import-demo', `--lang=${options.lang || 'en-US'}`]); | ||
init.stderr.on('data', initLog); | ||
@@ -139,0 +139,0 @@ init.stdout.on('data', initLog); |
@@ -7,5 +7,5 @@ "use strict"; | ||
exports.hasYarn = hasYarn; | ||
exports.runInit = runInit; | ||
exports.runInstall = runInstall; | ||
exports.runStart = runStart; | ||
exports.runInit = runInit; | ||
@@ -60,5 +60,10 @@ function _react() { | ||
function runInit(path) { | ||
return runYarn(path, ['run', 'nocobase', 'init', hasYarn() ? '--import-demo' : '-- --import-demo']); | ||
function runInit(path, args = []) { | ||
if (!hasYarn()) { | ||
args.unshift('--'); | ||
} | ||
console.log('run init', args); | ||
return runYarn(path, ['run', 'nocobase', 'init', ...args]); | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "create-nocobase-app", | ||
"version": "0.5.0-alpha.25", | ||
"version": "0.5.0-alpha.26", | ||
"main": "lib/index.js", | ||
@@ -26,3 +26,3 @@ "types": "lib/index.d.ts", | ||
}, | ||
"gitHead": "8376c6d1b2309f1d6221e8baa49ddd5ba72289c4" | ||
"gitHead": "7611beea0f89ce1be774dddfc0786776310bfc35" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
43301
671