(#3688) - correctly es3ify

es3ify is not really doing what we want it to do. When used as a
browserify transform, it is unsafe, because it only applies to
OUR OWN code, not necessarily dependencies.

Furthermore, it's been causing problems from day one due to weirdnesses
where projects that depend on PouchDB and browserify it themselves
also need to require es3ify directly. That's not cool.

My fix is to use es3ify in the same way that we use derequire - i.e.
just as a command-line tool when building, which runs over the entire
file.

I've manually confirmed that this outputs es3ified code and fixes #3688.
3 files changed
tree: babd74e244db04f4cf1f0c00da7dd053ec4d6850
  1. bin/
  2. docs/
  3. lib/
  4. scripts/
  5. tests/
  6. .gitignore
  7. .jshintignore
  8. .jshintrc
  9. .npmignore
  10. .travis.yml
  11. bower.json
  12. component.json
  13. CONTRIBUTING.md
  14. LICENSE
  15. package.json
  16. README.md
  17. TESTING.md
README.md

PouchDB - The Javascript Database that Syncs

Build Status

PouchDB was written to help web developers build applications that work as well offline as well as they do online, applications save data locally so the user can use all the features of an app even while offline and synchronise the data between clients so they have up to date data wherever they go.

PouchDB is a free open source project, written in Javascript by these wonderful contributors and inspired by Apache CouchDB.

Using PouchDB

To get started using PouchDB check out our Documentation and the API Documentation.

Contributors

If you want to get involved then check out the contributing guide

Example

var db = new PouchDB('dbname');

db.put({
 _id: 'dave@gmail.com',
 name: 'David',
 age: 68
});

db.changes().on('change', function() {
  console.log('Ch-Ch-Changes');
});

db.replicate.to('http://example.com/mydb');