1.0.8 • Published 6 years ago

inject-brunch v1.0.8

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

Brunch Inject

Brunch inject is a small plugin for injecting file contents into JS files as strings and parse them if needed.

Installation

Install using npm
npm install inject-brunch

Brunch config

Add plugin to brunch config

module.exports.plugins = {
    inject: {
        // customize the inject function name
        fn: 'inject',
        parse: function(data, filename, extension) {
            // here you can customize the data parser
            // can be omitted
            return yourparser(data);
        }
    }
}

Usage

Using the default config you will have something like this

// injected data will be wrapped in single quotes
const data = inject('file',);
1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago