Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

dacodekid/node-folder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-folder

A simple extension of mkdirp with brace-expansion to create multi-level & recursive folders.

Current Version

0.5.1

Version >0.4.0 - Note

node-folder will return (native) Promise. Please make sure your node version supports ES6.

Install

npm install --save node-folder

Usage

From Node Script

var folder = require('node-folder');

folder('{dir1/{sub1,sub2,sub3/child{1..5}},dir2}');

or

var folder = require('node-folder');

folder('{dir1/{sub1,sub2,sub3/child{1..5}},dir2}')
  .then(function(success) {
    // your success story
  })
  .catch(function(err) {
    // your not so success story
  })

From gulp (4.0) Script

var folder = require('node-folder');

function scaffold() {
  // Make sure you return the Promise or otherwise you'll get a warning
  // The following tasks did not complete: scaffold
  // Did you forget to signal async completion?
   return (folder('{dir1/{sub1,sub2,sub3/child{1..5}},dir2}'));
}

For more examples, please refer test file.

From CLI

:/> node-folder {dir1/{sub1,sub2,sub3/child{1..5}},dir2}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published