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

extending Backbone.D3View onto Backbone.View #7

Closed
dreamalligator opened this issue Sep 8, 2016 · 1 comment
Closed

extending Backbone.D3View onto Backbone.View #7

dreamalligator opened this issue Sep 8, 2016 · 1 comment

Comments

@dreamalligator
Copy link

dreamalligator commented Sep 8, 2016

Load Backbone.D3View with your favorite module loader

Hi, I know backbone is really hands off on implementation and leaves it to the user, but a few examples of loading backbone.d3view could greatly help the community. For example, requiring Backbone with the following is okay with my browserify implementation; Backbone = require("backbone"), but the same with D3View confuses me. Any advice is greatly appreciated! thanks.

Backbone = require("backbone")
Backbone.D3ViewMixin = require("backbone.d3view")
_ = require("underscore")
_.extend(Backbone.View.prototype, Backbone.D3ViewMixin)

edit: I made a similar stack overflow question here and will close both questions when either is answered.

related: akre54/Backbone.NativeView#22

path-wise things should be fine according to node-browserify

You can use relative paths like './foo.js' and '../lib/bar.js' or module paths like 'gamma' that will search node_modules/ using node's module lookup algorithm.

@dreamalligator dreamalligator changed the title extending Backbone.D3View onto Backbone.View extending Backbone.D3View onto Backbone.View Sep 8, 2016
@dreamalligator
Copy link
Author

I'm marking this resolved, my issue had to do with file structure and order of compilation. Thanks! Looking forward to using D3View or NativeView, whichever fits best :)

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

1 participant