Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
db26c9f4
Commit
db26c9f4
authored
May 18, 2014
by
Chris Rebert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gruntfile: extract runSubset() func
parent
df9f5765
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Gruntfile.js
Gruntfile.js
+7
-3
No files found.
Gruntfile.js
View file @
db26c9f4
...
@@ -401,20 +401,24 @@ module.exports = function (grunt) {
...
@@ -401,20 +401,24 @@ module.exports = function (grunt) {
// Docs HTML validation task
// Docs HTML validation task
grunt
.
registerTask
(
'
validate-html
'
,
[
'
jekyll
'
,
'
validation
'
]);
grunt
.
registerTask
(
'
validate-html
'
,
[
'
jekyll
'
,
'
validation
'
]);
var
runSubset
=
function
(
subset
)
{
return
!
process
.
env
.
TWBS_TEST
||
process
.
env
.
TWBS_TEST
===
subset
;
};
// Test task.
// Test task.
var
testSubtasks
=
[];
var
testSubtasks
=
[];
// Skip core tests if running a different subset of the test suite
// Skip core tests if running a different subset of the test suite
if
(
!
process
.
env
.
TWBS_TEST
||
process
.
env
.
TWBS_TEST
===
'
core
'
)
{
if
(
runSubset
(
'
core
'
)
)
{
testSubtasks
=
testSubtasks
.
concat
([
'
dist-css
'
,
'
csslint
'
,
'
jshint
'
,
'
jscs
'
,
'
qunit
'
,
'
build-customizer-html
'
]);
testSubtasks
=
testSubtasks
.
concat
([
'
dist-css
'
,
'
csslint
'
,
'
jshint
'
,
'
jscs
'
,
'
qunit
'
,
'
build-customizer-html
'
]);
}
}
// Skip HTML validation if running a different subset of the test suite
// Skip HTML validation if running a different subset of the test suite
if
(
!
process
.
env
.
TWBS_TEST
||
process
.
env
.
TWBS_TEST
===
'
validate-html
'
)
{
if
(
runSubset
(
'
validate-html
'
)
)
{
testSubtasks
.
push
(
'
validate-html
'
);
testSubtasks
.
push
(
'
validate-html
'
);
}
}
// Only run Sauce Labs tests if there's a Sauce access key
// Only run Sauce Labs tests if there's a Sauce access key
if
(
typeof
process
.
env
.
SAUCE_ACCESS_KEY
!==
'
undefined
'
&&
if
(
typeof
process
.
env
.
SAUCE_ACCESS_KEY
!==
'
undefined
'
&&
// Skip Sauce if running a different subset of the test suite
// Skip Sauce if running a different subset of the test suite
(
!
process
.
env
.
TWBS_TEST
||
process
.
env
.
TWBS_TEST
===
'
sauce-js-unit
'
))
{
runSubset
(
'
sauce-js-unit
'
))
{
testSubtasks
.
push
(
'
connect
'
);
testSubtasks
.
push
(
'
connect
'
);
testSubtasks
.
push
(
'
saucelabs-qunit
'
);
testSubtasks
.
push
(
'
saucelabs-qunit
'
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment