Skip to content

Commit e505703

Browse files
committed
- Docs (index.html): Update info, clean-up code, add ?useShim=true by default
- Testing (Mocha, fake, mock, old W3C)/Grunt: Deploy sinon without sourcemaps (too large) - npm: Bump version to 3.0.0-rc.6 (package.json, Grunt, README, shrinkwrap, dist)
1 parent 0ec004c commit e505703

18 files changed

+11726
-11750
lines changed

Gruntfile.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ module.exports = function (grunt) {
135135
sourceMap: true,
136136
sourceMapIn: 'dist/<%=pkg.name%>-UnicodeIdentifiers.js.map',
137137
sourceMapName: 'dist/<%=pkg.name%>-UnicodeIdentifiers.min.js.map',
138-
sourceMapRoot: 'https://cdn.rawgit.com/axemclion/IndexedDBShim/v3.0.0-rc.5/dist/'
138+
sourceMapRoot: 'https://cdn.rawgit.com/axemclion/IndexedDBShim/v3.0.0-rc.6/dist/'
139139
},
140140
src: 'dist/<%= pkg.name%>-UnicodeIdentifiers.js',
141141
dest: 'dist/<%= pkg.name%>-UnicodeIdentifiers.min.js'
@@ -146,7 +146,7 @@ module.exports = function (grunt) {
146146
sourceMap: true,
147147
sourceMapIn: 'dist/<%=pkg.name%>.js.map',
148148
sourceMapName: 'dist/<%=pkg.name%>.min.js.map',
149-
sourceMapRoot: 'https://cdn.rawgit.com/axemclion/IndexedDBShim/v3.0.0-rc.5/dist/'
149+
sourceMapRoot: 'https://cdn.rawgit.com/axemclion/IndexedDBShim/v3.0.0-rc.6/dist/'
150150
},
151151
src: 'dist/<%= pkg.name%>.js',
152152
dest: 'dist/<%=pkg.name%>.min.js'
@@ -157,7 +157,7 @@ module.exports = function (grunt) {
157157
sourceMap: true,
158158
sourceMapIn: 'dist/<%=pkg.name%>-noninvasive.js.map',
159159
sourceMapName: 'dist/<%=pkg.name%>-noninvasive.min.js.map',
160-
sourceMapRoot: 'https://cdn.rawgit.com/axemclion/IndexedDBShim/v3.0.0-rc.5/dist/'
160+
sourceMapRoot: 'https://cdn.rawgit.com/axemclion/IndexedDBShim/v3.0.0-rc.6/dist/'
161161
},
162162
src: 'dist/<%= pkg.name%>-noninvasive.js',
163163
dest: 'dist/<%=pkg.name%>-noninvasive.min.js'
@@ -355,7 +355,7 @@ module.exports = function (grunt) {
355355
{src: 'node_modules/mocha/mocha.css', dest: 'test-support/mocha/mocha.css', filter: 'isFile'},
356356
{src: 'node_modules/mocha/mocha.js', dest: 'test-support/mocha/mocha.js', filter: 'isFile'},
357357
{src: 'node_modules/chai/chai.js', dest: 'test-support/chai/chai.js', filter: 'isFile'},
358-
{src: 'node_modules/sinon/pkg/sinon.js', dest: 'test-support/sinon/pkg/sinon.js', filter: 'isFile'}
358+
{src: 'node_modules/sinon/pkg/sinon-no-sourcemaps.js', dest: 'test-support/sinon/pkg/sinon-no-sourcemaps.js', filter: 'isFile'}
359359
]
360360
}
361361
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ to the data format, thereby breaking old data.***
2323
[![CDNJS](https://img.shields.io/cdnjs/v/IndexedDBShim.svg)](https://cdnjs.com/libraries/IndexedDBShim)
2424
[![License](https://img.shields.io/npm/l/indexeddbshim.svg)](LICENSE-APACHE)
2525

26-
|[Live Demo!](https://cdn.rawgit.com/axemclion/IndexedDBShim/v3.0.0-rc.5/index.html)
26+
|[Live Demo!](https://cdn.rawgit.com/axemclion/IndexedDBShim/v3.0.0-rc.6/index.html)
2727
|------------------------------------------------------------
2828

2929
__Use a single, indexable, offline storage API across all desktop and mobile

dist/indexeddbshim-UnicodeIdentifiers.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/indexeddbshim-UnicodeIdentifiers.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/indexeddbshim-noninvasive.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/indexeddbshim-noninvasive.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/indexeddbshim.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/indexeddbshim.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

+58-76
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,118 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="utf-8">
5-
<link href="/jquery-indexeddb/style.css" type="text/css" rel="stylesheet"/>
4+
<meta charset="utf-8" />
5+
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
6+
<link href="style.css" type="text/css" rel="stylesheet" />
67
<title>IndexedDB Polyfill</title>
78
</head>
89
<body>
9-
<div id = "content-wrap">
10+
<div id="content-wrap">
1011
<h1>IndexedDB Polyfill over WebSql</h1>
11-
<div id = "content">
12-
<div id = "download">
13-
<a href = "https://raw.githubusercontent.com/axemclion/IndexedDBShim/master/dist/indexeddbshim.min.js" target="_blank" class = "punch">Download indexeddb.shim.js</a>
12+
<div id="content">
13+
<div id="download">
14+
<a href="https://raw.githubusercontent.com/axemclion/IndexedDBShim/master/dist/indexeddbshim.min.js" target="_blank" class="punch">Download indexeddb.shim.js</a>
1415
</div>
1516
<div>
16-
A polyfill to enable IndexedDB using WebSql.
17-
<br/>
18-
IndexedDB is not supported on <a href = "http://caniuse.com/#search=IndexedDB" target="_blank">all browsers</a>.
19-
This IndexedDB polyfill exposes the IndexedDB API in unsupported browsers using WebSQL. This shim is basically an IndexedDB-WebSql adapter.
20-
<br/>
21-
Check out my <a href = "http://blog.nparashuram.com/search/label/indexeddb">blog</a>
22-
for updates.
17+
<p>A polyfill to enable IndexedDB using WebSql.</p>
18+
<p>IndexedDB is not supported on <a href="http://caniuse.com/#search=IndexedDB" target="_blank">all browsers</a>.
19+
This IndexedDB polyfill exposes the IndexedDB API in unsupported browsers using WebSQL. This shim is basically an IndexedDB-WebSql adapter.</p>
20+
<p>Check out my <a href="http://blog.nparashuram.com/search/label/indexeddb">blog</a>
21+
for updates.</p>
2322
</div>
2423
<div>
2524
<h2>Download</h2>
2625
<div>
27-
<a href = "https://raw.githubusercontent.com/axemclion/IndexedDBShim/master/dist/indexeddbshim.min.js" target = "_blank">Download the polyfill</a>
28-
</div>
29-
<div style ="margin-top: 10px;">
30-
To keep the code manageable, the modules are in <a href = "https://github.com/axemclion/IndexedDBShim/tree/gh-pages/src">different files</a>. The link above is simply a concatenation of all these files.
31-
You can build a <a href = "https://raw.githubusercontent.com/axemclion/IndexedDBShim/master/dist/indexeddbshim.js">development</a>
32-
or <a href = "https://raw.githubusercontent.com/axemclion/IndexedDBShim/master/dist/indexeddbshim.min.js">production (minified)</a>
33-
version by running the default task in the <a href = "https://github.com/cowboy/grunt">gruntfile</a>. The two files will be put in the
34-
<code>
35-
dist
36-
</code>
37-
folder.
38-
You can also concantenate them again with JavaScript and download that copy using <a href = "javascript:download()">this link</a>.
26+
<a href="https://raw.githubusercontent.com/axemclion/IndexedDBShim/master/dist/indexeddbshim.min.js" target="_blank">Download the polyfill</a>
3927
</div>
28+
<p style ="margin-top: 10px;">
29+
To keep the code manageable, the modules are in <a href="https://github.com/axemclion/IndexedDBShim/tree/gh-pages/src">different files</a>. The link above is simply a concatenation of all these files.
30+
</p>
4031
</div>
4132
<div>
4233
<h2>Test Cases</h2>
43-
<div>
44-
Run the test cases (<a href ="tests-qunit/index.html">QUnit</a>, <a href="tests-mocha/index.html">Mocha</a>, <a href="tests-polyfill/fakeIndexedDB/index.html">Fake</a>, <a href="tests-polyfill/indexedDBmock/index.html">Mock</a>, and <a href="tests-polyfill/w3c/index.html">W3C (old)</a>.)
34+
<p>
35+
Run the test cases (<a href ="tests-qunit/index.html">QUnit</a>, <a href="tests-mocha/index.html?useShim=true">Mocha</a>, <a href="tests-polyfill/fakeIndexedDB/index.html?useShim=true">Fake</a>, <a href="tests-polyfill/indexedDBmock/index.html?useShim=true">Mock</a>, and <a href="tests-polyfill/w3c/index.html?useShim=true">W3C (old)</a>.)
4536
to see how the polyfill performs on your non-IndexedDB supported browser like Opera or Safari. It also works on Chrome as Chrome also has WebSQL.
4637
This would run on devices like the iPad and the iPhone too !!
47-
</div>
38+
</p>
4839
</div>
4940
<div>
5041
<h2>Libraries tested to work with the shim</h2>
51-
<div>
42+
<p>
5243
The polyfill implements the IndexedDB API specification.
5344
The following libraries have examples that work with the polyfill.
5445
Note that the jQuery and LINQ examples may now be outdated.
55-
</div>
46+
</p>
5647
<ul>
5748
<li>
58-
<a href = "http://nparashuram.com/jquery-indexeddb">JQuery-IndexedDB</a>
49+
<a href="http://nparashuram.com/jquery-indexeddb">JQuery-IndexedDB</a>
5950
plugin
60-
- <a href = "http://nparashuram.com/jquery-indexeddb/example/">See example</a>
51+
- <a href="http://nparashuram.com/jquery-indexeddb/example/">See example</a>
6152
</li>
6253
<li>
63-
LINQ API for IndexedDB <a href = "http://linq2indexeddb.codeplex.com/">LINQ2IndexedDB</a>
54+
LINQ API for IndexedDB <a href="http://linq2indexeddb.codeplex.com/">LINQ2IndexedDB</a>
6455
</li>
6556
<li>
66-
<a href = "http://aaronpowell.github.com/db.js/">DB.JS</a>
67-
library - <a href = "examples/dbjs.html">See Examples</a>
57+
<a href="http://aaronpowell.github.com/db.js/">DB.JS</a>
58+
library - <a href="examples/dbjs.html">See Examples</a>
6859
</li>
6960
</ul>
7061
</div>
7162
<div>
7263
<h2>Source Code</h2>
73-
<div>
74-
Fork the repository on <a href = "https://github.com/axemclion/IndexedDBShim">github</a>. The source code is licensed under Apache 2.0.
75-
</div>
76-
<div>
77-
The implementation is not 100% to the spec and some work still needs to be done. There are a couple of <a href = "https://github.com/axemclion/IndexedDBShim/issues">open issues</a>
78-
to be fixed
79-
</div>
80-
<div>
64+
<p>
65+
Fork the repository on <a href="https://github.com/axemclion/IndexedDBShim">GitHub</a>. The source code is dual-licensed, allowing you to use either Apache 2.0 or MIT.
66+
</p>
67+
<p>
68+
The implementation is not 100% to the spec and some work still needs to be done. There are a couple of <a href="https://github.com/axemclion/IndexedDBShim/issues">open issues</a>
69+
to be fixed.
70+
</p>
71+
<p>
8172
Send out a pull request if you would like to help !!
82-
</div>
73+
</p>
8374
</div>
8475
<div>
8576
<h2>Other IndexedDB links</h2>
8677
<ul>
8778
<li>
88-
<a href = "http://nparashuram.com/IndexedDB" target = "_blank">My other IndexedDB work</a>
79+
<a href="http://nparashuram.com/IndexedDB" target="_blank">My other IndexedDB work</a>
8980
</li>
9081
<li>
91-
<a href = "http://www.w3.org/TR/IndexedDB/" target = "_blank">IndexedDB Specification</a>
82+
<a href="http://www.w3.org/TR/IndexedDB/" target="_blank">IndexedDB Specification</a>
9283
</li>
9384
<li>
94-
<a href = "http://blog.nparashuram.com/search/label/indexeddb" target = "_blank">My blog posts on IndexedDB</a>
85+
<a href="http://blog.nparashuram.com/search/label/indexeddb" target="_blank">My blog posts on IndexedDB</a>
9586
</li>
9687
</ul>
9788
</div>
9889
<div>
9990
<h2>Credits</h2>
100-
<div>
101-
A big thanks to the <a href = "https://github.com/axemclion/IndexedDBShim/graphs/contributors">contributors</a>
102-
to this project.
103-
</div>
91+
<p>
92+
A big thanks to the <a href="https://github.com/axemclion/IndexedDBShim/graphs/contributors">contributors</a>
93+
of this project.
94+
</p>
10495
</div>
10596
</div>
10697
</div>
107-
<script src= "build.js">
108-
</script>
98+
<a href="https://github.com/you"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://camo.githubusercontent.com/567c3a48d796e2fc06ea80409cc9dd82bf714434/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png"></a>
10999
<script>
110-
function download(){
111-
var w = window.open(null, "Download IndexedDB Shim", "menubar=false,toolbar=false,dependent=yes,height=500,width=500,centerscreen=yes,resizable=yes,scrollbars=yes,status=no");
112-
w.document.body.innerHTML = "Loading";
113-
buildIndexedDB.concatScripts(function(script){
114-
w.document.body.innerHTML = ("<pre>" + script + "</pre>");
115-
});
116-
}
117-
</script>
118-
<a href="http://github.com/axemclion/IndexedDBShim"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://a248.e.akamai.net/camo.github.com/bec6c51521dcc8148146135149fe06a9cc737577/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
119-
<script>
120-
var _gaq = _gaq || [];
121-
_gaq.push(['_setAccount', 'UA-617499-9']);
122-
_gaq.push(['_setDomainName', 'none']);
123-
_gaq.push(['_setAllowLinker', true]);
124-
_gaq.push(['_trackPageview']);
100+
if (window.location.href.indexOf('noanalytics=true') === -1) { // Slowing testing down in China where Google is blocked so giving an out
101+
var _gaq = _gaq || [];
102+
_gaq.push(['_setAccount', 'UA-617499-9']);
103+
_gaq.push(['_setDomainName', 'none']);
104+
_gaq.push(['_setAllowLinker', true]);
105+
_gaq.push(['_trackPageview']);
125106

126-
(function(){
127-
var ga = document.createElement('script');
128-
ga.type = 'text/javascript';
129-
ga.async = true;
130-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
131-
var s = document.getElementsByTagName('script')[0];
132-
s.parentNode.insertBefore(ga, s);
133-
})();
107+
(function(){
108+
var ga = document.createElement('script');
109+
ga.type = 'text/javascript';
110+
ga.async = true;
111+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
112+
var s = document.getElementsByTagName('script')[0];
113+
s.parentNode.insertBefore(ga, s);
114+
})();
115+
}
134116
</script>
135117
</body>
136118
</html>

npm-shrinkwrap.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "indexeddbshim",
3-
"version": "3.0.0-rc.5",
3+
"version": "3.0.0-rc.6",
44
"author": "Parashuram <[email protected]>",
55
"contributors": [
66
"Brett Zamir"

style.css

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)