Webpack plugin to copy, archive (.zip), move, delete files and directories before and after builds
—
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Pending
The risk profile of this skill
Create directory paths with full recursive support, automatically creating parent directories as needed.
Main mkdir action function that processes directory creation tasks.
/**
* Execute mkdir tasks with the provided options
* @param tasks Array of mkdir tasks to execute
* @param taskOptions Task execution options including logger and error handling
*/
function mkdirAction(tasks: MkdirTask[], taskOptions: TaskOptions): Promise<void>;
export default mkdirAction;Simple string-based configuration for directory creation operations.
/**
* Configuration for directory creation operations
* Simple string path to directory to create
*/
type MkdirAction = string;Internal task structure used by the plugin during mkdir execution.
/**
* Internal task structure for mkdir operations
*/
interface MkdirTask {
source: string;
absoluteSource: string;
}Usage Examples:
// Single directory creation
{
mkdir: ['./dist']
}
// Multiple directory creation
{
mkdir: [
'./dist',
'./dist/assets',
'./dist/css',
'./dist/js'
]
}
// Nested directory creation (recursive)
{
mkdir: [
'./dist/assets/images/thumbnails',
'./dist/data/cache',
'./temp/logs/debug'
]
}
// Absolute path directory creation
{
mkdir: [
'/tmp/webpack-build',
'/var/log/myapp'
]
}All directory creation operations are recursive by default:
Mkdir operations handle various error conditions:
throwOnError setting{
events: {
onStart: {
mkdir: [
'./dist',
'./dist/assets',
'./dist/css',
'./dist/js'
]
}
}
}{
events: {
onStart: {
mkdir: [
'./cache',
'./cache/webpack',
'./temp/build'
]
}
}
}{
events: {
onStart: {
mkdir: [
'./logs',
'./logs/build',
'./logs/errors'
]
}
}
}