-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* declare and re-use RegExp instances * add /demos and /test to copyOnly * trees: configure ignore option for * html-report (Intern reporting info) * node_modules * nib/nodes (folders created by npm when Stylus and nib are installed)
- Loading branch information
Showing
1 changed file
with
40 additions
and
29 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,34 +1,45 @@ | ||
var copyOnlyMids = { | ||
'dgrid/Gruntfile': 1, | ||
'dgrid/package': 1 | ||
}; | ||
var miniExcludeMids = { | ||
'dgrid/CHANGES.md': 1, | ||
'dgrid/LICENSE': 1, | ||
'dgrid/README.md': 1, | ||
'dgrid/Gruntfile': 1, | ||
'dgrid/package': 1 | ||
}; | ||
|
||
// jshint unused: false | ||
var profile = { | ||
resourceTags: { | ||
copyOnly: function (filename, mid) { | ||
return mid in copyOnlyMids; | ||
}, | ||
var profile = (function () { | ||
var copyOnlyMids = { | ||
'dgrid/Gruntfile': 1, | ||
'dgrid/package': 1 | ||
}; | ||
var miniExcludeMids = { | ||
'dgrid/CHANGES.md': 1, | ||
'dgrid/LICENSE': 1, | ||
'dgrid/README.md': 1, | ||
'dgrid/Gruntfile': 1, | ||
'dgrid/package': 1 | ||
}; | ||
var amdRegex = /\.js$/; | ||
var isDemoRegex = /\/demos\//; | ||
var isStylusRegex = /\.styl$/; | ||
var isTestRegex = /\/test\//; | ||
|
||
test: function (filename) { | ||
return /\/test\//.test(filename); | ||
}, | ||
return { | ||
resourceTags: { | ||
copyOnly: function (filename, mid) { | ||
return (mid in copyOnlyMids) || isDemoRegex.test(filename) || isTestRegex.test(filename); | ||
}, | ||
|
||
test: function (filename) { | ||
return isTestRegex.test(filename); | ||
}, | ||
|
||
miniExclude: function (filename, mid) { | ||
return isDemoRegex.test(filename) || | ||
isStylusRegex.test(filename) || | ||
isTestRegex.test(filename) || | ||
mid in miniExcludeMids; | ||
}, | ||
|
||
miniExclude: function (filename, mid) { | ||
return (/\/(?:test|demos)\//).test(filename) || | ||
(/\.styl$/).test(filename) || | ||
mid in miniExcludeMids; | ||
amd: function (filename) { | ||
return amdRegex.test(filename); | ||
} | ||
}, | ||
|
||
amd: function (filename) { | ||
return (/\.js$/).test(filename); | ||
} | ||
} | ||
}; | ||
trees: [ | ||
[ '.', '.', /(?:\/\.)|(?:~$)|(?:(?:html-report|node_modules|nib|nodes)\/)/ ] | ||
] | ||
}; | ||
})(); |