Skip to content

Subscribe to broccoli builds (watcher) from Brocfile#180

Closed
joefiorini wants to merge 1 commit intomasterfrom
broccoli-notifier
Closed

Subscribe to broccoli builds (watcher) from Brocfile#180
joefiorini wants to merge 1 commit intomasterfrom
broccoli-notifier

Conversation

@joefiorini
Copy link
Contributor

This allows server-side integration of ember-cli by symlinking or copying the final built tmp dir to a public folder in the server-side app. I'm thinking I may eventually pull this out into its own module as a broccoli plugin, but for now I think it makes sense in here. @stefanpenner are you cool with me pulling this in?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Travis failure is do to a missing semicolon here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh, thanks @rjackson!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure to subscribe to error as well, something like:

.on('error', function(error) {
  console.log(chalk.red(error.message), error.stack);
});

@joefiorini
Copy link
Contributor Author

Wow, apparently I'm worthless without JSHint. Had it disabled in my editor and missed a ton of little things. All fixed up now, @stefanpenner this look good?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated to your commit, but we should denodify once at the top

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@stefanpenner
Copy link
Contributor

so i like everything, but the actual symlinking. I really think the happy path is proxing.

@joliss I would love your input.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The denodeify above presumably breaks this .limit setting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joliss
Copy link
Contributor

joliss commented Mar 28, 2014

Yes, copying stuff into an app's public dir seems like too brittle a strategy.

As for proxying, my worry is that you always need an internal unused port between the app and Broccoli, so we have a failure point, but it still seems reasonable in general.

My sense is that tighter integration with the backend might generally be best - through a middleware or so, similar to how Sprockets works in Rails - but it may not be feasible to do for every backend in the world.

</general-thoughts>

@joefiorini
Copy link
Contributor Author

I must be naive, why is symlinking or copying a bad idea?

-- 
Joe Fiorini

On March 28, 2014 at 3:32:48 PM, Jo Liss (notifications@github.com) wrote:

Yes, copying stuff into an apps public dir seems like too brittle a strategy.

As for proxying, my worry is that you need an internal unused port between the app and Broccoli, but it still seems reasonable in general.

My sense is that tighter integration with the backend might generally be best - through a middleware or so, similar to how Sprockets works in Rails - but it may not be feasible to do for every backend in the world.


Reply to this email directly or view it on GitHub.

@joliss
Copy link
Contributor

joliss commented Mar 28, 2014

It just doesn't feel right to me. I may be wrong though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should just use an event emitter c/d ?

@joefiorini
Copy link
Contributor Author

Thought about that, just didn't like the API it provides. Probably being too picky. I can change it.

@joefiorini
Copy link
Contributor Author

I'm finding myself coming around to the idea of using a proxy. If I get some time today I'll try an alternative approach with a proxy instead of this. If it works and seems good we'll close this one and go with that. Cool?

@stefanpenner
Copy link
Contributor

@joefiorini sounds good. I am a advocate of the proxy idea.

@joefiorini
Copy link
Contributor Author

Killing this now. The proxy solution is much better. What was I thinking? ❓

@joefiorini joefiorini closed this Apr 3, 2014
@stefanpenner stefanpenner deleted the broccoli-notifier branch April 3, 2014 18:18
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.

5 participants