meanjs / generator-meanjs

MEAN.JS Official Yeoman Generator
http://meanjs.org/
473 stars 178 forks source link

mean-module sub-generator does not create content #188

Closed Garvice closed 8 years ago

Garvice commented 8 years ago

Running the sub -generator for mean-module does not create the folder structure or the content I would expect.

Am I doing something wrong? I first cloned the repository into the original generator location and ran npm install.

Here are the commands and output as well as content created.

Garvices-MBP:preflight-mitigators-v2 geakins$ yo meanjs:mean-module flight
? What is the name of the module? flight
? Which client-side folders would you like your module to include? config, controllers, css, directives, filters, img, services, tests, views
? Which server-side folders would you like your module to include? config, controllers, models, policies, routes, tests
   create modules/flight/client/flight.client.module.js
   create modules/flight/server/config/flight.server.config.js
Garvices-MBP:preflight-mitigators-v2 geakins$ cd modules/flight/client/
Garvices-MBP:client geakins$ ll
total 8
drwxr-xr-x  3 geakins  staff  102 Jan 20 20:32 .
drwxr-xr-x  4 geakins  staff  136 Jan 20 20:32 ..
-rw-r--r--  1 geakins  staff  131 Jan 20 20:32 flight.client.module.js
Garvices-MBP:client geakins$ cd ~/development/preflight-mitigators-v2/modules/flight/server/
Garvices-MBP:server geakins$ ll
total 0
drwxr-xr-x  3 geakins  staff  102 Jan 20 20:32 .
drwxr-xr-x  4 geakins  staff  136 Jan 20 20:32 ..
drwxr-xr-x  3 geakins  staff  102 Jan 20 20:32 config
Garvices-MBP:server geakins$ 
ilanbiala commented 8 years ago

What folder structure did you expect? @UndeadBaneGitHub is something possibly malfunctioning in the mean-module subgenerator?

Also, I think when we went over this line https://github.com/meanjs/generator-meanjs/blob/master/mean-module/index.js#L153, you only had it create 1 folder, but none of the other folders from the server prompt are ever created. Shouldn't that server part look like the client part but with different names and paths?

UndeadBaneGitHub commented 8 years ago

@ilanbiala I took the folders structure from the latest MEAN version. I will re-check if something accidentally got overlooked.

Also, subgenerator did create all the folders on both Winfows 10 and Debian machines that I have - and tests cover them. Unless I overlooked something in structure, everything should be fine.

mleanos commented 8 years ago

@ilanbiala @UndeadBaneGitHub It seems like this line should be creating the module's /server folder, and then somewhere below that conditional block, the other folders (based on what the user selected) should be created.

As Ilan pointed out, it looks like it will only create the /server/config folder.