Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#5295) - Add pouchdb-collate to monorepo #5476

Merged
merged 1 commit into from
Jul 28, 2016
Merged

Conversation

daleharvey
Copy link
Member

[skip ci]

@daleharvey
Copy link
Member Author

daleharvey commented Jul 15, 2016

So working on this but cant get it to build, putting a WIP in case anyone has any pointers, error is

~/src/pouchdb (pouchdb-collate)$ npm run build

> pouchdb-monorepo@0.0.0 build /Users/daleharvey/src/pouchdb
> lerna bootstrap && npm run build-modules && npm run build-test

Lerna v2.0.0-beta.9
Linking all dependencies
Successfully bootstrapped 34 packages.

> pouchdb-monorepo@0.0.0 build-modules /Users/daleharvey/src/pouchdb
> node bin/build-modules.js

Building pouchdb...
Building pouchdb-adapter-fruitdown...
Building pouchdb-adapter-http...
Building pouchdb-adapter-idb...
Building pouchdb-adapter-indexeddb...
Building pouchdb-adapter-leveldb...
Building pouchdb-adapter-leveldb-core...
Building pouchdb-adapter-localstorage...
Building pouchdb-adapter-memory...
Building pouchdb-adapter-node-websql...
Building pouchdb-adapter-utils...
Building pouchdb-adapter-websql...
Building pouchdb-adapter-websql-core...
Building pouchdb-ajax...
Building pouchdb-binary-utils...
Building pouchdb-browser...
Building pouchdb-checkpointer...
Building pouchdb-collate...
Building pouchdb-collections...
Building pouchdb-core...
Building pouchdb-errors...
Building pouchdb-for-coverage...
Building pouchdb-generate-replication-id...
Building pouchdb-http...
Building pouchdb-json...
Building pouchdb-mapreduce...
Building pouchdb-mapreduce-utils...
Building pouchdb-md5...
Building pouchdb-merge...
Building pouchdb-node...
Building pouchdb-promise...
Building pouchdb-replication...
Building pouchdb-utils...
Building sublevel-pouchdb...
build error
Error: Could not load null: path must be a string or Buffer
    at /Users/daleharvey/src/pouchdb/node_modules/rollup/dist/rollup.js:7340:10
    at Array.<anonymous> (/Users/daleharvey/src/pouchdb/node_modules/lie/lib/index.js:88:21)
    at nextTick (/Users/daleharvey/src/pouchdb/node_modules/immediate/lib/index.js:61:18)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Guessing its because this isnt ES5 contained in /src? just plain JS in /lib, I would prefer if we do not have to use ES6 for the more trivial things so if we can have it working as is it would be great. if thats a massive problem then will this work if I switch to es6?

@daleharvey
Copy link
Member Author

Just to test I added pouchdb-collate to external deps to see if it would avoid building

@nolanlawson
Copy link
Member

nolanlawson commented Jul 15, 2016

Yeah looks like you didn't even check in the lib files because they're .gitignored. My assumption with the Lerna setup was that every sub-project is ES6, so I think in this case what we should do is write a src/index.js and use ES6 exports.

One advantage of this is that when pouchdb is bundled, pouchdb-collate will be flattened out by Rollup and thus give us a smaller bundle size.

@daleharvey
Copy link
Member Author

ok switched this to ES6 and looks to be working, I think it would be nice to not require ES6 for some trivial code, but at this point its probably not worth the extra work.

@nolanlawson nolanlawson merged commit 5c27664 into master Jul 28, 2016
@nolanlawson
Copy link
Member

👍

@daleharvey daleharvey deleted the pouchdb-collate branch October 3, 2016 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants