scotch / angular-brunch-seed

AngularJS + Brunch
Other
228 stars 78 forks source link

Current master is not building #49

Closed exlee closed 10 years ago

exlee commented 11 years ago

Downloaded it today from master and it seems it doesn't build at all (or takes very long to do so, longer that I was waiting).

kylefinley commented 11 years ago

@exlee,

I'm sorry that you were having troubles with the build. Was it the ./scripts/init.sh or the ./scripts/server.sh that was giving you trouble? The init.sh script can take a long time, especially if you haven't downloaded some of the required node modules before. If this is the problem would you mind trying again, but watch your bandwidth to see if that the bottle neck?

As for the the server.sh script. The initial load can take some time as well. On my machine (1.8 GHz Core 2 Duo) it takes around 20 seconds. However, subsequent loads (file changes) load within a second or two. Also, if the page doesn't render correctly on the initial load you might have to refresh it.

➜  angular-brunch-seed-master  ./scripts/server.sh
25 Feb 13:56:59 - info: application started on http://localhost:3333/
25 Feb 13:57:20 - info: compiled in 20667ms
25 Feb 13:57:22 - info: compiled in 1557ms
25 Feb 13:57:23 - info: compiled in 847ms

I appreciate you bringing this to my attention, I really want to get to the botom of this so -- at the very least -- we can document this as expected behavior.

Thanks for your time,

Kyle

exlee commented 11 years ago

Hi,

I just filled it for my friend - he wants so start with Angular so I recommended him your brunch. Anyway, we (as I repeated the steps) didn't take the init.sh route since in readme there is information it's not necessary when ran initialized through brunch

(...) Or if you have Brunch installed run:

brunch new myapp --skeleton https://github.com/scotch/angular-brunch-seed

After your reply I ran init and it took quite a while:

real 3m1.198s

After that the initial build process took 20s which is what I'm used to and so I think the whole problem boils down to missing information in readme.

On the other hand - why going with Bower? From what I read Brunch is going to incorporate Component(1) soon. Was it hard to implement in brunch? (I was wondering about implementing it in my brunch, but decided to take easy way as for now).

kylefinley commented 11 years ago

I'm glad that you were able to get it working. I'll investigate the brunch new .. approach, that should work as well, If I can't get it to work I'll remove it from the docs.

why going with Bower? From what I read Brunch is going to incorporate Component(1) soon.

Here's a comment where @paulmillr discuses component vs brunch. Basically he says that he's had some issue with component's require statement. I think that Bower is probably a better fit for Angular as well, since Angular has dependency injection, the require statements are somewhat redundant.

Was it hard to implement in brunch? (I was wondering about implementing it in my brunch, but decided to take easy way as for now).

I suspect it was. Luckily @GulinSS did the work :). He created Brunch plugins, though, so you should be able to use them in your branch.

Would you mind sending me a pull request with your branch added to the Alternative branch section of the README? I think it's great to give people options.

Also, I'll add a note on the build time.

exlee commented 11 years ago

Sure do, I'll do it soon.

I just got a word from a friend who waited (after doing init) for 10 minutes and build process couldn't happen. He's on Windows and I think it might be an issue. I'll get more information from him and I'll let you know what went wrong.

kylefinley commented 11 years ago

Yeah, let me know what you find out.

I added some notes to the README about the slow build process. I tested brunch new and it worked, but it did take quite awhile. I think the main issue is that with brunch new there's not feedback in the console so you can't tell what's been downloaded. It took ~3min.

For me, the bower install, took majority of the time. ~7min

Also, I went ahead and added brunch-on-asteroids to the README. Send me pull request, though, If you would like a different description.

exlee commented 11 years ago

We're investigating the issue further, it seems that on Windows process hangs during tests processing: http://screencast.com/t/ulN2765Wks

After deleting the tests directory we found out that "vendor" directory doesn't exists (init.bat on Windows doesn't create it) - at least we got some error message :)

Long story short - no matter the tries on Windows machine vendor directory doesn't populate - I sent him generated by myself and everything works. I have no idea if that's bower problem or one of the brunches, it would be good however to track the issue and notify the author of the appropriate solution. Unfortunatelly I by myself don't have the access to Windows development machine.

As for README - it's great, thanks. I'll add alternatives to my README later today.

kylefinley commented 11 years ago

Thanks for investigating this. I'm not sure what would cause the build to hang on that testing directory, that's interesting.

As for the vendor directory I'll add it back. Once issue #50 is resolved this won't be an issue.

Thanks again,

Kyle

clkao commented 11 years ago

Was just trying out the latest seed, and master isn't work for me after bower install finished:

node_modules/.bin/brunch watch 06 Apr 16:12:18 - error: [TypeError: Arguments to path.join must be strings]

This is apparently caused by bower-javascript-brunch, as removing it from package.json allows brunch build to work.

es128 commented 11 years ago

:+1:

I experienced the same error as @clkao yesterday.

kylefinley commented 11 years ago

@clkao & @es128,

Thanks for reporting. This is fixed in bower-javascript-brunch it just needs to pushed to npm.

As a temporary fix you can change package.json to:

{
    // ...
    "bower-stylesheet-brunch": "git://github.com/GulinSS/bower-stylesheet-brunch/#master",
    "bower-javascript-brunch": "git://github.com/GulinSS/bower-javascript-brunch/#master",
    // ...
}
paulmillr commented 11 years ago

Folks, i’m very curious: how had the bower integration worked out? What are the negative consequences you’ve noticed except the brunch new time (this can be resolved by making it log everything it does)?

I’m really thinking of integrating it in 1.7.x.

kylefinley commented 11 years ago

@paulmillr

I think overal Bower works well with Brunch. The biggest issue that I have had is that we are currently using the vendor directory for components. Ideally components/ and vendor/ would live separately. Having them mixed together creates some issues. I think this pul request might get us closer to that goal, however.

I, too, would lover to hear everyone else's thoughts on the integration.

clkao commented 11 years ago

I was also looking at the use of bower. While bower is being a bit lame as @paulmillr previously mentioned, the asserts (asset?) plugin seems to be a decent workaround, though a bit bloated for having to define the mapping repeatedly in different projects.

All we need is some kind of shared registry for bower components that define what assets are being provided. Oh, and I suppose we can use bower to distribute/install such metadata. ;)

paulmillr commented 11 years ago

All we need is some kind of shared registry for bower components that define what assets are being provided

And I think we got it! Some bower packages have “main” property and “styles” / “javascripts”: example.

Brunch can throw an error if trying to install package, component.json of which has no idea what is provided. Or if there is no component.json at all. This way folks will be encouraged to add these properties.

kylefinley commented 10 years ago

Commit 4cffcba08874a5b101fb0ffd9b85f63576804ff6 (v0.4.0) adds use Brunch 1.7.0-pre which has a lot of improvements, including native bower support.

Thanks to @paulmillr

I think that release should resolve this issue. If any one is still have problems please reopen or create an new issue