[go: up one dir, main page]

get-files-in

1.2.0 • Public • Published

Get files in

A Node.js script that synchronously returns a list of file paths of specified types from a directory or directories.

Install

npm install -D get-files-in

Usage

getFilesIn(folderPath, matchFiletypes = [], checkSubDirectories = false)
require()
getFilesIn(path.resolve(__dirname, source.styles), [
    "scss",
    "sass",
    "less",
]
// [
//  '/Users/hotstuff/project/src/styles/main.scss',
//  '/Users/hotstuff/project/src/styles/hello.sass',
// ]
require()
getFilesIn(path.resolve(__dirname, source.styles), [
    "scss",
    "sass",
    "less",
], true
// [
//  '/Users/hotstuff/project/src/styles/main.scss',
//  '/Users/hotstuff/project/src/styles/hello.sass',
//  '/Users/hotstuff/project/src/styles/subfolders-allowed/index.sass',
// ]

Readme

Keywords

none

Package Sidebar

Install

npm i get-files-in

Weekly Downloads

1

Version

1.2.0

License

ISC

Unpacked Size

2.8 kB

Total Files

3

Last publish

Collaborators

  • ben-rogerson