toddmotto / fireshell

Fiercely quick front-end boilerplate and workflows, HTML5, Grunt, Sass.

Home Page:http://getfireshell.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yo fireshell - Yeoman

jamiebuilds opened this issue · comments

I wanted to throw this idea out there, I can make this contribution, but I'm not going to if nobody is interested.


Yeoman describes itself as "Modern Workflows for Modern Webapps", it uses npm, grunt, and bower to quickly generate scaffolding for projects. It has hundreds of generators for different kinds of projects (eg. ember, bootstrap, firefox-os).

Using the command yo [generator] [--options], you can create a file tree and install all your assets with npm install and bower install, then use grunt commands to compile assets, run your tests, and start a server.

Yeoman is a very powerful tool, but most generators are framework specific (eg. angular, wordpress, express), which is great they are all very useful for getting something quickly set up. However it would be nice to have more generators that are framework independent (eg. webapp, mobile).

For a list of generators: http://yeoman.io/community-generators.html

Many people write their own generators, sort of like having a dotfiles repository. There's even a yeoman generator for generating generators (inception).

Since Yeoman requires a certain directory structure, many projects choose to have a secondary repository for maintaining that structure (eg. h5bp).

Fireshell is already rolling with most of the tools inside yeoman except for yeoman itself. I encourage you to check out the ember generator as it is one of my personal favorites and has an excellent grunt setup.

I think it is in the roadmap to do this...

  • Create a Yeoman generator for FireShell

@simonwalsh ... (ノಠ益ಠ)ノ彡┻━┻

I can get started on this, and make a pull request to kick things off

Yep this is in the Roadmap, would be awesome TY! - https://github.com/toddmotto/fireshell#roadmap

@toddmotto Yeoman already provide all the workflow and generators that your fireshell provides. How can generator for fireshell will be helpful ?

Generator for FireShell would be cleaner for creating different spin offs of the main FS build. Angular FireShell, RequireJS FireShell, these setups would be great as generators.

@toddmotto Sorry, I am confused. Thats already prime feature of Yeoman and the feature you mentioned already handled well by yeoman. And the build system is pretty impressive as well.

In addition to that it would provide some nice command-line tools that could be extended as features are added (eg.):

$ yo fireshell [--coffee] [--karma] [--test-framework=[jasmine|qunit|etc]] [--css-preprocessor=[sass|less|stylus]] [...]
> ----
> Do you want XYZ? [Y/n] _

This cuts out the process of copying files manually, renaming stuff, customizing the grunt build yourself and setting up frameworks. In it's current state, fireshell is static where yeoman would make it dynamic.

It's not a prime feature because each Yeoman generator is a totally separate build/project - no two are the same and they are maintained individually. The Angular generator is a completely different setup to Web App for example.

FS brings a consistent setup for developers to switch between what they might be working on but setup identically but slightly tweaked to their requirements. Also more command-line friendly with auto-installs and commands for non-terminal people. As well as an optimised Sass/SCSS setup for those who need a modular CSS setup. It doesn't just cater for experienced developers.

@toddmotto @simonwalsh @creativeaura

An initial version that simply copies all the files it up at https://github.com/thejameskyle/generator-fireshell


To test:

First we have to get the necessary repos and link them with npm since this is not yet registered.

Clone and link the yeoman/generators repo:

mkdir -p ~/dev && cd ~/dev
git clone git@github.com:yeoman/generators.git
cd generators
npm link

Clone and link the thejameskyle/generator-fireshell repo:

cd ~/dev
git clone git@github.com:thejameskyle/generator-fireshell.git
cd generator-fireshell
npm link

Now link them together:

cd ~/dev/generators
npm link generator-fireshell

If you have not already installed yeoman, please do so with npm:

npm install -g yo

Test to see if the npm link worked:

You should see the fireshell:app generator

yo --help

Finally you can run the FireShell generator for the first time:

cd ~/dev
mkdir test && cd test
yo fireshell

Note: I was writing this comment off the top of my head so let me know if any of those steps didn't work and I'll update it, everything should work though it's all pretty simple stuff.

bueller?

Sorry man, I haven't had a chance to test yet. If anyone else has then feel free to get back to James before me :)

@thejameskyle Hey James, sorry for the ridiculously long length of time... What's the best way to integrate the generator you've created so it can sit alongside any FireShell core updates?

@toddmotto I haven't done much with yeoman since I made the fireshell generator, but I'm pretty sure it's out of date with the latest yeoman stuff.

Pretty much everything in fireshell lives inside of here, so just updating that directory and this file will keep everything up to date.

Although the main appeal of yeoman is to be able to continue using it as you're building an app, ie yo app:controller, yo app:model, etc. I'm not sure what kind of features like those you'd want to offer as part of fireshell.

That's the thing, moves very quickly! Thanks @thejameskyle !

This errored out on npm install -g generator-fireshell

ERR! 404 'generator-fireshell is not in npm registry

Did you move it?

It was never published.

Closing this as part of cleaning out old issues. Feel free to reopen.