Socket
Socket
Sign inDemoInstall

@capacitor/cli

Package Overview
Dependencies
Maintainers
5
Versions
832
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/cli - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

assets/ios-template/App/.DS_Store

4

assets/ios-template/App/App/Assets.xcassets/Splash.imageset/Contents.json

@@ -5,2 +5,3 @@ {

"idiom" : "universal",
"filename" : "splash-2732x2732-2.png",
"scale" : "1x"

@@ -10,2 +11,3 @@ },

"idiom" : "universal",
"filename" : "splash-2732x2732-1.png",
"scale" : "2x"

@@ -15,3 +17,3 @@ },

"idiom" : "universal",
"filename" : "Default@2x~universal~anyany.png",
"filename" : "splash-2732x2732.png",
"scale" : "3x"

@@ -18,0 +20,0 @@ }

@@ -29,4 +29,3 @@ "use strict";

exports.checkWebDir = checkWebDir;
async function checkPackage(config) {
config;
async function checkPackage(_config) {
if (!await fs_1.existsAsync('package.json')) {

@@ -70,2 +69,6 @@ return `Capacitor needs to run at the root of a NPM package.

exports.readXML = readXML;
function log(...args) {
console.log(...args);
}
exports.log = log;
function logSuccess(...args) {

@@ -134,2 +137,3 @@ const chalk = require('chalk');

catch (e) {
spinner.fail(`${title}: ${e.message}`);
spinner.stop();

@@ -136,0 +140,0 @@ throw e;

@@ -25,3 +25,3 @@ "use strict";

webDir: 'public',
avocadoRuntimePod: `pod 'Capacitor'`,
capacitorRuntimePod: `pod 'Capacitor'`,
nativeProjectName: 'App',

@@ -85,4 +85,4 @@ assets: {

// 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}'`;
const capacitorRuntimePath = path_1.join(this.cli.assetsDir, 'Capacitor');
this.ios.capacitorRuntimePod = `pod 'Capacitor', :path => '${capacitorRuntimePath}'`;
}

@@ -116,2 +116,9 @@ catch (e) {

}
mergeConfigData() {
const extConfig = this.app.extConfig || {};
Object.assign(this.app, extConfig);
if (!path_1.isAbsolute(this.app.webDir)) {
this.app.webDir = path_1.join(this.app.rootDir, this.app.webDir);
}
}
loadExternalConfig() {

@@ -133,9 +140,2 @@ this.app.extConfigFilePath = path_1.join(this.app.rootDir, this.app.extConfigName);

}
mergeConfigData() {
const extConfig = this.app.extConfig || {};
Object.assign(this.app, extConfig);
if (!path_1.isAbsolute(this.app.webDir)) {
this.app.webDir = path_1.join(this.app.rootDir, this.app.webDir);
}
}
foundExternalConfig() {

@@ -142,0 +142,0 @@ return !!this.app.extConfig;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const program = require("commander");
const init_1 = require("./tasks/init");
const copy_1 = require("./tasks/copy");

@@ -18,2 +19,8 @@ const create_1 = require("./tasks/create");

program
.command('init')
.description('Initializes a new Capacitor project in the current directory')
.action(() => {
return init_1.initCommand(config);
});
program
.command('create [directory] [name] [identifier]')

@@ -20,0 +27,0 @@ .description('Creates a new Capacitor project in the given directory')

@@ -15,3 +15,3 @@ "use strict";

});
plugin_1.printPlugins(plugins);
// printPlugins(plugins);
/*

@@ -80,4 +80,4 @@ await autoGeneratePods(plugins);

target 'AvocadoApp' do
${config.ios.avocadoRuntimePod}
target 'CapacitorApp' do
${config.ios.capacitorRuntimePod}
${pods.join('\n')}

@@ -84,0 +84,0 @@ end`;

@@ -6,4 +6,2 @@ "use strict";

const common_1 = require("../common");
const sync_1 = require("./sync");
const open_1 = require("./open");
async function addCommand(config, selectedPlatformName) {

@@ -19,7 +17,6 @@ const platformName = await config.askPlatform(selectedPlatformName, `Please choose a platform to add:`);

await common_1.add(config, [common_1.checkPackage, ...addChecks(config, platformName)]);
await generateAvocadoConfig(config);
await common_1.add(config, [common_1.checkWebDir]);
await generateCapacitorConfig(config);
await common_1.add(config, []); // , [checkWebDir]);
await doAdd(config, platformName);
await sync_1.sync(config, platformName);
await open_1.open(config, platformName);
// await sync(config, platformName);
}

@@ -31,7 +28,6 @@ catch (e) {

exports.addCommand = addCommand;
async function generateAvocadoConfig(config) {
async function generateCapacitorConfig(config) {
if (config.foundExternalConfig()) {
return;
}
common_1.logInfo(`Remember you can change the web directory anytime by modifing ${config.app.extConfigName}`);
const inquirer = await Promise.resolve().then(() => require('inquirer'));

@@ -41,4 +37,4 @@ const answers = await inquirer.prompt([{

name: 'webDir',
message: 'web directory:',
default: 'www'
message: 'What directory are your web assets in? (index.html, built JavaScript, etc.):',
default: 'public'
}]);

@@ -51,5 +47,6 @@ const webDir = answers.webDir;

});
common_1.logInfo(`💡 You can change the web directory anytime by modifing ${config.app.extConfigName}`);
config.app.webDir = webDir;
}
exports.generateAvocadoConfig = generateAvocadoConfig;
exports.generateCapacitorConfig = generateCapacitorConfig;
function addChecks(config, platformName) {

@@ -56,0 +53,0 @@ if (platformName === config.ios.name) {

@@ -37,2 +37,3 @@ "use strict";

async function copyWebDir(config, nativeAbsDir) {
var chalk = require('chalk');
const webAbsDir = config.app.webDir;

@@ -48,7 +49,7 @@ const webRelDir = path_1.relative(config.app.rootDir, webAbsDir);

else {
await common_1.runTask(`Copying ${webRelDir} -> ${nativeRelDir}`, async () => {
await common_1.runTask(`Copying web assets from ${chalk.bold(webRelDir)} to ${chalk.bold(nativeRelDir)}`, async () => {
await fs_extra_1.remove(nativeAbsDir);
await fs_extra_1.copy(webAbsDir, nativeAbsDir);
return await fs_extra_1.copy(webAbsDir, nativeAbsDir);
});
}
}

@@ -18,3 +18,3 @@ "use strict";

/*
await generateAvocadoConfig(config);
await generateCapacitorConfig(config);
await add(config, [checkWebDir]);

@@ -32,8 +32,8 @@ await create(config, platformName);

async function createApp(config, directory, name, identifier) {
await fs_1.mkdir(directory);
await fs_1.mkdirAsync(directory);
const templateDir = config.app.assets.templateDir;
await common_1.runTask(chalk `Creating app {bold ${name}} in {bold ${directory}} with id {bold ${identifier}}`, () => {
return fs_1.cp(templateDir, directory);
return fs_1.cpAsync(templateDir, directory);
});
}
exports.createApp = createApp;

@@ -89,3 +89,3 @@ "use strict";

dependencies: {
'@avocadojs/core': 'latest'
'@capacitor/core': 'latest'
},

@@ -92,0 +92,0 @@ devDependencies: {

@@ -9,4 +9,4 @@ "use strict";

};
exports.mkdir = util.promisify(fs.mkdir);
exports.cp = util.promisify(fsExtra.copy);
exports.mkdirAsync = util.promisify(fs.mkdir);
exports.cpAsync = util.promisify(fsExtra.copy);
exports.symlinkAsync = util.promisify(fs.symlink);

@@ -13,0 +13,0 @@ exports.readFileAsync = util.promisify(fs.readFile);

{
"name": "@capacitor/cli",
"version": "0.0.9",
"version": "0.0.10",
"description": "Capacitor: Cross-platform apps with JavaScript and the web",

@@ -46,2 +46,3 @@ "homepage": "https://ionic-team.github.io/capacitor/",

"dependencies": {
"@types/tar": "^4.0.0",
"chalk": "^2.3.0",

@@ -55,2 +56,5 @@ "commander": "^2.12.2",

"semver": "^5.4.1",
"superagent": "^3.8.2",
"superagent-proxy": "^1.0.2",
"tar": "^4.2.0",
"which": "^1.3.0",

@@ -57,0 +61,0 @@ "xml2js": "^0.4.19"

@@ -41,12 +41,4 @@ # Capacitor CLI

## Related Projects
* [AvocadoJS CLI](https://www.npmjs.com/package/@avocadojs/cli) - AvocadoJS Command-line interface
* [Ionic](https://www.npmjs.com/package/@ionic/core) - UI Library
* [StencilJS](https://www.npmjs.com/package/@stencil/core) - Web Component Generator
### License
* [MIT](https://github.com/ionic-team/capacitor/blob/master/LICENSE)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc