webpack-directory-scan

1.2.0 • Public • Published

What is this?

This package will take a directory (you give it) and scan recursively. The result is the entires directory structure under given one.

Example: if your project folder consists of this

projet root
    |app
        |component
            |action
            |reducer
    |css
    |image

webpack-directory-scan will get you something like below

let directorMapped = dirScan.get('./')
 
console.log(directorMapped)
 
//output [
            'app',
            'app/component',
            'app/component/action',
            'app/component/reducer',
            'css',
            'image'
        ]

Installation

npm i --save-dev webpack-directory-scan

Usage

import dirScan from 'webpack-directory-scan'
 
dirScan.get('./')
 

./ is to get all folders and sub folders of folders in root directory. By default this package will ignore node_modules folder and .git folder

Test

npm test

/webpack-directory-scan/

    Package Sidebar

    Install

    npm i webpack-directory-scan

    Weekly Downloads

    9

    Version

    1.2.0

    License

    ISC

    Last publish

    Collaborators

    • craigcosmo