-
Notifications
You must be signed in to change notification settings - Fork 80
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
Some browserify transform config issue? #59
Comments
I do remember I had this problem when I was trying to use |
The offending line is |
i wonder if there is a good way to get the equivalent of |
there is no |
@maxogden - That is true You are right, I'm not using (function(root, factory) {
var $ = require('jquery');
var Backbone = require('backbone');
Backbone.$ = $;
var Marionette = require('backbone.marionette');
var Radio = require('backbone.radio');
var _ = require('lodash');
module.exports = factory(Marionette, Radio, _);
}(this, function(Marionette, Radio, _) {
'use strict';
Marionette.Application.prototype._initChannel = function () {
this.channelName = _.result(this, 'channelName') || 'global';
this.channel = _.result(this, 'channel') || Radio.channel(this.channelName);
}
})); in this shim I Is it possible to make a feature in requirebin to use shims for packages BEFORE they are required? |
@ganchenkor the answer to your question is https://github.com/substack/node-browserify#browserifytransform |
I'm familiar how to use browserify transforms. How can I use it in http://requirebin.com ? We don't have access to |
@ganchenkor requirebin doesn't actually browserify the code from the editor in the requirebin web app, it only browserifies all of the require()'d dependencies. so you'd have to e.g. add a transform section to https://github.com/ganchenkor/marionette-browserify/blob/master/package.json to have a browserify transform run on that module |
I don't have any problems in my repo. I can't load Marionette in Requirebin. That's all |
For the record, we're aware of this issue over in Marionette. We weren't including jQuery, because Backbone should be including it – but it doesn't. In a future release, though, we plan to make the jQuery dependency explicit within Marionette. So this should be less about making Marionette work / debugging Marionette, and more about if this is a feature that requirebin should have. |
That's what I'm trying to say. Thank you @jmeas |
The only way to support this with the current implementation of requirebin would be to publish https://github.com/ganchenkor/marionette-browserify to npm with the corrent transforms in it's package.json. That way when you Otherwise we'd need to first make requirebin browserify the editor code and then add a feature on top of that that let the user install and run transforms during that browserification. I think this would be a lot of work so it's likely not going to get done unless someone here wants to take it on. |
Ok https://github.com/ganchenkor/marionette-browserify Done with this repo. Tonight will publish it on npm so we can use that in requirebin. Thank you @maxogden. But anyways, I will put that on my list to-do to see if I can find some time to learn source code of requirebin and suggest pull request for implementing custom browserify transforms. |
I just applied shim instead of using browserify-transports. |
http://requirebin.com/?gist=bfdb60970710de06aebc
For some reason it can't resolve and assign
Backbone.$ = $
while if I test it locally it works
https://github.com/ganchenkor/marionette-browserify (It uses default browserify, NOT browserify-cdn)
The text was updated successfully, but these errors were encountered: