Last active
December 10, 2015 20:28
-
-
Save jkresner/4488353 to your computer and use it in GitHub Desktop.
Brunch.io release config strategy : http://hackerpreneur.net/post/40039506659/brunch-io-release-config-build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.config = | |
files: | |
javascripts: | |
joinTo: | |
'javascripts/app.js': /^app/ | |
'javascripts/vendor.js': /^vendor/ | |
'test/javascripts/test.js': /^test[\\/](?!vendor)/ | |
'test/javascripts/test-vendor.js': /^test[\\/](?=vendor)/ | |
order: | |
before: [ | |
'vendor/scripts/console-helper.js', | |
'vendor/scripts/jquery-1.8.2.js', | |
'vendor/scripts/underscore-1.4.2.js', | |
'vendor/scripts/backbone-0.9.2.js' | |
] | |
after: [ | |
'test/vendor/scripts/test-helper.js' | |
] | |
stylesheets: | |
joinTo: | |
'stylesheets/app.css': /^(app|vendor)/ | |
'test/stylesheets/test.css': /^test/ | |
order: | |
before: ['vendor/styles/normalize-2.0.1.css'] | |
after: ['vendor/styles/helpers.css'] | |
templates: | |
joinTo: 'javascripts/app.js' | |
# See http://brunch.readthedocs.org/en/latest/config.html for documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{config} = require './config' | |
config.files.javascripts.joinTo = | |
# (1) Exclude the stubs files in release build using (?!stubs)/ at end of regex | |
'javascripts/app.js': /^app(\/|\\)(?!stubs)/ | |
'javascripts/vendor.js': /^vendor/ | |
# (2) Removed generated test files from the release build | |
# 'test/javascripts/test.js': /^test(\/|\\)(?!vendor)/ | |
# 'test/javascripts/test-vendor.js': /^test(\/|\\)(?=vendor)/ | |
exports.config = config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment