yeoman/generator-mobile

Suggestions & feedback

Closed this issue · 10 comments

Thanks for trying out generator-mobile. We hope you've found this experiment in improving the mobile web development workflow useful.

If you had any suggestions for how we could improve the project or had requests for features you would like us to consider adding, please feel free to let us know.

We intend on using what we learn from this project to help us improve generator-webapp, the most commonly used Yeoman generator for new projects.

This looks great, thanks for releasing it.

grunt out of the box doesn't work because of all the jshint errors. It should probably ignore all the third party code.

shameless plug

Add https://github.com/dylang/grunt-notify so users will get desktop notifications when they run into problems and not need to keep a terminal window visible at all times. This is useful when used with LiveReload because you can hide the terminal and focus on the editor and browser.

grunt-notify-example

@gauntface can you confirm you're getting this too? grunt build works for me without issue but grunt fails as per above.

We'll certainly consider grunt-notify @dylang! Want to PR it? ;)

Just for some extra eyes, I'm testing this out now too :)

Addy, the problem seems to be JSHint is checking app/scripts/, and the generator is placing minified, library code and inconsistently-written examples in there. So, I believe there are two main routes to go here.

Using async.localStorage.js as an example...

  1. Include what's currently in scripts/ (such as async.localStorage.js and async.localStorage.examples.js) into their own folders (eg. scripts/lib/async-localStorage and scripts/lib/async-localStorage/example.js [or another examples folder]), then ignore scripts/lib from JSHint's radar, or

  2. use / register these libraries on bower to add them as proper bower_components.

It's never a good feeling having two places in your project with library code. But, I don't know where all of the libraries used came from / if they're on Bower.

Overall, I think what the generator puts in app/scripts needs to be more organized just for the user's understanding anyway.

@stephenplusplus good point.

We've tried to pull in everything from bower, but where it's not been possible we've pulled in a build of their project.

I think option 1 seems like the obvious bet for now but perhaps raising an issue on the projects will get us towards route 2.

@stephenplusplus thanks for your review. I agree that we should move ahead with 1) for now and work towards 2. Ideally everything we're using would be on Bower. We could create shim repos for them, but I'm happy to first suggest proper support to the authors of these packages to see if they would mind registering themselves.

We'll try to tackle 1) soon!

Set server access as an option for the generator for testing on mobile devices without manually setting the hostname in Gruntfile.js:

connect: { options: { port: 9000, // Change this to '0.0.0.0' to access the server from outside. hostname: '0.0.0.0' } }

As far as 1) goes above:

I moved the scripts not created by me into app/scripts/vendor and use bower for the rest. My hand coded scripts still drop into app/scripts
Here is my Gruntfile:
jshint: { options: { jshintrc: '.jshintrc' }, all: [ 'Gruntfile.js', '<%= yeoman.app %>/scripts/{,*/}*.js', '!<%= yeoman.app %>/scripts/vendor/*', 'test/spec/{,*/}*.js' ] },

Closing all issues related to legacy version as this generator is now based on Web Starter Kit.
Thanks to everybody!