Skip to content

Commit

Permalink
Use Bower to pull in vendor dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ericf committed May 11, 2013
1 parent 5d65af6 commit 3d8213a
Show file tree
Hide file tree
Showing 13 changed files with 285 additions and 117 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "public/vendor/"
}
9 changes: 9 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name" : "leslie-eric.us",
"version": "1.1.3",

"dependencies": {
"hide-address-bar": "git://github.com/scottjehl/Hide-Address-Bar.git",
"normalize-css" : "~2.1.2"
}
}
17 changes: 11 additions & 6 deletions config/yui.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ exports.config = {

modules: {
'hide-address-bar': {
path: 'vendor/hide-address-bar.js'
},

'le-wedding': {
path: 'js/wedding.js',
requires: ['le-main', 'le-maps', 'event-resize', 'graphics']
path: 'vendor/hide-address-bar/hide-address-bar.js'
},

'le-home': {
Expand All @@ -47,6 +42,16 @@ exports.config = {
'le-maps': {
path : 'js/maps.js',
requires: ['node-base', 'mapbox']
},

'le-rsvp': {
path : 'js/rsvp.js',
requires: ['app-base', 'app-content', 'model', 'model-list', 'model-sync-rest', 'view']
},

'le-wedding': {
path: 'js/wedding.js',
requires: ['le-main', 'le-maps', 'event-resize', 'graphics']
}
}
}
Expand Down
34 changes: 0 additions & 34 deletions public/vendor/hide-address-bar.js

This file was deleted.

5 changes: 5 additions & 0 deletions public/vendor/hide-address-bar/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.project
*~
*.diff
*.patch
.DS_Store
9 changes: 9 additions & 0 deletions public/vendor/hide-address-bar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
A normalized approach to hiding the address bar on iOS and Android
=======================

Authored by @scottjehl

MIT License.

Read this article for explanation
http://24ways.org/2011/raising-the-bar-on-mobile
9 changes: 9 additions & 0 deletions public/vendor/hide-address-bar/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "hide-address-bar",
"version": "0.0.0",
"commit": "910af3e27c61832957b09bdcb5504553ebbed118",
"repository": {
"type": "git",
"url": "git://github.com/scottjehl/Hide-Address-Bar.git"
}
}
16 changes: 16 additions & 0 deletions public/vendor/hide-address-bar/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test page</title><title>Cross-device Address Bar Hide - Example 1</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="hide-address-bar.js"></script>
<style>
/* DEMO ONLY for this short page - remove in live code */
body { min-height: 480px; }
</style>
</head>
<body>
<p>The script on this page should hide the address bar on iOS and Android.</p>
</body>
</html>
34 changes: 34 additions & 0 deletions public/vendor/hide-address-bar/hide-address-bar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*! Normalized address bar hiding for iOS & Android (c) @scottjehl MIT License */
(function( win ){
var doc = win.document;

// If there's a hash, or addEventListener is undefined, stop here
if( !location.hash && win.addEventListener ){

//scroll to 1
win.scrollTo( 0, 1 );
var scrollTop = 1,
getScrollTop = function(){
return win.pageYOffset || doc.compatMode === "CSS1Compat" && doc.documentElement.scrollTop || doc.body.scrollTop || 0;
},

//reset to 0 on bodyready, if needed
bodycheck = setInterval(function(){
if( doc.body ){
clearInterval( bodycheck );
scrollTop = getScrollTop();
win.scrollTo( 0, scrollTop === 1 ? 0 : 1 );
}
}, 15 );

win.addEventListener( "load", function(){
setTimeout(function(){
//at load, if user hasn't scrolled more than 20 or so...
if( getScrollTop() < 20 ){
//reset to hide addr bar at onload
win.scrollTo( 0, scrollTop === 1 ? 0 : 1 );
}
}, 0);
}, false );
}
})( this );
19 changes: 19 additions & 0 deletions public/vendor/normalize-css/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) Nicolas Gallagher and Jonathan Neal

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
49 changes: 49 additions & 0 deletions public/vendor/normalize-css/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# normalize.css v2

