Permalink
Browse files

Updating all the links so that I can use relative paths in the exampl…

…es for use both on the CDN and localhost
  • Loading branch information...
1 parent 47a4a91 commit 48edba8238dff56af56f71bd9e409d929a1d9c96 @jansepar jansepar committed Feb 28, 2013
View
@@ -181,18 +181,14 @@ module.exports = function(grunt) {
access: "public-read",
headers: { "Cache-Control": "max-age=1200" },
upload: [
- { // minified library
- src: "build/mobify-<%= pkg.version %>.min.js",
- dest: "mobifyjs/mobify-<%= pkg.version %>.min.js",
- gzip: true
- },
- { // unminified library
- src: "build/mobify-<%= pkg.version %>.js",
- dest: "mobifyjs/mobify-<%= pkg.version %>.js"
+ { // build
+ src: "build/**/*",
+ dest: "mobifyjs/build/",
+ rel: "build"
},
{ // examples
src: "examples/**/*",
- dest: "examples",
+ dest: "mobifyjs/examples/",
rel: "examples"
}
]
@@ -62,14 +62,14 @@
return true;
},
// path to mobify.js
- '/build/mobify-2.0.0alpha1.js',
+ '/mobifyjs/build/mobify-2.0.0alpha1.js',
// path to main executable
- '/examples/capturing-basictemplating/main.js'
+ '/mobifyjs/examples/capturing-basictemplating/main.js'
);
</script>
<!-- END MOBIFY TAG -->
-<link rel="stylesheet" href="/examples/assets/css/stylesheet.css" type="text/css">
+<link rel="stylesheet" href="/mobifyjs/examples/assets/css/stylesheet.css" type="text/css">
<title>Mobify.js image gallary example</title>
</head>
<body class="foo">
@@ -62,14 +62,14 @@
return true;
},
// path to mobify.js
- '//cdn.mobify.com/mobifyjs/mobify-2.0.0alpha1.min.js',
+ '/mobifyjs/build/mobify-2.0.0alpha1.min.js',
// path to main executable
- '/examples/capturing-grumpycat/main.js'
+ '/mobifyjs/examples/capturing-grumpycat/main.js'
);
</script>
<!-- END MOBIFY TAG -->
-<link rel="stylesheet" href="/examples/assets/css/stylesheet.css" type="text/css">
+<link rel="stylesheet" href="/mobifyjs/examples/assets/css/stylesheet.css" type="text/css">
<title>Mobify.js image gallary example</title>
</head>
<body class="foo">
@@ -80,10 +80,10 @@
Also note, they were plain old img elements (no data&ndash;src tricks).
<a href="#" id="swap">Click here to download and view the original images from the source html.</a></p>
<div class="img">
- <img src="/examples/assets/images/leaves-big.jpg" width="100%">
+ <img src="/mobifyjs/examples/assets/images/leaves-big.jpg" width="100%">
</div>
<div class="img">
- <img src="/examples/assets/images/office-big.jpg" width="100%">
+ <img src="/mobifyjs/examples/assets/images/office-big.jpg" width="100%">
</div>
</div>
@@ -6,7 +6,7 @@ if (capturing) {
var capture = Mobify.Capture.init();
var capturedDoc = capture.capturedDoc;
- var grumpyUrl = "/examples/assets/images/grumpycat.jpg"
+ var grumpyUrl = "/mobifyjs/examples/assets/images/grumpycat.jpg"
var imgs = capturedDoc.getElementsByTagName("img");
for(var i = 0; i < imgs.length; i++) {
@@ -62,32 +62,32 @@
return true;
},
// path to mobify.js
- '//cdn.mobify.com/mobifyjs/mobify-2.0.0alpha1.min.js',
+ '/mobifyjs/build/mobify-2.0.0alpha1.min.js',
// path to main executable
- '/examples/capturing-mediaquery/main.js'
+ '/mobifyjs/examples/capturing-mediaquery/main.js'
);
</script>
<!-- END MOBIFY TAG -->
-<link rel="stylesheet" href="/examples/assets/css/stylesheet.css" type="text/css">
+<link rel="stylesheet" href="/mobifyjs/examples/assets/css/stylesheet.css" type="text/css">
<title>Mobify.js Media Query</title>
</head>
<body class="foo">
<div class="small">
<h1 media="(max-width : 480px)">Small images downloaded</h1>
- <img src="/examples/assets/images/leaves-small.jpg" width="100%" media="(max-width : 480px)">
- <img src="/examples/assets/images/office-small.jpg" width="100%" media="(max-width : 480px)">
+ <img src="/mobifyjs/examples/assets/images/leaves-small.jpg" width="100%" media="(max-width : 480px)">
+ <img src="/mobifyjs/examples/assets/images/office-small.jpg" width="100%" media="(max-width : 480px)">
</div>
<div class="big">
<h1 media="(min-width : 480px)">Big images downloaded</h1>
- <img src="/examples/assets/images/leaves-big.jpg" width="100%" media="(min-width : 480px)">
- <img src="/examples/assets/images/office-big.jpg" width="100%" media="(min-width : 480px)">
+ <img src="/mobifyjs/examples/assets/images/leaves-big.jpg" width="100%" media="(min-width : 480px)">
+ <img src="/mobifyjs/examples/assets/images/office-big.jpg" width="100%" media="(min-width : 480px)">
</div>
<h1 media="(min-width : 480px)">
-<script src="/examples/assets/js/small.js" media="(max-width: 480px)"></script>
-<script src="/examples/assets/js/large.js" media="(min-width: 480px)"></script>
+<script src="/mobifyjs/examples/assets/js/small.js" media="(max-width: 480px)"></script>
+<script src="/mobifyjs/examples/assets/js/large.js" media="(min-width: 480px)"></script>
<script>
// Grab the total time since starting capturing and send it
// to the parent for testing in performance.html
@@ -62,14 +62,14 @@
return true;
},
// path to mobify.js
- '//cdn.mobify.com/mobifyjs/mobify-2.0.0alpha1.min.js',
+ '/mobifyjs/build/mobify-2.0.0alpha1.min.js',
// path to main executable
- '/examples/capturing-picturepolyfill/main.js'
+ '/mobifyjs/examples/capturing-picturepolyfill/main.js'
);
</script>
<!-- END MOBIFY TAG -->
-<link rel="stylesheet" href="/examples/assets/css/stylesheet.css" type="text/css">
+<link rel="stylesheet" href="/mobifyjs/examples/assets/css/stylesheet.css" type="text/css">
<title>Mobify.js Picturefill example</title>
</head>
@@ -78,11 +78,11 @@
<p>This example has been forked and replicated using capturing to avoid the need for a &lt;noscript&gt; tag (view source to see for yourself).</p>
<p>Open up the network tab of your web inspector to see that the img element does not have it's asset downloaded.<p>
<picture>
- <source src="/examples/assets/images/small.jpg">
- <source src="/examples/assets/images/medium.jpg" media="(min-width: 450px)">
- <source src="/examples/assets/images/large.jpg" media="(min-width: 800px)">
- <source src="/examples/assets/images/extralarge.jpg" media="(min-width: 1000px)">
- <img src="/examples/assets/images/small.jpg">
+ <source src="/mobifyjs/examples/assets/images/small.jpg">
+ <source src="/mobifyjs/examples/assets/images/medium.jpg" media="(min-width: 450px)">
+ <source src="/mobifyjs/examples/assets/images/large.jpg" media="(min-width: 800px)">
+ <source src="/mobifyjs/examples/assets/images/extralarge.jpg" media="(min-width: 1000px)">
+ <img src="/mobifyjs/examples/assets/images/small.jpg">
</picture>
<script>
// Grab the total time since starting capturing and send it
View
@@ -21,7 +21,7 @@ more.
<pre id="mobify-tag"><code class="html">&lt;script class="mobify" id="mobify-tag">(function(a,b,c,d,e){function f(a,c,d){var e=b.createElement("script"),f=b.getElementById("mobify-tag");return e.src=a,e.id=c,e.setAttribute("class",d),f.parentNode.insertBefore(e,f),e}!this.Mobify&&c()&&(b.write('&lt;plaintext style="display:none">'),setTimeout(function(){a.capturing=!0;var b=f(d,"mobify-js","mobify");b.onload=function(){e&&f(e,"mobify-js-main","mobify")}}))})(window,document,function(){var b,a=/webkit|msie\s10|(firefox)[\/\s](\d+)|(opera)[\s\S]*version[\/\s](\d+)|3ds/i.exec(navigator.userAgent);return a&&(b=a[1]&&"firefox"===a[1].toLowerCase()&&4>+a[2]?!1:a[3]&&"opera"===a[3].toLowerCase()&&11>+a[4]?!1:!0),b?!0:!1},
// path to Mobify.js library
-"//cdn.mobify.com/mobifyjs/mobify-2.0.0alpha1.min.js",
+"//cdn.mobify.com/mobifyjs/build/mobify-2.0.0alpha1.min.js",
// Path to main executable
"/PATH/TO/main.js");
&lt;/script></code></pre>
@@ -17,7 +17,7 @@ You can view the example in the link below. Be sure to
open up web inspector to see that the original images
on the site did not download.
-* [Grumpy Cat Example](http://cdn.mobify.com/examples/capturing-grumpycat/index.html){: target='_blank' }
+* [Grumpy Cat Example](http://cdn.mobify.com/mobifyjs/examples/capturing-grumpycat/index.html){: target='_blank' }
Source code on Github:
@@ -34,7 +34,7 @@ You can view the example in the link below. Be sure to
open up web inspector to see that only the images and scripts
evaluated by the media query are loaded.
-* [Media Query Example](http://cdn.mobify.com/examples/capturing-mediaquery/index.html){: target='_blank' }
+* [Media Query Example](http://cdn.mobify.com/mobifyjs/examples/capturing-mediaquery/index.html){: target='_blank' }
Source code on Github:
@@ -53,12 +53,12 @@ possible.
Check out this basic example:
-* [Templating Example](http://cdn.mobify.com/examples/capturing-templating/index.html){: target='_blank' }
+* [Templating Example](http://cdn.mobify.com/mobifyjs/examples/capturing-basictemplating/index.html){: target='_blank' }
Source code on Github:
-* [index.html](https://github.com/mobify/mobifyjs/blob/v2.0-documentation/examples/capturing-templating/index.html){: target='_blank' }
-* [base.html](https://github.com/mobify/mobifyjs/blob/v2.0-documentation/examples/capturing-templating/main.js){: target='_blank' }
+* [index.html](https://github.com/mobify/mobifyjs/blob/v2.0-documentation/examples/capturing-basictemplating/index.html){: target='_blank' }
+* [base.html](https://github.com/mobify/mobifyjs/blob/v2.0-documentation/examples/capturing-basictemplating/main.js){: target='_blank' }
----

0 comments on commit 48edba8

Please sign in to comment.