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

Automatically depend on level.js with browserify #6

Closed
piranna opened this issue Feb 14, 2014 · 11 comments
Closed

Automatically depend on level.js with browserify #6

piranna opened this issue Feb 14, 2014 · 11 comments

Comments

@piranna
Copy link

piranna commented Feb 14, 2014

It would be good to add a browser field on package.json that when using browserify automatically uses level.js instead of levelDown as storage, instead of depend on the developer to do the checks and imports by hand.

@juliangruber
Copy link
Member

That would mean level.js has to be a dependency of level and will be installed even if it's not necessary, I'm not sure if we want that. Then we'd also have to "officially support" level.js and issues will be opened on this repo.

@piranna
Copy link
Author

piranna commented Feb 14, 2014

Yes, sort-of what are you doing, but automatically. I'm also thinking if this shouldn't be done directly on the levelUp library...

P.D.: levelGraph seems really cool! ;-)

@rvagg
Copy link
Member

rvagg commented Feb 14, 2014

I'd rather see another package for browser use because the problem here is that if you simply want to use it in the browser then it's going to still download and try and install leveldown which is not at all what you want. Once people start saying that you should install level to be able to use it all in the browser then we're going to get reports from people who can't do native builds on their system (Windows users without all the painful dependencies and Mac users without xcode or with xcode badly installed).

@heapwolf
Copy link

@piranna perfect idea for a new module! :)

@piranna
Copy link
Author

piranna commented Feb 14, 2014

Yeah, it makes sense, better to do it by hand when required, I only though it would be useful to do it automatically by the library, but it's true it would leave more problems that solutions. Clossing.

@piranna piranna closed this as completed Feb 14, 2014
@dominictarr
Copy link

need a level-browserify module, like https://github.com/dominictarr/canvas-browserify which allows require('canvas-browserify') to work the same in the browser and the server.

@rvagg
Copy link
Member

rvagg commented Feb 15, 2014

we can do this under the Level org on github if someone wants to take responsibility for it. level-packager could do the heavy-lifting of piecing the bits together like it does for the other level/level-hyper/level-basho/level-rocksdb etc. releases.

any takers? @piranna perhaps?

@rvagg rvagg reopened this Feb 15, 2014
@mcollina
Copy link
Member

@ralphtheninja
Copy link
Member

👍

@mcollina
Copy link
Member

I'm closing this! Please test the new module and report any bugs!

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

No branches or pull requests

7 participants