Skip to content

Yeoman MEAN.JS Generator (duplicate functionality) #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kjellski opened this issue Apr 6, 2014 · 7 comments
Closed

Yeoman MEAN.JS Generator (duplicate functionality) #163

kjellski opened this issue Apr 6, 2014 · 7 comments
Labels

Comments

@kjellski
Copy link

kjellski commented Apr 6, 2014

Hey there Tyler and other maintainers,

did they talk to you? I've just seen this: http://meanjs.org/generator.html
Was a bit caught off guard to be honest ;)

But have a look... what's the difference other then folder structure?

@DaftMonk
Copy link
Member

DaftMonk commented Apr 6, 2014

Hey Kjellski,

They did email me a while ago saying they were working on a generator. It looks pretty cool, and I'm going to try it out later today and see how it is. I'll report back on what I find.

I would like to talk about the direction I've been thinking about going with the fullstack generator. I don't think a behemoth generator that makes all the decisions for you is a good idea. It's fine to have it select default options, but I think almost everything should be customizable. That's why if I continue to work on this project, I would like to start breaking it up into multiple smaller generators.

Each generator should be configurable by adding a block to a yo-rc.json file. This would keep track of all the paths, selected prompts, preprocessors, that the generators use.

There would be a main generator that ties all these different generators together and runs them in sequence, after first creating a yo-rc.json file with certain default options. This would allow you to have the same ease of use as with current project generators, but would allow you to change all the defaults.

The generators I'm thinking of would be:

Components

generates the directives/services/controllers in an angular app. Serves the purpose of the sub generators that are built in the angular and angular-fullstack generators.

Configuration from yo-rc: configure folder structure that project uses, where app.js is for adding routes, preprocessors, etc.

Grunt and/or Gulp configs

generates the grunt configuration blocks for your gruntfile. When you run the generator it asks you what grunt configurations you would like to include, and can use checkboxes to select the ones you want. You can also rerun the generator to add configurations you didn't add previously.

Configuration from yo-rc: setting up all the path variables that will be required for the tasks to run correctly, i.e, index file, images, scripts, css. Save your prompt selections.

Angular App

Would generate the app.js, index.html files. Allows you to configure what modules you will be using in the app and adds them to your app.js. Much larger selection than currently, including restangular, angular-ui, ui-router.

Configuration from yo-rc: preprocessors. Save prompt selections. paths to images/scripts/styles.

Express generator

Creates the server app. Includes sub generators for models, controllers, routes.

Configuration from yo-rc: preprocessors, database, etc..

Fullstack

The main generator that ties them all together. Would generate a standard configuration for all the different generators. Would run each of the generators in sequence and display their prompt screens.

Ideally, if all the generators are modular enough, you could completely change configurations for the different generators, or completely replace one of the generators. I think this approach would make the entire project more maintainable and give users a lot more control.

@kjellski
Copy link
Author

kjellski commented Apr 7, 2014

That sounds really great and I think it's one step ahead in comparison to many other generators.
It's a good idea to split the project up into smaller ones, but the question was more directed at the situation that this other generator basically dublicates this functionality here... wether it's splitted or not.

Nevertheless, I like this ones folder structure more right now and I would like to suggest another feature which would be really great. while we're at it, we could add another custom config the to .yo-rc that allows someone to exchange the templates used for the generation itself. If this would be possible, it would benefit the argument that you could use the generator at the start of a project a lot.

@DaftMonk
Copy link
Member

DaftMonk commented Apr 8, 2014

I just tried their generator and I have to say I'm very impressed with it. I'd say it's big improvement over the mean.io boilerplate. Unfortunately I couldn't get their sub-generators working, but I'm not sure if that was my problem or not.

I would say there is quite a bit of duplicate functionality right now, which would be all the more reason to make big changes to this generator to differentiate the two.

Customizable templates would be awesome. If the default templates are easy to overwrite, it would allow for a lot of diversity in how projects are generated.

@kjellski
Copy link
Author

kjellski commented Apr 8, 2014

Yes, I think that would be my main point of concern. Like in other frameworks, a configurable folder path for templates to be used, if existent, use that one from there...

Have you talked with them about maybe merge the two together after splitting this one up in subgenerators? That would be best I think...

@fiznool
Copy link

fiznool commented Apr 10, 2014

Having just been evaluating a few MEAN generators today, I see that this generator builds files for production (i.e. concatenate and minify) whereas the one at http://meanjs.org/generator.html doesn't.

I may have missed something, but if this is the case, in my mind, it is a dealbreaker against using the meanjs generator over this one.

@DaftMonk
Copy link
Member

Here's some info on what I've been working on for 2.0.0: #192

@JaKXz JaKXz changed the title Yeoman MEAN.JS Generator (dublicate functionality) Yeoman MEAN.JS Generator (duplicate functionality) May 31, 2014
@JaKXz JaKXz added question and removed duplicate labels May 31, 2014
@JaKXz JaKXz closed this as completed May 31, 2014
@dancancro
Copy link

Here is a comparison I made of generators for AngularJS projects. I support merging projects rather than trying to differentiate them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants