-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* declare and reuse RegExp instances * add /tests to copyOnly * trees: configure ignore option for * hidden files (.*) * homedir files * html-report (Intern reporting info) * node_modules
- Loading branch information
Showing
1 changed file
with
40 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,47 @@ | ||
var miniExcludes = { | ||
// jshint unused: false | ||
var profile = (function () { | ||
var miniExcludes = { | ||
'dstore/README.md': 1, | ||
'dstore/package': 1 | ||
}, | ||
isTestRe = /\/test\//; | ||
}; | ||
var amdRegex = /\.js$/; | ||
var isRqlRegex = /RqlQuery\.js/; | ||
var isTestRegex = /\/tests\//; | ||
var miniExcludeRegex = /\/(?:tests|demos|docs)\//; | ||
var packages = {}; | ||
|
||
var packages = {}; | ||
try { | ||
// retrieve the set of packages for determining which modules to include | ||
require(['util/build/buildControl'], function (buildControl) { | ||
packages = buildControl.packages; | ||
}); | ||
} catch (error) { | ||
console.error('Unable to retrieve packages for determining optional package support in dstore'); | ||
} | ||
var profile = { | ||
resourceTags: { | ||
test: function (filename, mid) { | ||
return isTestRe.test(filename); | ||
}, | ||
try { | ||
// retrieve the set of packages for determining which modules to include | ||
require([ 'util/build/buildControl' ], function (buildControl) { | ||
packages = buildControl.packages; | ||
}); | ||
} | ||
catch (error) { | ||
console.error('Unable to retrieve packages for determining optional package support in dstore'); | ||
} | ||
|
||
miniExclude: function (filename, mid) { | ||
return /\/(?:tests|demos|docs)\//.test(filename) || mid in miniExcludes; | ||
}, | ||
return { | ||
resourceTags: { | ||
test: function (filename) { | ||
return isTestRegex.test(filename); | ||
}, | ||
|
||
amd: function (filename, mid) { | ||
return /\.js$/.test(filename); | ||
miniExclude: function (filename, mid) { | ||
return miniExcludeRegex.test(filename) || mid in miniExcludes; | ||
}, | ||
|
||
amd: function (filename) { | ||
return amdRegex.test(filename); | ||
}, | ||
|
||
copyOnly: function (filename) { | ||
// conditionally omit modules dependent on rql packages | ||
return isTestRegex.test(filename) || (!packages.rql && isRqlRegex.test(filename)); | ||
} | ||
}, | ||
|
||
copyOnly: function (filename, mid) { | ||
// conditionally omit modules dependent on rql packages | ||
return (!packages['rql'] && /RqlQuery\.js/.test(filename)); | ||
} | ||
} | ||
}; | ||
trees: [ | ||
[ '.', '.', /(?:\/\.)|(?:~$)|(?:(?:html-report|node_modules)\/)/ ] | ||
] | ||
}; | ||
})(); |