UI for Zipcoin Blue

start.js 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const tslib_1 = require("tslib");
  4. const path = require("path");
  5. const chalk_1 = require("chalk");
  6. const lib_1 = require("@ionic/cli-framework/lib");
  7. const cli_utils_1 = require("@ionic/cli-utils");
  8. const command_1 = require("@ionic/cli-utils/lib/command");
  9. const errors_1 = require("@ionic/cli-utils/lib/errors");
  10. const fs_1 = require("@ionic/cli-framework/utils/fs");
  11. const project_1 = require("@ionic/cli-utils/lib/project");
  12. const emoji_1 = require("@ionic/cli-utils/lib/utils/emoji");
  13. let StartCommand = class StartCommand extends command_1.Command {
  14. preRun(inputs, options) {
  15. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  16. const { STARTER_TEMPLATES, getStarterTemplateTextList } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/start'));
  17. const { promptToLogin } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/session'));
  18. // If the action is list then lets just end here.
  19. if (options['list']) {
  20. this.env.log.msg(getStarterTemplateTextList(STARTER_TEMPLATES).join('\n'));
  21. throw new errors_1.FatalException('', 0);
  22. }
  23. if (options['skip-deps']) {
  24. this.env.log.warn(`The ${chalk_1.default.green('--skip-deps')} option has been deprecated. Please use ${chalk_1.default.green('--no-deps')}.`);
  25. options['deps'] = false;
  26. }
  27. if (options['skip-link']) {
  28. this.env.log.warn(`The ${chalk_1.default.green('--skip-link')} option has been deprecated. Please use ${chalk_1.default.green('--no-link')}.`);
  29. options['link'] = false;
  30. }
  31. if (options['pro-id']) {
  32. if (options['link'] === false) {
  33. this.env.log.warn(`The ${chalk_1.default.green('--no-link')} option has no effect with ${chalk_1.default.green('--pro-id')}.`);
  34. }
  35. options['link'] = true;
  36. }
  37. const proAppId = options['pro-id'] ? String(options['pro-id']) : undefined;
  38. const config = yield this.env.config.load();
  39. if (proAppId && config.backend !== cli_utils_1.BACKEND_PRO) {
  40. yield this.env.runCommand(['config', 'set', '-g', 'backend', 'pro'], {});
  41. this.env.log.nl();
  42. this.env.log.info(`${chalk_1.default.bold(chalk_1.default.blue.underline('Welcome to Ionic Pro!') + ' The CLI is now set up to use Ionic Pro services.')}\n` +
  43. `You can revert back to Ionic Cloud (legacy) services at any time:\n\n` +
  44. `${chalk_1.default.green('ionic config set -g backend legacy')}\n`);
  45. }
  46. if (this.env.project.directory) {
  47. const confirm = yield this.env.prompt({
  48. type: 'confirm',
  49. name: 'confirm',
  50. message: 'You are already in an Ionic project directory. Do you really want to start another project here?',
  51. default: false,
  52. });
  53. if (!confirm) {
  54. this.env.log.info('Not starting project within existing project.');
  55. throw new errors_1.FatalException();
  56. }
  57. }
  58. if (options['v1'] || options['v2']) {
  59. const type = options['v1'] ? 'ionic1' : 'ionic-angular';
  60. throw new errors_1.FatalException(`Sorry! The ${chalk_1.default.green('--v1')} and ${chalk_1.default.green('--v2')} flags have been removed.\n` +
  61. `Use the ${chalk_1.default.green('--type')} option. (${chalk_1.default.green('ionic start --help')})\n\n` +
  62. `For ${chalk_1.default.bold(this.env.project.formatType(type))} projects, try ${chalk_1.default.green('ionic start ' + (inputs.length > 0 ? inputs.join(' ') + ' ' : '') + '--type=' + type)}`);
  63. }
  64. if (options['app-name']) {
  65. this.env.log.warn(`The ${chalk_1.default.green('--app-name')} option has been deprecated, please use ${chalk_1.default.green('--display-name')}.`);
  66. options['display-name'] = options['app-name'];
  67. }
  68. if (options['bundle-id']) {
  69. this.env.log.info(`${chalk_1.default.green('--bundle-id')} detected, using ${chalk_1.default.green('--cordova')}`);
  70. options['cordova'] = true;
  71. }
  72. if (proAppId) {
  73. if (!(yield this.env.session.isLoggedIn())) {
  74. yield promptToLogin(this.env);
  75. }
  76. }
  77. if (!inputs[0]) {
  78. if (proAppId) {
  79. const { App } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/app'));
  80. const token = yield this.env.session.getUserToken();
  81. const appLoader = new App(token, this.env.client);
  82. const app = yield appLoader.load(proAppId);
  83. this.env.log.info(`Using ${chalk_1.default.bold(app.slug)} for ${chalk_1.default.green('name')}.`);
  84. inputs[0] = app.slug;
  85. }
  86. else {
  87. const name = yield this.env.prompt({
  88. type: 'input',
  89. name: 'name',
  90. message: 'What would you like to name your project:',
  91. validate: v => lib_1.validators.required(v, 'name'),
  92. });
  93. inputs[0] = name;
  94. }
  95. }
  96. if (!inputs[1]) {
  97. const template = yield this.env.prompt({
  98. type: 'list',
  99. name: 'template',
  100. message: 'What starter would you like to use:',
  101. choices: () => {
  102. const starterTemplates = STARTER_TEMPLATES.filter(st => st.type === options['type']);
  103. return getStarterTemplateTextList(starterTemplates)
  104. .map((text, i) => {
  105. return {
  106. name: text,
  107. short: starterTemplates[i].name,
  108. value: starterTemplates[i].name
  109. };
  110. });
  111. }
  112. });
  113. inputs[1] = template;
  114. }
  115. });
  116. }
  117. run(inputs, options) {
  118. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  119. const { getHelloText } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/start'));
  120. const { pkgManagerArgs } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/utils/npm'));
  121. const [name, template] = inputs;
  122. const displayName = options['display-name'] ? String(options['display-name']) : name;
  123. const proAppId = options['pro-id'] ? String(options['pro-id']) : undefined;
  124. const clonedApp = template.includes(':');
  125. let linkConfirmed = typeof proAppId === 'string';
  126. const config = yield this.env.config.load();
  127. const gitIntegration = options['git'] ? yield this.isGitSetup() : false;
  128. if (proAppId && config.backend === cli_utils_1.BACKEND_PRO && !gitIntegration) {
  129. throw new errors_1.FatalException(`Git CLI not found on your PATH. It must be installed to connect this app to Ionic.\n` +
  130. `See installation docs for git: ${chalk_1.default.bold('https://git-scm.com/book/en/v2/Getting-Started-Installing-Git')}`);
  131. }
  132. const projectDir = path.resolve(name);
  133. yield this.validateName(name);
  134. yield this.ensureDirectory(name, projectDir);
  135. if (clonedApp) {
  136. yield this.env.shell.run('git', ['clone', template, name, '--progress'], { showExecution: true });
  137. }
  138. else {
  139. const starterTemplate = yield this.findStarterTemplate(template, String(options['type']));
  140. yield this.downloadStarterTemplate(projectDir, starterTemplate);
  141. }
  142. // start is weird, once the project directory is created, it becomes a
  143. // "project" command and so we replace the `Project` instance that was
  144. // autogenerated when the CLI booted up. This has worked thus far?
  145. this.env.project = new project_1.Project(projectDir, project_1.PROJECT_FILE);
  146. const shellOptions = { cwd: projectDir };
  147. if (!clonedApp) {
  148. if (!options['cordova']) {
  149. const confirm = yield this.env.prompt({
  150. type: 'confirm',
  151. name: 'confirm',
  152. message: 'Would you like to integrate your new app with Cordova to target native iOS and Android?',
  153. default: false,
  154. });
  155. if (confirm) {
  156. options['cordova'] = true;
  157. }
  158. }
  159. yield this.personalizeApp(projectDir, name, displayName);
  160. if (options['cordova']) {
  161. yield this.env.runCommand(['integrations', 'enable', 'cordova', '--quiet']);
  162. const bundleId = options['bundle-id'] ? String(options['bundle-id']) : undefined;
  163. yield this.personalizeCordovaApp(projectDir, name, bundleId);
  164. }
  165. this.env.log.nl();
  166. }
  167. if (options['deps']) {
  168. this.env.log.info('Installing dependencies may take several minutes.');
  169. this.env.log.msg('\n');
  170. this.env.log.msg(chalk_1.default.bold(` ${emoji_1.emoji('✨', '*')} IONIC DEVAPP ${emoji_1.emoji('✨', '*')}`));
  171. this.env.log.msg('\n Speed up development with the ' + chalk_1.default.bold('Ionic DevApp') +
  172. ', our fast, on-device testing mobile app\n\n');
  173. this.env.log.msg(` - ${emoji_1.emoji('🔑', '')} Test on iOS and Android without Native SDKs`);
  174. this.env.log.msg(` - ${emoji_1.emoji('🚀', '')} LiveReload for instant style and JS updates`);
  175. this.env.log.msg('\n ️--> Install DevApp: ' + chalk_1.default.bold('https://bit.ly/ionic-dev-app') + ' <--\n\n');
  176. const [installer, ...installerArgs] = yield pkgManagerArgs(this.env, { command: 'install' });
  177. yield this.env.shell.run(installer, installerArgs, shellOptions);
  178. }
  179. if (!clonedApp) {
  180. if (gitIntegration) {
  181. yield this.env.shell.run('git', ['init'], Object.assign({ showSpinner: false }, shellOptions));
  182. }
  183. if (config.backend === cli_utils_1.BACKEND_PRO) {
  184. if (options['link'] && !linkConfirmed) {
  185. this.env.log.msg('\n' + chalk_1.default.bold(` ${emoji_1.emoji('🔥', '*')} IONIC PRO ${emoji_1.emoji('🔥', '*')}`));
  186. this.env.log.msg('\n Supercharge your Ionic development with the ' + chalk_1.default.bold('Ionic Pro') + ' SDK\n\n');
  187. this.env.log.msg(` - ${emoji_1.emoji('⚠️', '')} Track runtime errors in real-time, back to your original TypeScript`);
  188. this.env.log.msg(` - ${emoji_1.emoji('📲', '')} Push remote updates and skip the app store queue`);
  189. this.env.log.msg(`\nLearn more about Ionic Pro: ${chalk_1.default.bold('https://ionicframework.com/products')}\n`);
  190. const confirm = yield this.env.prompt({
  191. type: 'confirm',
  192. name: 'confirm',
  193. message: 'Install the free Ionic Pro SDK and connect your app?',
  194. noninteractiveValue: false,
  195. });
  196. this.env.log.msg('\n-----------------------------------\n\n');
  197. if (confirm) {
  198. linkConfirmed = true;
  199. }
  200. }
  201. if (linkConfirmed) {
  202. const [installer, ...installerArgs] = yield pkgManagerArgs(this.env, { pkg: '@ionic/pro' });
  203. yield this.env.shell.run(installer, installerArgs, shellOptions);
  204. const cmdArgs = ['link'];
  205. if (proAppId) {
  206. cmdArgs.push(proAppId);
  207. }
  208. yield this.env.runCommand(cmdArgs);
  209. }
  210. }
  211. const manifestPath = path.resolve(projectDir, 'ionic.starter.json');
  212. const manifest = yield this.loadManifest(manifestPath);
  213. if (manifest) {
  214. yield fs_1.fsUnlink(manifestPath);
  215. }
  216. if (gitIntegration) {
  217. yield this.env.shell.run('git', ['add', '-A'], Object.assign({ showSpinner: false }, shellOptions));
  218. yield this.env.shell.run('git', ['commit', '-m', 'Initial commit', '--no-gpg-sign'], Object.assign({ showSpinner: false }, shellOptions));
  219. }
  220. if (config.backend === cli_utils_1.BACKEND_LEGACY) {
  221. this.env.log.info(getHelloText());
  222. }
  223. if (manifest) {
  224. yield this.performManifestOps(manifest);
  225. }
  226. }
  227. this.env.log.nl();
  228. yield this.showNextSteps(projectDir, linkConfirmed);
  229. });
  230. }
  231. isGitSetup() {
  232. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  233. const config = yield this.env.config.load();
  234. const cmdInstalled = yield this.env.shell.cmdinfo('git', ['--version']);
  235. if (cmdInstalled) {
  236. return true;
  237. }
  238. if (config.backend === cli_utils_1.BACKEND_LEGACY) {
  239. this.env.log.warn(`Git CLI not found on your PATH. You may wish to install it to version control your app.\n` +
  240. `See installation docs for git: ${chalk_1.default.bold('https://git-scm.com/book/en/v2/Getting-Started-Installing-Git')}\n\n` +
  241. `Use ${chalk_1.default.green('--no-git')} to disable this warning.\n`);
  242. }
  243. return false;
  244. });
  245. }
  246. ensureDirectory(projectName, projectDir) {
  247. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  248. const { isSafeToCreateProjectIn } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/start'));
  249. const { prettyPath } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/utils/format'));
  250. const projectExists = yield fs_1.pathExists(projectName);
  251. if (!projectExists) {
  252. this.env.tasks.next(`Creating directory ${chalk_1.default.green(prettyPath(projectDir))}`);
  253. yield fs_1.fsMkdir(projectDir, 0o777);
  254. }
  255. else if (!(yield isSafeToCreateProjectIn(projectDir))) {
  256. const confirm = yield this.env.prompt({
  257. type: 'confirm',
  258. name: 'confirm',
  259. message: (`The directory ${chalk_1.default.green(projectName)} contains file(s) that could conflict. ` +
  260. 'Would you like to overwrite the directory with this new project?'),
  261. default: false,
  262. });
  263. if (confirm) {
  264. this.env.tasks.next(`Creating directory ${chalk_1.default.green(prettyPath(projectDir))}`);
  265. yield fs_1.removeDirectory(projectDir);
  266. yield fs_1.fsMkdir(projectDir, 0o777);
  267. }
  268. else {
  269. throw new errors_1.FatalException(`Not erasing existing project in ${chalk_1.default.green(prettyPath(projectDir))}.`, 0);
  270. }
  271. }
  272. this.env.tasks.end();
  273. });
  274. }
  275. findStarterTemplate(template, type) {
  276. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  277. const { STARTER_BASE_URL, STARTER_TEMPLATES, getStarterList } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/start'));
  278. const starterTemplate = STARTER_TEMPLATES.find(t => t.type === type && t.name === template);
  279. if (starterTemplate) {
  280. return starterTemplate;
  281. }
  282. this.env.tasks.next('Looking up starter');
  283. const starterList = yield getStarterList(this.env.config);
  284. const starter = starterList.starters.find(t => t.type === type && t.name === template);
  285. if (starter) {
  286. return {
  287. strip: false,
  288. name: starter.name,
  289. type: starter.type,
  290. description: '',
  291. archive: `${STARTER_BASE_URL}/${starter.id}.tar.gz`,
  292. };
  293. }
  294. else {
  295. throw new errors_1.FatalException(`Unable to find starter template for ${chalk_1.default.green(template)}\n` +
  296. `If this is not a typo, please make sure it is a valid starter template within the starters repo: ${chalk_1.default.bold('https://github.com/ionic-team/starters')}`);
  297. }
  298. });
  299. }
  300. validateName(name) {
  301. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  302. const { isValidPackageName } = yield Promise.resolve().then(() => require('@ionic/cli-framework/utils/npm'));
  303. const { isProjectNameValid } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/start'));
  304. if (!isProjectNameValid(name)) {
  305. throw new errors_1.FatalException(`Please name your Ionic project something meaningful other than ${chalk_1.default.green(name)}`);
  306. }
  307. if (!isValidPackageName(name) || name !== path.basename(name)) {
  308. throw new errors_1.FatalException(`${chalk_1.default.green(name)} is not a valid package or directory name.\n` +
  309. `Please choose a different name. Alphanumeric characters are always safe for app names. You can use the ${chalk_1.default.green('--display-name')} option for the human-readable name.`);
  310. }
  311. });
  312. }
  313. loadManifest(manifestPath) {
  314. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  315. const { prettyPath } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/utils/format'));
  316. const { readStarterManifest } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/start'));
  317. try {
  318. return yield readStarterManifest(manifestPath);
  319. }
  320. catch (e) {
  321. this.env.log.debug(`Error with manifest file ${chalk_1.default.bold(prettyPath(manifestPath))}: ${e}`);
  322. }
  323. });
  324. }
  325. performManifestOps(manifest) {
  326. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  327. if (manifest.welcome) {
  328. this.env.log.nl();
  329. this.env.log.msg(`${chalk_1.default.bold('Starter Welcome')}:\n`);
  330. this.env.log.info(manifest.welcome);
  331. }
  332. });
  333. }
  334. personalizeApp(projectDir, name, displayName) {
  335. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  336. const { updatePackageJsonForCli } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/start'));
  337. const project = yield this.env.project.load();
  338. this.env.tasks.next(`Personalizing ${chalk_1.default.bold('ionic.config.json')} and ${chalk_1.default.bold('package.json')}`);
  339. project.name = displayName;
  340. yield updatePackageJsonForCli(projectDir, name);
  341. yield this.env.project.save();
  342. this.env.tasks.end();
  343. });
  344. }
  345. personalizeCordovaApp(projectDir, name, bundleId) {
  346. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  347. const { ConfigXml } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/cordova/config'));
  348. const conf = yield ConfigXml.load(projectDir);
  349. conf.setName(name);
  350. if (bundleId) {
  351. conf.setBundleId(bundleId);
  352. }
  353. yield conf.save();
  354. });
  355. }
  356. downloadStarterTemplate(projectDir, starterTemplate) {
  357. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  358. const { download } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/http'));
  359. const { createTarExtraction } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/utils/archive'));
  360. const task = this.env.tasks.next(`Downloading and extracting ${chalk_1.default.green(starterTemplate.name.toString())} starter`);
  361. const ws = yield createTarExtraction({ cwd: projectDir, strip: starterTemplate.strip ? 1 : 0 });
  362. yield download(this.env.config, starterTemplate.archive, ws, {
  363. progress: (loaded, total) => task.progress(loaded, total),
  364. });
  365. this.env.tasks.end();
  366. });
  367. }
  368. showNextSteps(projectDir, linkConfirmed) {
  369. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  370. const { prettyPath } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/utils/format'));
  371. const config = yield this.env.config.load();
  372. const project = yield this.env.project.load();
  373. let app;
  374. if (project.app_id) {
  375. const { App } = yield Promise.resolve().then(() => require('@ionic/cli-utils/lib/app'));
  376. const token = yield this.env.session.getUserToken();
  377. const appLoader = new App(token, this.env.client);
  378. app = yield appLoader.load(project.app_id);
  379. }
  380. this.env.log.msg(`${chalk_1.default.bold('Next Steps')}:\n`);
  381. this.env.log.msg(`* Go to your newly created project: ${chalk_1.default.green(`cd ${prettyPath(projectDir)}`)}`);
  382. this.env.log.msg(`* Get Ionic DevApp for easy device testing: ${chalk_1.default.bold('https://bit.ly/ionic-dev-app')}`);
  383. if (config.backend === cli_utils_1.BACKEND_PRO && linkConfirmed) {
  384. this.env.log.msg(`* Finish setting up Ionic Pro Error Monitoring: ${chalk_1.default.bold('https://ionicframework.com/docs/pro/monitoring/#getting-started')}\n`);
  385. if (app && app.association) {
  386. this.env.log.msg(`* Make sure you've added your git host as the origin remote: ${chalk_1.default.green('git remote add origin ' + app.association.repository.clone_url)}`);
  387. this.env.log.msg(`* Finally, push your code to perform real-time updates, and more: ${chalk_1.default.green('git push')}`);
  388. }
  389. else {
  390. this.env.log.msg(`* Finally, push your code to Ionic Pro to perform real-time updates, and more: ${chalk_1.default.green('git push ionic master')}`);
  391. }
  392. }
  393. this.env.log.nl();
  394. });
  395. }
  396. };
  397. StartCommand = tslib_1.__decorate([
  398. command_1.CommandMetadata({
  399. name: 'start',
  400. type: 'global',
  401. description: 'Create a new project',
  402. longDescription: `
  403. This command creates a working Ionic app. It installs dependencies for you and sets up your project.
  404. ${chalk_1.default.green('ionic start')} will create a new app from ${chalk_1.default.green('template')}. You can list all templates with the ${chalk_1.default.green('--list')} option. For more information on starter templates, see the CLI documentation${chalk_1.default.cyan('[1]')}.
  405. You can also specify a git repository URL for ${chalk_1.default.green('template')} and your existing project will be cloned.
  406. ${chalk_1.default.cyan('[1]')}: ${chalk_1.default.bold('https://ionicframework.com/docs/cli/starters.html')}
  407. `,
  408. exampleCommands: [
  409. '',
  410. '--list',
  411. 'myApp blank',
  412. 'myApp tabs --cordova',
  413. 'myApp blank --type=ionic1',
  414. 'myConferenceApp https://github.com/ionic-team/ionic-conference-app',
  415. ],
  416. inputs: [
  417. {
  418. name: 'name',
  419. description: 'The name of your project directory',
  420. },
  421. {
  422. name: 'template',
  423. description: `The starter template to use (e.g. ${['blank', 'tabs'].map(t => chalk_1.default.green(t)).join(', ')}; use ${chalk_1.default.green('--list')} to see all)`,
  424. }
  425. ],
  426. options: [
  427. {
  428. name: 'list',
  429. description: 'List starter templates available',
  430. type: Boolean,
  431. aliases: ['l'],
  432. },
  433. {
  434. name: 'type',
  435. description: `Type of project to start (e.g. ${chalk_1.default.green('ionic-angular')}, ${chalk_1.default.green('ionic1')})`,
  436. type: String,
  437. default: 'ionic-angular',
  438. },
  439. {
  440. name: 'display-name',
  441. description: 'Human-readable name (use quotes around the name)',
  442. type: String,
  443. aliases: ['n'],
  444. },
  445. {
  446. name: 'cordova',
  447. description: 'Include Cordova integration',
  448. type: Boolean,
  449. },
  450. {
  451. name: 'deps',
  452. description: 'Do not install npm/yarn dependencies',
  453. type: Boolean,
  454. default: true,
  455. advanced: true,
  456. },
  457. {
  458. name: 'git',
  459. description: 'Do not initialize a git repo',
  460. type: Boolean,
  461. default: true,
  462. advanced: true,
  463. },
  464. {
  465. name: 'link',
  466. description: 'Do not ask to connect the app with the Ionic Dashboard',
  467. type: Boolean,
  468. default: true,
  469. advanced: true,
  470. },
  471. {
  472. name: 'pro-id',
  473. description: 'Specify an app ID from the Ionic Dashboard to link',
  474. },
  475. {
  476. name: 'bundle-id',
  477. description: 'Specify the bundle ID/application ID for your app (reverse-DNS notation)',
  478. advanced: true,
  479. },
  480. ],
  481. })
  482. ], StartCommand);
  483. exports.StartCommand = StartCommand;