Skip to main content

path:ensure

The path:ensure action ensures that a path exists. If the path does not exist, it will be created.

Usage

{
type: 'path:ensure',
target: 'path/to/directory'
}

Properties

NameDescriptionDefaultRequired
targetRelative path to the directoryYes

target

The relative path to the directory that needs to be ensured.

Example

import { Scaffold } from '@panda/scaffold'

new Scaffold({
name: 'foo:create',
actions: [
{
type: 'path:ensure',
target: 'path/to/directory'
}
]
})