Re: [angular.js] [ANN] angular-brunch-seed

542 views
Skip to first unread message

Paul Hammant

unread,
Jul 19, 2012, 3:27:02 PM7/19/12
to ang...@googlegroups.com
Hi Kyle,

I cloned, and got as far as ...

PH7785:angular-brunch-seed paul$ ./scripts/server.sh
19 Jul 12:23:10 - info: application started on http://localhost:3333/

child_process.js:789
    throw errnoException(errno, 'spawn');
          ^
Error: spawn EMFILE
    at errnoException (child_process.js:837:11)
    at ChildProcess.spawn (child_process.js:789:11)
    at exports.spawn (child_process.js:614:9)
    at Object.exports.execFile (child_process.js:506:15)
    at exports.exec (child_process.js:477:18)
    at growl (/scm/oss/angular-brunch-seed/node_modules/brunch/node_modules/growl/lib/growl.js:187:3)
    at Object.logger.error (/scm/oss/angular-brunch-seed/node_modules/brunch/lib/logger.js:66:9)
    at module.exports.FileList._compile (/scm/oss/angular-brunch-seed/node_modules/brunch/lib/fs_utils/file_list.js:123:25)
    at module.exports.SourceFile.compile (/scm/oss/angular-brunch-seed/node_modules/brunch/lib/fs_utils/source_file.js:92:22)
    at module.exports.LESSCompiler.compile (/scm/oss/angular-brunch-seed/node_modules/less-brunch/lib/index.js:49:16)

I'm Mac, Node v0.8.2 via homebrew, and NPM 1.1.44 (via the regular install script)

Thoughts?


- Paul

On Thu, Jul 19, 2012 at 12:23 PM, Kyle Finley <kylef...@gmail.com> wrote:
I've put together an angular seed project that uses Brunch. 

If you don't know about Brunch you can read about it at http://brunch.io

Some of the features of angular-brunch-seed include:

* Coffeescrpt / LESS / SASS / SCSS / Stylus automatically compiled on save
* Auto-reload during development saves you from manually refreshing the page
* Javascript / CSS minification for production
* testacular integration for unit tests
* Bootstrap integration with themes.

Theres still some rough edges, but I wanted to get it out so I could get feedback. If you questions or suggestions I would love to hear them. Either reply here or on the issue tracker https://github.com/scotch/angular-brunch-seed/issues.


Thanks,

- Kyle


Some of the issues I'm still working on are:

1. Writing unit tests for controllers. The way I'm loading controllers is different from the seed so I'm not sure how to test.:
2. Setting up e2e testing. I'm using testacular so I'm not sure what the best way to integrate the e2e test would be.
3. Jade compiling. I would like to have Jade templates automatically convert HTML when copied to the _public folder.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/0pHEHfP4NEkJ.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.

Paul Hammant

unread,
Jul 19, 2012, 5:05:59 PM7/19/12
to ang...@googlegroups.com
Hi Kyle, that fixed it.

Questions: Why are you going for partials?  To me part of the stroke of genius that Angular represents is the all view logic latent in a page, with decoupled data, interopping with the backend using decent Restful wire contracts.

I'm interesting in seeing how this pans out. Specifically what's Jade and what's Angular.

- Paul

On Thu, Jul 19, 2012 at 2:43 PM, Kyle Finley <kylef...@gmail.com> wrote:
Hi Paul,

Thanks for trying it out.

I haven't seen this error myself, but this seems to be common issue with brunch. So much so that they address it in their FAQ

I get EMFILE error when I build Brunch project. WTF?

EMFILE means there're too many open files. Brunch watches all your project files and it's usually a pretty big number. You can fix this error with setting max opened file count to bigger number with command ulimit -n <number> (10000 should be enough).

If that doesn't fix it please let me know. Also, since you have seen this issue I'll add the a note to the README.

Thanks,

-Kyle

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/Vc4hOAhKLSsJ.

jonah...@gmail.com

unread,
Aug 19, 2012, 12:43:47 AM8/19/12
to ang...@googlegroups.com
Kyle, thanks for putting together a great seed. I got up and running really quickly.

