Skip to content

Repository files navigation

PluginManager-JS

NPM CI

@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-manager

Quick 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.

About

The PluginManager 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.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages