Skip to content

Commit

Permalink
Fix for git merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanve committed Jan 30, 2013
2 parents f9210de + e1367ce commit 351b021
Show file tree
Hide file tree
Showing 6,206 changed files with 1,299,295 additions and 4,635 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 5 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
; editorconfig.org
# editorconfig.org
root = true

; Unix-style newlines
[*]
end_of_line = LF
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
modernizr.min.js
.DS_Store
build
dist
tmp
.DS_Store
13 changes: 4 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
language: node_js
node_js:
- 0.7
notifications:
email: false
- 0.8
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- npm install connect
- sudo node test/js/server.js &
- sleep 5
script: phantomjs test/qunit/run-qunit.js 'http://localhost:80/test/index.html?filter=!caniuse.com'
- npm install grunt
- grunt build
script: grunt travis --verbose
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Modernizr 3.0.0pre (Custom Build) | MIT & BSD */
35 changes: 35 additions & 0 deletions app.build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
({
"appDir" : ".", // take all the scripts from this dir
"dir" : "build/", // and copy them to this dir, then optimize
"baseUrl" : "src/",
"optimize" : "none",
"optimizeCss" : "none",
"paths" : {
"test" : "../feature-detects"
},
modules : [
{
"name" : "modernizr-build",
"include" : ["modernizr-init"],
"create" : true
}
],
onBuildWrite: function (id, path, contents) {
if ((/define\(.*?\{/).test(contents)) {
//Remove AMD ceremony for use without require.js or almond.js
contents = contents.replace(/define\(.*?\{/, '');

contents = contents.replace(/\}\);\s*?$/,'');

if ( !contents.match(/Modernizr\.addTest\(/) && !contents.match(/Modernizr\.addAsyncTest\(/) ) {
//remove last return statement and trailing })
contents = contents.replace(/return.*[^return]*$/,'');
}
}
else if ((/require\([^\{]*?\{/).test(contents)) {
contents = contents.replace(/require[^\{]+\{/, '');
contents = contents.replace(/\}\);\s*$/,'');
}
return contents;
}
})
3 changes: 3 additions & 0 deletions bin/modernizr
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
grunt build > /dev/null
cat ./dist/modernizr-build.js
13 changes: 13 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /usr/bin/env bash
rm -rf build
node r.js -o app.build.js
rm -rf dist
mkdir dist
cp build/src/modernizr-build.js dist/modernizr-build.js
rm -rf build
node processbuild.js
m=$(stat -f "%z" dist/modernizr-build.min.js)
gzip -nfc --best dist/modernizr-build.min.js > dist/modernizr-build.min.js.gz
g=$(stat -f "%z" dist/modernizr-build.min.js.gz)
rm -f dist/modernizr-build.min.js.gz
echo "$m bytes minified, $g bytes gzipped"
15 changes: 0 additions & 15 deletions compress.sh

This file was deleted.

162 changes: 162 additions & 0 deletions config-all.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{
"classPrefix" : "",
"options": [
"setClasses",
"addTest",
"html5printshiv",
"load",
"testProp",
"fnBind"
],
"feature-detects": [
"test/a/download",
"test/audio/audiodata",
"test/audio/webaudio",
"test/battery/lowbattery",
"test/canvas/todataurl",
"test/css/animations",
"test/css/backgroundposition-shorthand",
"test/css/backgroundposition-xy",
"test/css/backgroundrepeat",
"test/css/backgroundsize",
"test/css/backgroundsizecover",
"test/css/borderimage",
"test/css/borderradius",
"test/css/boxshadow",
"test/css/boxsizing",
"test/css/calc",
"test/css/columns",
"test/css/cubicbezierrange",
"test/css/displayrunin",
"test/css/displaytable",
"test/css/filters",
"test/css/flexbox",
"test/css/flexboxlegacy",
"test/css/fontface",
"test/css/generatedcontent",
"test/css/gradients",
"test/css/hsla",
"test/css/hyphens",
"test/css/lastchild",
"test/css/mask",
"test/css/mediaqueries",
"test/css/multiplebgs",
"test/css/objectfit",
"test/css/opacity",
"test/css/overflow-scrolling",
"test/css/pointerevents",
"test/css/positionsticky",
"test/css/reflections",
"test/css/regions",
"test/css/remunit",
"test/css/resize",
"test/css/rgba",
"test/css/scrollbars",
"test/css/subpixelfont",
"test/css/supports",
"test/css/textshadow",
"test/css/transforms",
"test/css/transforms3d",
"test/css/transitions",
"test/css/userselect",
"test/css/vhunit",
"test/css/vmaxunit",
"test/css/vminunit",
"test/css/vwunit",
"test/dom/classlist",
"test/dom/createElement-attrs",
"test/dom/dataset",
"test/dom/microdata",
"test/elem/datalist",
"test/elem/details",
"test/elem/output",
"test/elem/progress-meter",
"test/elem/ruby",
"test/elem/time",
"test/elem/track",
"test/es5/strictmode",
"test/event/deviceorientation-motion",
"test/file/api",
"test/file/filesystem",
"test/forms/fileinput",
"test/forms/formattribute",
"test/forms/inputnumber-l10n",
"test/forms/placeholder",
"test/forms/speechinput",
"test/forms/validation",
"test/iframe/sandbox",
"test/iframe/seamless",
"test/iframe/srcdoc",
"test/img/apng",
"test/img/webp-lossless",
"test/img/webp",
"test/network/connection",
"test/network/eventsource",
"test/network/xhr2",
"test/script/async",
"test/script/defer",
"test/storage/localstorage",
"test/storage/sessionstorage",
"test/storage/websqldatabase",
"test/style/scoped",
"test/svg/clippaths",
"test/svg/filters",
"test/svg/inline",
"test/svg/smil",
"test/url/data-uri",
"test/webgl/extensions",
"test/websockets/binary",
"test/window/framed",
"test/workers/blobworkers",
"test/workers/dataworkers",
"test/workers/webworkers",
"test/applicationcache",
"test/webrtc/getusermedia",
"test/webrtc/peerconnection",
"test/audio",
"test/typed-arrays",
"test/battery",
"test/blob",
"test/canvas",
"test/canvastext",
"test/contenteditable",
"test/contentsecuritypolicy",
"test/contextmenu",
"test/cookies",
"test/cors",
"test/custom-protocol-handler",
"test/dart",
"test/dataview-api",
"test/draganddrop",
"test/emoji",
"test/exif-orientation",
"test/fullscreen-api",
"test/gamepad",
"test/hashchange",
"test/history",
"test/ie8compat",
"test/indexedDB",
"test/input",
"test/inputtypes",
"test/json",
"test/lists-reversed",
"test/mathml",
"test/notification",
"test/pagevisibility-api",
"test/performance",
"test/pointerevents",
"test/pointerlock-api",
"test/postmessage",
"test/quota-management-api",
"test/requestanimationframe",
"test/svg",
"test/touchevents",
"test/unicode",
"test/userdata",
"test/vibration",
"test/video",
"test/web-intents",
"test/webgl",
"test/websockets"
]
}
10 changes: 0 additions & 10 deletions feature-detects/a-download.js

This file was deleted.

8 changes: 8 additions & 0 deletions feature-detects/a/download.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
define(['Modernizr', 'createElement'], function( Modernizr, createElement ) {
// a[download] attribute
// When used on an <a>, this attribute signifies that the resource it
// points to should be downloaded by the browser rather than navigating to it.
// http://developers.whatwg.org/links.html#downloading-resources

Modernizr.addTest('adownload', 'download' in createElement('a'));
});
3 changes: 3 additions & 0 deletions feature-detects/applicationcache.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
define(['Modernizr'], function( Modernizr ) {
Modernizr.addTest('applicationcache', !!window.applicationCache);
});
4 changes: 0 additions & 4 deletions feature-detects/audio-audiodata-api.js

This file was deleted.

4 changes: 0 additions & 4 deletions feature-detects/audio-webaudio-api.js

This file was deleted.

36 changes: 36 additions & 0 deletions feature-detects/audio.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
define(['Modernizr', 'createElement'], function( Modernizr, createElement ) {
// This tests evaluates support of the audio element, as well as
// testing what types of content it supports.
//
// We're using the Boolean constructor here, so that we can extend the value
// e.g. Modernizr.audio // true
// Modernizr.video.ogg // 'probably'
//
// Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
// thx to NielsLeenheer and zcorpan

// Note: in some older browsers, "no" was a return value instead of empty string.
// It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
// It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
Modernizr.addTest('audio', function() {
var elem = createElement('audio');
var bool = false;

try {
if ( bool = !!elem.canPlayType ) {
bool = new Boolean(bool);
bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,'');

// Mimetypes accepted:
// developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
// bit.ly/iphoneoscodecs
bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,'');
bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
elem.canPlayType('audio/aac;')) .replace(/^no$/,'');
}
} catch(e) { }

return bool;
});
});
6 changes: 6 additions & 0 deletions feature-detects/audio/audiodata.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
define(['Modernizr'], function( Modernizr ) {
// Mozilla Audio Data API
// https://wiki.mozilla.org/Audio_Data_API
// by Addy Osmani
Modernizr.addTest('audiodata', !!window.Audio);
});
6 changes: 6 additions & 0 deletions feature-detects/audio/webaudio.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
define(['Modernizr'], function( Modernizr ) {
// Web Audio API
// https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
// By Addy Osmani
Modernizr.addTest('webaudio', !!(window.webkitAudioContext || window.AudioContext));
});
8 changes: 0 additions & 8 deletions feature-detects/battery-api.js

This file was deleted.

11 changes: 0 additions & 11 deletions feature-detects/battery-level.js

This file was deleted.

8 changes: 8 additions & 0 deletions feature-detects/battery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
define(['Modernizr', 'prefixed'], function( Modernizr, prefixed ) {
// Battery API
// https://developer.mozilla.org/en/DOM/window.navigator.mozBattery
// By: Paul Sayre
Modernizr.addTest('battery-api',
!!prefixed('battery', navigator)
);
});

0 comments on commit 351b021

Please sign in to comment.