assets_cleaner

Last updated:

0 purchases

assets_cleaner Image
assets_cleaner Images
Add to Cart

Description:

assets cleaner

Assets Cleaner #

A command-line tool wich helps you to clean your assets folder. It will remove all files that are not used in your project. You can choose to remove all files or just to see which files are not being used.
This tool support for any assets extensions from your [assets] folder. It will automatically detect the asset location from pubspec.yaml.
In the new version, we add a new feature to scan unused library in your project. You can use the command scanlib to scan and remove all unused dependencies from your project.
📖 Guide #
1. Installation #
Pub Global
Works with macOS, Linux and Windows.
$ dart pub global activate assets_cleaner
copied to clipboard
2. Setup the config file (Optional for scanlib command) #
Run the initialization command to create the config file. This command will create a file named assets_cleaner.yaml in your project root directory.
$ assets_cleaner init
copied to clipboard
After that, you can edit the config file to exclude some files or extensions that you don't want to be scanned.
An example is shown below.
config:
# If you want to exclude specific
# extension
exclude-extension:
# - jpg # Uncomment this if you want to use
# - png # Uncomment this if you want to use

# If you want to exclude specific
# file from assets
exclude-file:
# - /assets/images/banner_upgrade.png # Uncomment this if you want to use
# - /assets/images/logo.png # Uncomment this if you want to use
copied to clipboard
🚀 Usage #
After setting up the configuration, you can run the package by running the following command:
1. Scanning all unused assets from your project

$ assets_cleaner unused
copied to clipboard
2. Scanning all unused assets from your project and remove it

$ assets_cleaner clean
copied to clipboard
3. Scanning all unused assets and move into trash folder

$ assets_cleaner trash
copied to clipboard
4. Scan and remove all unused dependencies from your project

$ assets_cleaner scanlib
copied to clipboard
You can also use fast command without type any prompt
$ assets_cleaner scanlib -f
or
$ assets_cleaner scanlib --fast
copied to clipboard
⚠️ Supporting Issue #
These tools may not work properly if you use an asset generator like flutter_gen or similar. Because our tools will still detect that your Assets are used, even if these variables are not used in the code
⭐ Contributing #
If you wish to contribute a change to any of the existing plugins in this repo, please fork the repo and submit a pull request. If you have any questions, please open an issue.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.