Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'grunt' of https://github.com/sindresorhus/Modernizr int…
…o sindresorhus-grunt * 'grunt' of https://github.com/sindresorhus/Modernizr: Close GH-1: Match Modernizr's current style as close as possible!. Forgot to remove the old build script Add grunt Conflicts: modernizr.js
- Loading branch information
Showing
17 changed files
with
150 additions
and
89 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,3 +1,3 @@ | ||
// cors | ||
// By Theodoor van Donge | ||
Modernizr.addTest('cors', 'withCredentials' in new XMLHttpRequest); | ||
Modernizr.addTest('cors', 'withCredentials' in new XMLHttpRequest()); |
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
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
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
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
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,19 +1,19 @@ | ||
// Stylable scrollbars detection | ||
Modernizr.addTest('cssscrollbar', function() { | ||
|
||
var bool, | ||
styles = "#modernizr{overflow: scroll; width: 40px }#" + | ||
Modernizr._prefixes | ||
|
||
styles = "#modernizr{overflow: scroll; width: 40px }#" + | ||
Modernizr._prefixes | ||
.join("scrollbar{width:0px}"+' #modernizr::') | ||
.split('#') | ||
.slice(1) | ||
.join('#') + "scrollbar{width:0px}"; | ||
|
||
Modernizr.testStyles(styles, function(node) { | ||
bool = 'scrollWidth' in node && node.scrollWidth == 40; | ||
}); | ||
|
||
return bool; | ||
|
||
}); |
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/*global module */ | ||
module.exports = function( grunt ) { | ||
'use strict'; | ||
|
||
grunt.initConfig({ | ||
meta: { | ||
version: '2.5.3', | ||
banner: '/*!\n' + | ||
' * Modernizr v<%= meta.version %>\n' + | ||
' * www.modernizr.com\n *\n' + | ||
' * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton\n' + | ||
' * Available under the BSD and MIT licenses: www.modernizr.com/license/\n */' | ||
}, | ||
lint: { | ||
files: [ | ||
'grunt.js', | ||
'modernizr.js', | ||
'feature-detects/*.js' | ||
] | ||
}, | ||
min: { | ||
dist: { | ||
src: [ | ||
'<banner:meta.banner>', | ||
'modernizr.js' | ||
], | ||
dest: 'modernizr.min.js' | ||
} | ||
}, | ||
watch: { | ||
files: '<config:lint.files>', | ||
tasks: 'lint' | ||
}, | ||
jshint: { | ||
options: { | ||
boss: true, | ||
browser: true, | ||
curly: false, | ||
devel: true, | ||
eqeqeq: false, | ||
eqnull: true, | ||
expr: true, | ||
evil: true, | ||
immed: false, | ||
laxcomma: true, | ||
newcap: false, | ||
noarg: true, | ||
smarttabs: true, | ||
sub: true, | ||
undef: true | ||
}, | ||
globals: { | ||
Modernizr: true, | ||
DocumentTouch: true, | ||
TEST: true | ||
} | ||
} | ||
}); | ||
|
||
grunt.registerTask('default', 'min'); | ||
|
||
}; |
Oops, something went wrong.