npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-clean

v1.4.2

Published

Helps maintain a synchronized cordova repository.

Downloads

137

Readme

cordova-clean npm version

This tries to fix the issue of inconsistent cordova plugins/platforms of a project when working in different branches. It can remove all installed plugins/platforms and install all plugins/platforms listed in the package.json file. This avoids the case of having left over plugins/platforms from other branches installed, and if a plugin has been updated without updating the version number.

How To Install

Install through npm:

npm install cordova-clean

This package depends on any version of cordova being installed.

How To Use

Run the shell command: cordova-clean <COMMAND> <OPTIONS>

Commands

| Command | Explanation | |---|---| | clean | Atomic approach that will remove all installed plugins and platforms, and add all plugins and platforms specified in package.json. | | plugins | Removes all installed plugins and installs plugins specified in package.json. | | platforms | Removes all platforms and installs platforms specified in package.json. | | sync | This will do the same functionality as clean, but instead of removing/adding everything it will do a smart compare to see which plugins should be added/removed. Note that -noforce is not used here, since we do not want to remove any plugins that are dependencies. By default this will compare platform/plugin versions, but if you only want to check names add the -soft option to this command. | | version, v, -v, -version | Output package version. |

Options

| Option | Short Form | Command Valid In | Explanation | |---|---|---|---| | -noremove | -nr | clean, plugins, platforms, sync | Prevents the removal of plugins/platforms. Use this if you only want to install the package.json plugins/platforms on top of the installed ones. | | -noforce | -nf | clean, plugins | Prevents force uninstall plugins. By default all plugins are removed using the -force flag, this way all plugins will be removed even if they are dependencies to other plugins. | | -gitfetch | -gf | clean, plugins, sync | Prevents -nofetch from being used when installing git repository plugins. This is mostly an issue with cordova versions below 8, it will fail installing plugins from git repositories because it attempts to add them as an npm package instead of using git. By default nofetch is used to prevent this issue from happening. | | -noadd | -na | clean, plugins, platforms, sync | Prevents adding plugins/platforms. Use this if you only want to remove installed plugins/platforms, without adding from the package.json. | | -noios | -ni | clean, platforms, sync | Prevents iOS from being installed / removed on platform steps. | | -noandroid | -nand | clean, platforms, sync | Prevents Android from being installed / removed on platform steps. | | -soft | -s | sync | Makes plugin / platform checks only based off of name (no version check). | | -addlinks | -al | sync | This forces plugins / platforms added from git or local to be re-added during sync. |

You can set these options to true or false by following the option with = and the value: -noios=true -noandroid=false. This can be used to override options that are defined in the cordova-clean.json configuration file.

All options can be added with single or double dashes '-'.

Quirks

Version checking with the sync command works by checking the version listed in cordova [platform|plugin] ls against the version in the package.json file. Plugins and platforms added through local or github repositories will always be skipped by default if the plugin / platform is present (they will be assumed to be up to date). This is because we cannot reliably compare the installed version number to the repository link. If you would like to change the behaviour to re-add these plugins instead of skipping in this situation, add the -addlinks option when performing the sync command.

Clean Config File

You can put cordova-clean.json at the root of your project to set options automatically. All values can be set to either true or false. If any other value is used, it will default to false. These options will apply to every command that is executed. If you do not wish for one of these options to apply, use the command line argument to set the variable (ie -noandroid=true), since command line options override those in the cordova-clean.json file.

| Option | | ----------- | | noForce | | noRemove | | fetch | | noAdd | | soft | | noiOS | | noAndroid | | addLinks |

Example:

{
    "noForce": true,
    "noiOS": true,
    "noAndroid": false
}

Questions?

Feel free to open an issue if you are having issues or would like to contribute!

MIT License

Please see the LICENSE.md file for more information on licensing.