raw-brunch
A Brunch plugins for raw modules
This plugin is needed for requiring raw data in your JavaScript files, like Markdown or just plain text files.
Install
npm install --save-dev raw-brunch
Usage
raw-brunch
handles files with raw
, plain
and example
extensions as templates:
moduleexports = files: // ... templates: joinTo: 'templates.js'
Content of these files will be bundled as plain strings into templates.js
file, so you can require them in your files.
Options
raw-brunch
has two simple options:
pattern
— a pattern that matches files (raw
,plain
,example
files as default).wrapper
— a function that wraps the content of a file.
moduleexports = // ... plugins: raw: pattern: /\.$/ `module.exports = `
License
MIT © Denys Dovhan