Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[doc][dist] Do a replace on README to insert form; Regenerate index.html

  • Loading branch information...
commit 3172de87712e22c56c642ea75f1b2ffd481cde99 1 parent fdaea0c
@jfhbrook authored
View
4 README.md
@@ -11,7 +11,9 @@
Try visiting this link:
-[/standalone/concat-stream@latest](http://wzrd.in.nyud.net/standalone/concat-stream@latest)
+[/standalone/concat-stream@latest](http://wzrd.in/standalone/concat-stream@latest)
+
+Also, [wzrd.in](http://wzrd.in) has a nice url generating form.
## What just happened?
View
2  package.json
@@ -28,7 +28,7 @@
"scripts": {
"test": "tap ./test/*.js && rm -r ./test/cdn.db",
"start": "node ./bin/browserify-cdn",
- "index-page": "marked README.md | sed s_http://wzrd.in.nyud.net/standalone/concat-stream@latest_/standalone/concat-stream@latest_ | exercise-bike --readme :stdin: ./templates/index.handlebars ./public/index.html"
+ "index-page": "marked README.md | sed s_http://wzrd.in/standalone/concat-stream@latest_/standalone/concat-stream@latest_ | sed 's_<p>Also, <a href=\"http://wzrd.in\">wzrd.in</a> has a nice url generating form.</p>_<form method=\"get\" id=\"url-generator\"><h3>Or choose a module here:</h3><label>Module:<input type=\"text\" name=\"module\" value=\"concat-stream\" required /></label><label>Version:<input type=\"text\" name=\"ver\" value=\"latest\" required /></label><input type=\"submit\" value=\"Go!\" /></form>_' | exercise-bike --readme :stdin: ./templates/index.handlebars ./public/index.html"
},
"devDependencies": {
"marked": "~0.2.9",
View
19 public/index.html
@@ -34,18 +34,7 @@
<h1>Quick Start</h1>
<p>Try visiting this link:</p>
<p><a href="/standalone/concat-stream@latest">/standalone/concat-stream@latest</a></p>
-<form method="get" id="url-generator">
- Or..
- <label>
- Module:
- <input type="text" name="module" value="concat-stream" required />
- </label>
- <label>
- Version:
- <input type="text" name="ver" value="latest" required />
- </label>
- <input type="submit" value="Go!" />
-</form>
+<form method="get" id="url-generator"><h3>Or choose a module here:</h3><label>Module:<input type="text" name="module" value="concat-stream" required /></label><label>Version:<input type="text" name="ver" value="latest" required /></label><input type="submit" value="Go!" /></form>
<h2>What just happened?</h2>
<p>Well, in <em>this</em> case, since someone has visited this link before you,
the file was cached with <a href="https://github.com/rvagg/node-levelup">leveldb</a>.
@@ -112,6 +101,12 @@
<h2>GET /multi/:existing-bundle</h2>
<p>If you saved the Location url from the POST earlier, you can just GET it instead of
POSTing again.</p>
+<h2>Heroku Installation</h2>
+<p>It&#39;s possible to run browserify-cdn on Heroku using the included Procfile:</p>
+<pre><code>heroku create
+git push heroku master
+heroku ps:scale web=1</code></pre>
+<p>Keep in mind that a new deploy will wipe the cache.</p>
<h2>License</h2>
<p>MIT</p>
View
14 templates/index.handlebars
@@ -3,6 +3,20 @@
<head>
<title>Browserify-CDN</title>
<link rel="stylesheet" href="style.css">
+ <script type="text/javascript">
+ window.onload = function(){
+ document.getElementById('url-generator').onsubmit = function() {
+ module = this.elements["module"].value
+ ver = this.elements["ver"].value
+ path = "http://wzrd.in/standalone/" + module + "@" + ver
+ link = document.createElement('a')
+ link.href = path
+ link.target = '_blank'
+ link.click()
+ return false
+ }
+ }
+ </script>
</head>
<body>
<div id="logo">
Please sign in to comment.
Something went wrong with that request. Please try again.