(#6593) - Update to rollup with new API
diff --git a/bin/build-pouchdb.js b/bin/build-pouchdb.js
index 26e72de..c6e95ce 100644
--- a/bin/build-pouchdb.js
+++ b/bin/build-pouchdb.js
@@ -96,13 +96,14 @@
}).then(function (bundle) {
return Promise.all(Object.keys(formatsToFiles).map(function (format) {
var fileOut = formatsToFiles[format];
- var code = bundle.generate({format: format}).code;
- if (DEV_MODE) {
- var ms = Math.round(process.hrtime(start)[1] / 1000000);
- console.log(' took ' + ms + ' ms to rollup ' +
- path.dirname(entry) + '/' + path.basename(entry));
- }
- return writeFile(addPath('pouchdb', fileOut), code);
+ return bundle.generate({format: format}).then(function (bundle) {
+ if (DEV_MODE) {
+ var ms = Math.round(process.hrtime(start)[1] / 1000000);
+ console.log(' took ' + ms + ' ms to rollup ' +
+ path.dirname(entry) + '/' + path.basename(entry));
+ }
+ return writeFile(addPath('pouchdb', fileOut), bundle.code);
+ });
}));
});
}
diff --git a/package.json b/package.json
index e8891c4..54afaf0 100644
--- a/package.json
+++ b/package.json
@@ -98,7 +98,7 @@
"query-string": "4.3.3",
"replace": "0.3.0",
"rimraf": "2.6.1",
- "rollup": "0.43.1",
+ "rollup": "0.45.2",
"rollup-plugin-inject": "2.0.0",
"rollup-plugin-node-resolve": "2.1.0",
"rollup-plugin-replace": "1.1.1",