Couldn't really find anything that worked how i wanted, so I wrote my own. My first Yeoman generator, as well as first real interaction with github and https://npmjs.org/. Fun!
Yeoman sub generators for MEAN application?
-
01-09-2022 - |
문제
I've been playing with Mean.IO (http://mean.io/), and wondered if there was a Yeoman generator (sub-generator?) that I could use to auto-generate code for an "entity" across the entire stack. For example, in the mean.io project there is an "Article" example that contains 7 components related to "Articles" (Model, Controller, Node Routes, Angular Routes/Service/Controller/Views). Is there a generator that will create this "component stack" for a custom entity?
eg, something like:
yo meangenerator:entity 'MyEntity'
would then create 7 different files that tie 'MyEntity' into an existing MEAN application.
해결책
다른 팁
Actually i think they have something similar, like:
$ mean package ThingIWantToModel
Don't know if they created this feature after you asked.
I wonder if we can generate singular controllers, models, and anything else inside this package.
Mean.js (another project that is similar to mean.io) has a great module generator, as does the angular-generator-fullstack project.
I think mean.js is the best, though, as it comes out-of-box with everything you need to actually get started building your application, including user logins, registration, reset password, change password, and a user management interface. Basically, batteries are included and you are ready to get building!