One, I figured out how to get access to the controllers in the unit tests (I saw you had a todo about that in the code). If you'd like I can build out the seed a little bit to show how that works.

Also, regarding the issues with compiling jade, it seems that jade's built in watch functionality currently doesn't support directories. But it does work if you give it a glob of all the files you want to watch. So I've been using a command like this to watch my jade assets for changes:

jade app/assets/partials/* app/assets/index.jade --watch

Hopefully you can figure out how to get Brunch to let you compile assets and then copy them over, but until then, hopefully this helps anyone who hit this issue.

Lastly, I saw you mentioned you were building a bigger seed (sprout?) with user auth. I've been working on that today and I'd love to compare notes. Ping me if you're interested.

Jonah

On Thursday, July 19, 2012 7:57:21 PM UTC-4, Kyle Finley wrote:
Thanks Brian,

Please let me know if you have any issues, or suggestions.

-Kyle

Kyle Finley

unread,
Aug 19, 2012, 10:29:26 AM8/19/12
to ang...@googlegroups.com
Hi Jonah,

Kyle, thanks for putting together a great seed. I got up and running really quickly.

I'm glad to hear that.

One, I figured out how to get access to the controllers in the unit tests (I saw you had a todo about that in the code). If you'd like I can build out the seed a little bit to show how that works.

That would be great! If there is anything else that you think can be improved please include that as well.

Also, regarding the issues with compiling jade, it seems that jade's built in watch functionality currently doesn't support directories. But it does work if you give it a glob of all the files you want to watch. So I've been using a command like this to watch my jade assets for changes:

jade app/assets/partials/* app/assets/index.jade --watch

Hopefully you can figure out how to get Brunch to let you compile assets and then copy them over, but until then, hopefully this helps anyone who hit this issue.

Thank you, I hadn't realized that jade now hows watch support. I've updated the seed.

Lastly, I saw you mentioned you were building a bigger seed (sprout?) with user auth. I've been working on that today and I'd love to compare notes. Ping me if you're interested.

Excellent. I'll put together a starter app today. What are you using for your backend? 

I plan on supporting two:

(1) Go - for performance and App Engine compatibility
(2) Node - for developer familiarity, rapid development

If you are using something else that would work well, too. The idea is to have a single frontend app that interact with any backend that implements a common set of actions and url end points.

Since your using this, I would really like to get your feedback on the overall structure of things too. Brunch 1.4 just added scaffolding https://github.com/scotch/angular-brunch-seed/issues/3 so I would like to incorporate it somehow, but I'm not completely sold on the current structure i.e.

app /
   services.coffee
   controllers.coffee

I'm wondering if something like:

app /
   services /
      user.coffee
   controllers /
      user.coffee

might be a better, more modular, approach. Any thoughts you have would be greatly appreciated. 

Thanks again for the feedback, and I'll post back here once I have the User auth app on github

- Kyle

Jonah

On Thursday, July 19, 2012 7:57:21 PM UTC-4, Kyle Finley wrote:
Thanks Brian,

Please let me know if you have any issues, or suggestions.

-Kyle

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.

Anatoly Ostrovsky

unread,
Apr 19, 2013, 11:09:13 AM4/19/13
to ang...@googlegroups.com
Awesome work Kyle! I am porting an existing Grails/Angular-seed app into your skeleton and so far the results are great.

Is it possible to use plain *.js alongside *.cs and maybe have scripts/cs and scripts/js folders? I don't mind the porting (if fact, I am glad YOU have forced me to the port) but most Angular examples are in js, so for quick and dirty hacks the cs convention is an overkill.

Cheers

Toly

Kyle Finley

unread,
Apr 19, 2013, 2:01:37 PM4/19/13
to ang...@googlegroups.com
Hey Toly,

Yes, generally you can add javascript support to angular-brunch-seed by adding:

    "javascript-brunch": ">= 1.5 < 1.6",

to your dependencies in package.json and running ./script/init.sh

However, I just tested this and it appears that a bug was introduced that's preventing this. I've created an issue:

Sorry for the inconvenience. I'll update the issue and this thread once it's resolved. 


- Kyle


--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/w7i_o1xExJM/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages