Adds glob support to Brunch. This allows lazy loading/requiring of files using pattern matching. It stores the required filenames within your app.js file using a helper function and therefore cannot be used as a file system browser or such.
Please note that this is a very early alpha of this module and its usage is pretty restrictive. Please read the usage for caveats.
"glob-brunch": "0.0.1" to
package.json in your brunch app.
In your code, use
glob('[string]') and this plugin will automatically generate
a helper function at the top of the module definition. For example:
# @file application.coffee:glob 'views/**/*-view*'consolelog files # Should return an array of matching filenames.filesforEachview = require file
The function will look something like this:
As of the current version, glob-brunch has three config options:
exports.config =...plugins:glob:appDir: 'app'stripExt: truestripAppDir: true
The MIT License (MIT)
Copyright (c) 2015 Matt Fletcher (http://soniflow.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.