Skip to content

Ridermansb/files.macro

Repository files navigation

files.macro

Travis (.org) branch npm Babel Macro Greenkeeper badge FOSSA Status

Get array with file names in build time

Usage

Just call function passing directory parameter:

import files from "files.macro";

const allImages = files("./assets/images");

// Will transpiled to

//    ↓ ↓ ↓ ↓ ↓ ↓

const allImages = [ 'avatar.png', 'catalog.png' ] 

License

MIT

FOSSA Status

About

Read files name from folder at build time and use as regular array of strings

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors