@capacitor/cli
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -18,9 +18,9 @@ "use strict"; | ||
if (!await fs_1.existsAsync(config.app.webDir)) { | ||
return `Avocado could not find the directory with the web assets in "${config.app.webDir}". | ||
return `Capacitor could not find the directory with the web assets in "${config.app.webDir}". | ||
Please create it, also remember that it must include a index.html. | ||
More info: https://avocadojs.com/docs/webDir`; | ||
More info: https://getcapacitor.com/docs/webDir`; | ||
} | ||
if (!await fs_1.existsAsync(path_1.join(config.app.webDir, 'index.html'))) { | ||
return `The web directory (${config.app.webDir}) must contain a "index.html". | ||
It will be the entry point for the avocado hybrid app.`; | ||
It will be the entry point for the web portion of the Capacitor app.`; | ||
} | ||
@@ -33,4 +33,4 @@ return null; | ||
if (!await fs_1.existsAsync('package.json')) { | ||
return `Avocado needs to run at the root of a NPM package. | ||
Make sure you have a "package.json" in the working directory you run avocado. | ||
return `Capacitor needs to run at the root of a NPM package. | ||
Make sure you have a "package.json" in the working directory you run capacitor. | ||
More info: https://docs.npmjs.com/cli/init`; | ||
@@ -37,0 +37,0 @@ } |
@@ -25,3 +25,3 @@ "use strict"; | ||
webDir: 'public', | ||
avocadoRuntimePod: `pod 'Avocado'`, | ||
avocadoRuntimePod: `pod 'Capacitor'`, | ||
nativeProjectName: 'App', | ||
@@ -46,3 +46,3 @@ assets: { | ||
package: Package, | ||
extConfigName: 'avocado.config.json', | ||
extConfigName: 'capacitor.config.json', | ||
extConfigFilePath: '', | ||
@@ -85,5 +85,5 @@ extConfig: ExtConfig, | ||
// TODO: remove this code | ||
// Once Avocado library is released as a cocoapods package, this code is not needed | ||
const avocadoRuntimePath = path_1.join(this.cli.assetsDir, 'Avocado'); | ||
this.ios.avocadoRuntimePod = `pod 'Avocado', :path => '${avocadoRuntimePath}'`; | ||
// Once Capacitor library is released as a cocoapods package, this code is not needed | ||
const avocadoRuntimePath = path_1.join(this.cli.assetsDir, 'Capacitor'); | ||
this.ios.avocadoRuntimePod = `pod 'Capacitor', :path => '${avocadoRuntimePath}'`; | ||
} | ||
@@ -122,3 +122,3 @@ catch (e) { | ||
try { | ||
// we've got an avocado.json file, let's parse it | ||
// we've got an capacitor.json file, let's parse it | ||
this.app.extConfig = JSON.parse(extConfigStr); | ||
@@ -131,3 +131,3 @@ } | ||
catch (_a) { | ||
// it's ok if there's no avocado.json file | ||
// it's ok if there's no capacitor.json file | ||
} | ||
@@ -205,3 +205,3 @@ } | ||
function platformNotCreatedError(platformName) { | ||
common_1.logFatal(`"${platformName}" platform has not been created. Please use "avocado create ${platformName}" command to first create the platform.`); | ||
common_1.logFatal(`"${platformName}" platform has not been created. Please use "capacitor create ${platformName}" command to first create the platform.`); | ||
} | ||
@@ -208,0 +208,0 @@ function loadPackageJson(dir) { |
@@ -19,3 +19,3 @@ "use strict"; | ||
.command('create [directory] [name] [identifier]') | ||
.description('Creates a new avocado project in the given directory') | ||
.description('Creates a new Capacitor project in the given directory') | ||
.action((directory, name, identifier) => { | ||
@@ -62,3 +62,3 @@ return create_1.createCommand(config, directory, name, identifier); | ||
.command('plugin:generate') | ||
.description('start a new avocado plugin') | ||
.description('start a new Capacitor plugin') | ||
.action(() => { | ||
@@ -69,3 +69,3 @@ return new_plugin_1.newPluginCommand(config); | ||
if (!program.args.length) { | ||
console.log('\n 🥑'); | ||
console.log('\n ⚡️'); | ||
program.help(); | ||
@@ -72,0 +72,0 @@ } |
@@ -31,3 +31,3 @@ "use strict"; | ||
if (exists === null) { | ||
return 'iOS was not created yet. Run `avocado create ios`.'; | ||
return 'iOS was not created yet. Run `capacitor create ios`.'; | ||
} | ||
@@ -49,3 +49,3 @@ return null; | ||
if (!iosManifest.src) { | ||
throw 'avocado.ios.path is missing'; | ||
throw 'capacitor.ios.path is missing'; | ||
} | ||
@@ -52,0 +52,0 @@ const iosPath = path_1.join(plugin.rootPath, iosManifest.src); |
@@ -51,5 +51,5 @@ "use strict"; | ||
if (semver.gt(minVersion, version)) { | ||
return `Avocado CLI requires at least NPM ${minVersion}`; | ||
return `Capacitor CLI requires at least NPM ${minVersion}`; | ||
} | ||
return null; | ||
} |
@@ -13,5 +13,5 @@ "use strict"; | ||
else { | ||
throw new Error('Xcode workspace does not exist. Run "avocado create ios" to bootstrap a native ios project.'); | ||
throw new Error('Xcode workspace does not exist. Run "capacitor create ios" to bootstrap a native ios project.'); | ||
} | ||
} | ||
exports.openIOS = openIOS; |
@@ -42,4 +42,4 @@ "use strict"; | ||
s.homepage = 'https://example.com' | ||
s.authors = { 'Avocado generator' => 'hi@ionicframework.com' } | ||
s.source = { :git => 'https://github.com/ionic-team/avocado.git', :tag => '0.0.1' } | ||
s.authors = { 'Capacitor generator' => 'hi@ionicframework.com' } | ||
s.source = { :git => 'https://github.com/ionic-team/capacitor.git', :tag => '0.0.1' } | ||
s.source_files = '*.{swift,h,m}' | ||
@@ -74,4 +74,4 @@ end`; | ||
# DO NOT MODIFY. | ||
# This Podfile was autogenerated by the Avocado CLI. | ||
# It is used to resolve the native dependencies of Avocado plugins. | ||
# This Podfile was autogenerated by the Capacitor CLI. | ||
# It is used to resolve the native dependencies of Capacitor plugins. | ||
@@ -78,0 +78,0 @@ platform :ios, '${config.ios.minVersion}' |
@@ -16,3 +16,3 @@ "use strict"; | ||
const meta = await common_1.readJSON(packagePath); | ||
if (!meta || !meta.avocado) { | ||
if (!meta || !meta.capacitor) { | ||
return null; | ||
@@ -24,3 +24,3 @@ } | ||
rootPath: rootPath, | ||
manifest: meta.avocado | ||
manifest: meta.capacitor | ||
}; | ||
@@ -66,5 +66,5 @@ } | ||
else { | ||
common_1.logInfo('no avocado plugin was found, that\'s ok, you can add more plugins later'); | ||
common_1.logInfo('no capacitor plugin was found, that\'s ok, you can add more plugins later'); | ||
} | ||
} | ||
exports.printPlugins = printPlugins; |
@@ -10,3 +10,3 @@ "use strict"; | ||
if (platforms.length === 0) { | ||
common_1.logInfo(`There are no platforms to copy yet. Create one with "avocado create".`); | ||
common_1.logInfo(`There are no platforms to copy yet. Create one with "capacitor create".`); | ||
return; | ||
@@ -13,0 +13,0 @@ } |
@@ -15,3 +15,3 @@ "use strict"; | ||
async function newPlugin(config) { | ||
common_1.logInfo('avocado new-plugin is about to create a new avocado plugin.'); | ||
common_1.logInfo('capacitor new-plugin is about to create a new capacitor plugin.'); | ||
config; | ||
@@ -66,3 +66,3 @@ const inquirer = await Promise.resolve().then(() => require('inquirer')); | ||
}); | ||
common_1.logInfo('DONE! avocado plugin was created.'); | ||
common_1.logInfo('DONE! capacitor plugin was created.'); | ||
common_1.logInfo(`Get into the plugin: cd ./${pluginPath}`); | ||
@@ -101,7 +101,7 @@ } | ||
keywords: [ | ||
'avocado', | ||
'capacitor', | ||
'plugin', | ||
'native' | ||
], | ||
avocado: { | ||
capacitor: { | ||
ios: { | ||
@@ -108,0 +108,0 @@ src: 'ios', |
@@ -10,3 +10,3 @@ "use strict"; | ||
if (platforms.length === 0) { | ||
common_1.logInfo(`There are no platforms to open yet. Create one with "avocado add".`); | ||
common_1.logInfo(`There are no platforms to open yet. Create one with "capacitor add".`); | ||
return; | ||
@@ -13,0 +13,0 @@ } |
@@ -9,3 +9,3 @@ "use strict"; | ||
if (platforms.length === 0) { | ||
common_1.logInfo(`There are no platforms to sync yet. Create one with "avocado create".`); | ||
common_1.logInfo(`There are no platforms to sync yet. Create one with "capacitor create".`); | ||
return; | ||
@@ -12,0 +12,0 @@ } |
@@ -9,3 +9,3 @@ "use strict"; | ||
if (platforms.length === 0) { | ||
common_1.logInfo(`There are no platforms to update yet. Create one with "avocado create".`); | ||
common_1.logInfo(`There are no platforms to update yet. Create one with "capacitor create".`); | ||
return; | ||
@@ -12,0 +12,0 @@ } |
{ | ||
"name": "@capacitor/cli", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Capacitor: Cross-platform apps with JavaScript and the web", | ||
@@ -8,3 +8,3 @@ "homepage": "https://ionic-team.github.io/capacitor/", | ||
"bin": { | ||
"avocado": "./bin/capacitor" | ||
"capacitor": "./bin/capacitor" | ||
}, | ||
@@ -11,0 +11,0 @@ "engines": { |
@@ -1,7 +0,7 @@ | ||
# AvocadoJS CLI | ||
# Capacitor CLI | ||
The AvocadoJS command-line interface should be installed locally and executed through `npm` scripts. | ||
The Capacitor command-line interface should be installed locally and executed through `npm` scripts. | ||
``` | ||
npm install @avocadojs/cli --save-dev | ||
npm install @capacitor/cli --save-dev | ||
``` | ||
@@ -12,3 +12,3 @@ | ||
Below is an example of running Avocado commands from a webapp's npm scripts within the local `package.json` file. | ||
Below is an example of running Capacitor commands from a webapp's npm scripts within the local `package.json` file. | ||
@@ -20,8 +20,8 @@ ``` | ||
"build": "tsc && npm run sync", | ||
"create.android": "avocado create android", | ||
"create.ios": "avocado create ios", | ||
"doctor": "avocado doctor" | ||
"open.android": "avocado open android", | ||
"open.ios": "avocado open ios", | ||
"sync": "avocado sync" | ||
"create.android": "capacitor create android", | ||
"create.ios": "capacitor create ios", | ||
"doctor": "capacitor doctor" | ||
"open.android": "capacitor open android", | ||
"open.ios": "capacitor open ios", | ||
"sync": "capacitor sync" | ||
} | ||
@@ -40,3 +40,3 @@ ``` | ||
doctor [platform] checks for common errors | ||
plugin:generate start a new avocado plugin | ||
plugin:generate start a new Capacitor plugin | ||
``` | ||
@@ -54,2 +54,2 @@ | ||
* [MIT](https://github.com/ionic-team/avocado/blob/master/LICENSE) | ||
* [MIT](https://github.com/ionic-team/capacitor/blob/master/LICENSE) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
642719
168
1658