Normalize.css is a customisable CSS file that makes browsers render all
elements more consistently and in line with modern standards. We researched the
differences between default browser styles in order to precisely target only
the styles that need normalizing.

[Check out the demo](http://necolas.github.io/normalize.css/latest/test.html)

[Legacy browser support is available in v1](https://github.com/necolas/normalize.css/tree/v1)

## Install

Download from the [project page](http://necolas.github.io/normalize.css/).

Install with [Bower](http://bower.io/): `bower install --save normalize-css`

## What does it do?

* Preserves useful defaults, unlike many CSS resets.
* Normalizes styles for a wide range of elements.
* Corrects bugs and common browser inconsistencies.
* Improves usability with subtle improvements.
* Explains what code does using detailed comments.

## How to use it

Normalize.css is intended to be used as an alternative to CSS resets.

It's suggested that you read the `normalize.css` file and consider customising
it to meet your needs. Alternatively, include the file in your project and
override the defaults later in your CSS.

## Browser support

* Google Chrome
* Mozilla Firefox 4+
* Apple Safari 5+
* Opera 12+
* Internet Explorer 8+

## Contribute

Please read the CONTRIBUTING.md

## Acknowledgements

Normalize.css is a project by [Nicolas Gallagher](https://github.com/necolas),
co-created with [Jonathan Neal](https://github.com/jonathantneal).
23 changes: 23 additions & 0 deletions public/vendor/normalize-css/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "normalize-css",
"version": "2.1.2",
"main": "normalize.css",
"author": {
"name": "Nicolas Gallagher"
},
"ignore": [
"CHANGELOG.md",
"CONTRIBUTING.md",
"component.json",
"test.html"
],
"gitHead": "56af2b11703dd9e8819ae725ee67192a4b55a48c",
"readme": "# normalize.css v2\n\nNormalize.css is a customisable CSS file that makes browsers render all\nelements more consistently and in line with modern standards. We researched the\ndifferences between default browser styles in order to precisely target only\nthe styles that need normalizing.\n\n[Check out the demo](http://necolas.github.io/normalize.css/latest/test.html)\n\n[Legacy browser support is available in v1](https://github.com/necolas/normalize.css/tree/v1)\n\n## Install\n\nDownload from the [project page](http://necolas.github.io/normalize.css/).\n\nInstall with [Bower](http://bower.io/): `bower install --save normalize-css`\n\n## What does it do?\n\n* Preserves useful defaults, unlike many CSS resets.\n* Normalizes styles for a wide range of elements.\n* Corrects bugs and common browser inconsistencies.\n* Improves usability with subtle improvements.\n* Explains what code does using detailed comments.\n\n## How to use it\n\nNormalize.css is intended to be used as an alternative to CSS resets.\n\nIt's suggested that you read the `normalize.css` file and consider customising\nit to meet your needs. Alternatively, include the file in your project and\noverride the defaults later in your CSS.\n\n## Browser support\n\n* Google Chrome\n* Mozilla Firefox 4+\n* Apple Safari 5+\n* Opera 12+\n* Internet Explorer 8+\n\n## Contribute\n\nPlease read the CONTRIBUTING.md\n\n## Acknowledgements\n\nNormalize.css is a project by [Nicolas Gallagher](https://github.com/necolas),\nco-created with [Jonathan Neal](https://github.com/jonathantneal).\n",
"readmeFilename": "README.md",
"_id": "[email protected]",
"description": "Normalize.css is a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. We researched the differences between default browser styles in order to precisely target only the styles that need normalizing.",
"repository": {
"type": "git",
"url": "git://github.com/necolas/normalize.css.git"
}
}
Loading

0 comments on commit 3d8213a

Please sign in to comment.