Skip to content

Commit

Permalink
(#2146) rename pouchdb-nightly.js to pouchdb.js
Browse files Browse the repository at this point in the history
Also add an update.json for auto-updating with
jsdelivr.
  • Loading branch information
nolanlawson committed Jun 8, 2014
1 parent 4c9bbf2 commit 46dcf47
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ We are currently building three adapters-as-plugins: `memory`, `localstorage`, a
* `localstorage`: based on [localstorage-down](https://github.com/no9/localstorage-down)
* `idb-alt`: based on [level-js](https://github.com/maxogden/level.js), will probably replace `idb.js` someday

These adapters are built and included in the `dist/` folder as e.g. `pouchdb.memory.js`. Including these scripts after `pouchdb-nightly.js` will load the adapters, placing them in the `PouchDB.preferredAdapters` list after `idb` and `websql` by default.
These adapters are built and included in the `dist/` folder as e.g. `pouchdb.memory.js`. Including these scripts after `pouchdb.js` will load the adapters, placing them in the `PouchDB.preferredAdapters` list after `idb` and `websql` by default.

<script src="pouchdb-nightly.js"></script>
<script src="pouchdb.js"></script>
<script>console.log(PouchDB.preferredAdapters); // ['idb', 'websql']</script>
<script src="pouchdb.memory.js"></script>
<script>console.log(PouchDB.preferredAdapters); // ['idb', 'websql', 'memory']</script>
Expand Down
2 changes: 1 addition & 1 deletion bin/dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (process.env.ADAPTERS) {
}

var indexfile = "./lib/index.js";
var outfile = "./dist/pouchdb-nightly.js";
var outfile = "./dist/pouchdb.js";
var perfRoot = './tests/performance/*.js';
var performanceBundle = './dist/performance-bundle.js';

Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {},
"development": {},
"license": "Apache",
"main": "dist/pouchdb-nightly.js",
"main": "dist/pouchdb.js",
"scripts": [
"dist/pouchdb-nightly.js"
"dist/pouchdb.js"
]
}
}
6 changes: 3 additions & 3 deletions component.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {},
"development": {},
"license": "Apache",
"main": "dist/pouchdb-nightly.js",
"main": "dist/pouchdb.js",
"scripts": [
"dist/pouchdb-nightly.js"
"dist/pouchdb.js"
]
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
},
"scripts": {
"build-js": "npm run build-main-js && npm run min && npm run build-plugins",
"build-main-js": "browserify . -s PouchDB > dist/pouchdb-nightly.js",
"min": "uglifyjs dist/pouchdb-nightly.js -mc > dist/pouchdb-nightly.min.js",
"build-main-js": "browserify . -s PouchDB > dist/pouchdb.js",
"min": "uglifyjs dist/pouchdb.js -mc > dist/pouchdb.min.js",
"build-plugins": "./bin/build-all-plugins.sh",
"build": "npm run version && mkdirp dist && npm run build-js",
"version": "node ./bin/get-version.js",
Expand Down Expand Up @@ -100,4 +100,4 @@
"es3ify"
]
}
}
}
2 changes: 1 addition & 1 deletion tests/browser.worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var sourceFile = window.location.search.match(/[?&]sourceFile=([^&]+)/);

if (!sourceFile) {
sourceFile = '../dist/pouchdb-nightly.js';
sourceFile = '../dist/pouchdb.js';
} else {
sourceFile = '../dist/' + sourceFile[1];
}
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body>
<pre style="width: 100%; height: 100%;" id="output"></pre>
<script src="/dist/pouchdb-nightly.js"></script>
<script src="/dist/pouchdb.js"></script>
<script src="/dist/pouchdb.localstorage.js"></script>
<script src="/dist/pouchdb.idb-alt.js"></script>
<script src="/dist/pouchdb.memory.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/stress/websql_storage_limit.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h3>Choose size in MB:</h3>
</form>
<p/>
<pre id="log"> </pre>
<script src="../../dist/pouchdb-nightly.js"></script>
<script src="../../dist/pouchdb.js"></script>
<script>

function getRadioValue() {
Expand Down
2 changes: 1 addition & 1 deletion tests/webrunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// use query parameter pluginFile if present,
// eg: test.html?pluginFile=memory.pouchdb.js
var preferredAdapters = window.location.search.match(/[?&]adapters=([^&]+)/);
var scriptsToLoad = ['../dist/pouchdb-nightly.js'];
var scriptsToLoad = ['../dist/pouchdb.js'];
if (preferredAdapters) {
preferredAdapters = preferredAdapters[1].split(',');
preferredAdapters.forEach(function (adapter) {
Expand Down
9 changes: 9 additions & 0 deletions update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"packageManager": "npm",
"name": "pouchdb",
"repo": "pouchdb/pouchdb",
"files": {
"basePath": "dist/",
"include": ["pouchdb.js", "pouchdb.min.js"]
}
}

0 comments on commit 46dcf47

Please sign in to comment.