Closed gb96 closed 9 years ago
Hey thanks @gb96 ! I just pushed a new built to NPM, tested it by deleting my global coffeescript and updated the readme. :beers:
Let me know how you like it. You may want to checkout the models branch which adds models of course but also adds user-accounts with new project so that the model can check for security. The syntax for this currently is mgen model post
and it will insert foo
and bar
fields that need to be updated. Eventually the syntax should be something like mgen model post name:string desc:string
so that it generates the fields and check
s for you.
Here's a template for the models which gets inserted in both/models/post.js
. This helps keep database calls abstracted and out of your click handlers.
Also i'm working on a draft for basic model tests to ensure they're working correctly. This would be generated and inserted into tests/jasmine/server/integration/models/postSpec.js
(unfortunate path structure but works with fuzzy search pretty well).
Might want to better document how to intall... https://www.npmjs.com/package/meteor-generate says
npm install meteor-generate
however I doubt anyone would really ever want to install meteor-generate as a local package. I suspect more likely people should install it a system-global tool with something likesudo install meteor-generate --global
After I installed and tried to run
mgen create myproject
I got the following error:Of course this was easily fixed by first running
sudo npm install coffee-script --global
and then repeatingmgen create myproject
. However I guess this means yourpackage.json
is missing a dependency declaration for coffee-script? Had a quick look and looks like coffee-script is there, under "devDependencies". Perhaps it needs to go under "dependencies" instead?Anyhow, great tool, looking forward to creating some cool Meteor projects with it! :)