broccoli-embed-script
v0.0.1
Published
Embed scripts into HTML files verbatim
Downloads
3
Readme
broccoli-script-embed
Embeds a script file directly into HTML. Generally the project can be used to replace any token in any files with the contents of another file.
Usage
var embedScript = require('broccoli-embed-script')
var embeddedFiles = embedScript('app'), {
fileToEmbed: 'main.js'
, inputFiles: ['**/*.html']
, token: '{{{script}}}'
})
module.exports = embeddedFiles
Options
fileToEmbed
— a name of a file which should be embedded. Should be contained withing the input treeinputFiles
— a glob of files in whichtoken
should be replaced by the scripttoken
— a token that will be replaced by the contents offileToEmbed
Tests
:warning: No tests! Contributions welcome.
License
The project is distributed under the MIT license.