files.macro

0.2.1 • Public • Published

files.macro

Travis (.org) branch npm Babel Macro Greenkeeper badge

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

Package Sidebar

Install

npm i files.macro

Weekly Downloads

63

Version

0.2.1

License

MIT

Unpacked Size

13.7 kB

Total Files

8

Last publish

Collaborators

  • ridermansb