Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-file-contents-to-json

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-file-contents-to-json

Read in some files, output a JSON representation of their contents.

  • 0.2.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

broccoli-file-contents-to-json

Read in some files, output a JSON representation of their contents.

Check out the gulp equivalent here.

Installation

$ npm install broccoli-file-contents-to-json

How it works

Given a nested directory of files like so,

my-files
├── bar.txt
├── foo.txt
└── my-folder
    └── baz.txt

broccoli-file-contents-to-json reads in each file, and outputs a single JSON file, say output.json, representing the contents of each file within the folder. Here's an example output:

{
  "bar.txt": "Content of bar.",
  "foo.txt": "Contents of foo.",
  "my-folder/baz.txt": "Contents of baz."
}

Now, you can use output.json however you'd like.

How to Use

See the Brocfile packaged in this project for example usage.

rm -rf dist && broccoli build dist

Author

![twitter/brianmgonzalez](http://gravatar.com/avatar/f6363fe1d9aadb1c3f07ba7867f0e854?s=70](http://twitter.com/brianmgonzalez "Follow @brianmgonzalez on Twitter")
Brian Gonzalez

License

MIT

Keywords

FAQs

Package last updated on 13 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc