Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
exclude settings_package files (bug 1037182)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngokevin committed Jul 10, 2014
1 parent 1b6bfe4 commit 18f0618
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ var blacklist = [
'settings_inferno.js',
'settings_local.js',
'settings_travis.js',
'settings_package_prod.js',
'settings_package_stage.js',
'settings_package_dev.js',
'tests.js',

'splash.styl.css',
Expand All @@ -22,6 +19,10 @@ var blacklist = [
'splash.css'
];

var re_blacklist = [
/^settings_package_/
];

function concatJS(src_dir, callback) {
var output = '';
// Render the HTML for the templates.
Expand All @@ -33,10 +34,15 @@ function concatJS(src_dir, callback) {
path.resolve(src_dir, 'media', 'js'),
'.js',
function(file) {
// Don't include blacklisted files.
if (blacklist.indexOf(path.basename(file)) !== -1) {
// Don't include blacklisted files.
return;
}
for (var i = 0; i < re_blacklist.length; i++) {
if (path.basename(file).match(re_blacklist[i])) {
return;
}
}

// Automatically name anonymous modules.
var module_name = path.basename(file).replace('.js', '');
Expand Down

0 comments on commit 18f0618

Please sign in to comment.