mimosa-requirebuild-textplugin-include
v0.6.2
Published
Example Mimosa module for modifiying the r.js config pre-optimize
Downloads
11
Maintainers
Readme
mimosa-requirebuild-textplugin-include
Say that 3 times fast.
Overview
This is a Mimosa module. It both serves as a module to be used with Mimosa, and also serves as an example for how one would write a module to intercept the r.js configurations before optimization occurs.
The actual function of this module is to find text dependencies and include them in the include
array for a r.js run via the requirejs text plugin.
For more information regarding Mimosa, see http://mimosa.io
Usage
Add 'mimosa-requirebuild-textplugin-include'
to your list of modules. That's all! Mimosa will install the module for you when you start up.
Functionality
The 'mimosa-requirebuild-textplugin-include'
module configuration is a pointer to a directory of files to include, the requirejs text plugin and a list of extensions to include in the r.js include
array appended to the text plugin.
Default Config
requireBuildTextPluginInclude:
folder: ""
pluginPath: "vendor/text"
extensions: ["html"]
folder
: a string, a directory within thewatch.javascriptDir
that narrows down the search for files to include. If left alone,watch.javascriptDir
is used.pluginPath
: a string, the AMD path to your requirejs text pluginextensions
: an array of strings, list of extensions for files to include in the r.js config's 'include' array attached to the text plugin atpluginPath
path listed above. Ex: vendor/text!app/foo.html. All files in the watch.javascriptDir/folder that match this extension will be pushed into the array and already present array entries will be left alone. Extensions should not include the period.