npm.io
0.0.6 • Published 7 years ago

fileable-component-clear

Licence
MIT
Version
0.0.6
Deps
3
Size
11 kB
Vulns
2
Weekly
0

fileable logo

Fileable Component: Clear

Fileable template component used to delete files and folders

Wrapping components within a Clear component removes all files from a given folder context before writing.

import {Clear} from 'fileable-components';
const template = ()=><Clear><File name='empty_file' /></Clear>;

Attributes

target

Target specific files via glob pattern.

import {Clear} from 'fileable-components';
const template = ()=><Clear target='**/*.md'><File name='readme.md' /></Clear>;

Patterns can be negated using "!".

import {Clear} from 'fileable-components';
const template = ()=><Clear target='!**/*.js'><File name='readme.md' /></Clear>;

API

Table of contents

Todo

  • remove unnecessary dependencies
  • add proper typescript typeings