diff --git a/bin/update-package-json-for-publish.js b/bin/update-package-json-for-publish.js index b5c1e993c2..2c5b70fc9f 100644 --- a/bin/update-package-json-for-publish.js +++ b/bin/update-package-json-for-publish.js @@ -62,7 +62,7 @@ modules.forEach(function (mod) { // Also add "module" member: https://github.com/rollup/rollup/wiki/pkg.module pkg['jsnext:main'] = pkg.module = './lib/index.es.js'; // whitelist the files we'll actually publish - pkg.files = ['lib', 'dist', 'tonic-example.js']; + pkg.files = ['lib', 'dist']; var jsonString = JSON.stringify(pkg, null, ' ') + '\n'; fs.writeFileSync(pkgPath, jsonString, 'utf8'); diff --git a/packages/node_modules/pouchdb/package.json b/packages/node_modules/pouchdb/package.json index 5bdc3568da..6a92f4b627 100644 --- a/packages/node_modules/pouchdb/package.json +++ b/packages/node_modules/pouchdb/package.json @@ -14,7 +14,6 @@ "jspm": { "main": "dist/pouchdb.js" }, - "tonicExampleFilename": "tonic-example.js", "keywords": [ "db", "couchdb", diff --git a/packages/node_modules/pouchdb/tonic-example.js b/packages/node_modules/pouchdb/tonic-example.js deleted file mode 100644 index de5bc03fc2..0000000000 --- a/packages/node_modules/pouchdb/tonic-example.js +++ /dev/null @@ -1,50 +0,0 @@ -// see documentation for more detail: http://pouchdb.com/api.html - -const PouchDB = require('pouchdb') -require('pouchdb/extras/memory') /* this is used here just for compatibility with Tonic. - you can omit this line and the {adapter: 'memory'} - in the next, then your databases will be saved to disk or - browser storage. - */ -// create a database (here with memory storage): -const db = new PouchDB('test', {adapter: 'memory'}) - -// create a new doc with an _id of 'mydoc': -let response = await db.put({ - _id: 'mydoc', - title: 'Heroes' -}) - -// update an existing doc using _rev -await db.put({ - _id: 'mydoc', - _rev: response.rev, - title: "Sound and Vision", -}) - -// later you can fetch your doc -console.log(await db.get('mydoc')) - -// or add many more docs -response = await db.bulkDocs([ - {_id: 'myotherdoc', title: 'The Magisters', type: "fake band"}, - {_id: 'another', title: 'Kowabunga', type: "fake band"}, - {title: 'Without an _id', type: null} -]) - -console.log('bulkDocs response: ' + JSON.stringify(response, null, 2)) - -// and query them -await db.put({ - _id: '_design/fakebands', - views: { - fakebands: { - map: (function (doc) { - if (doc.type == "fake band") { - emit(doc.title) - } - }).toString() - } - } -}) -await db.query('fakebands', {include_docs: true})