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',
// ]

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.0
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.0
    5
  • 1.1.0
    1
  • 1.0.0
    1

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