Skip to content

buschtoens/broccoli-flatiron

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Broccoli Flatiron

⚠️ Package is Deprecated ⚠️

This package is deprecated. Use broccoli-merge-files instead.

const BroccoliMergeFiles = require('broccoli-merge-files');
const flatiron = require('broccoli-merge-files/flatiron');

new BroccoliMergeFiles([inputNode], {
  merge: files =>
    flatiron(files, {
      // trimExtensions: false,
      // prefix: 'export default ',
      // suffix: ';'
    }),
  outputFileName: 'files.js'
});

Usage

Create a payload file based upon directory structure.

var flatiron = require("broccoli-flatiron");

var options = {
    outputFile: 'path/to/output/file'
};

var tree = flatiron(targetDirectory, options);

Documentation

Available options

  • outputFile - path of the generated file
  • trimExtensions - trim file extensions object keys or not
  • prefix - use custom prefix, default: export default
  • suffix - use custom suffix, default: ;
  • persistentOutput: boolean flag passed to broccoli-plugin.
  • needCache: boolean flag passed to broccoli-plugin.

ZOMG!!! TESTS?!?!!?

Yeah, I know.

npm install
npm test

License

This project is distributed under the MIT license.

About

Flatten directory structures to a single ES6 JSON module

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%