@carry0987/plugin-manager
v2.0.5
Published
This class provides utility functions for managing file operations, including cleaning directories, copying distribution folders, moving files, clearing unnecessary files, and removing empty directories in a file system.
Readme
PluginManager-JS
@carry0987/plugin-manager helps you prepare front-end assets from installed packages and local directories with declarative rules.
Full documentation is available on GitHub Pages:
Installation
pnpm add @carry0987/plugin-managerQuick Example
import { PluginManager } from '@carry0987/plugin-manager';
PluginManager.emptyDir('public/vendor');
PluginManager.copyPackages('node_modules', 'public/vendor', [
{
name: 'bootstrap',
from: 'dist',
include: ['**/bootstrap.bundle.min.js', '**/bootstrap.min.css'],
},
]);
PluginManager.copyFiles('src/assets', 'public/vendor', {
exclude: ['**/*.map'],
});
PluginManager.clearUnnecessaryFiles('public/vendor', ['**/*.js', '**/*.css']);
PluginManager.clearEmptyDirs('public/vendor');Links
License
This project is licensed under the MIT License. See the LICENSE file for details.
