adambrodzinski / meteor-generate Goto Github PK
View Code? Open in Web Editor NEWMeteor Generate - A Rails Inspired File Generator for Meteor
License: MIT License
Meteor Generate - A Rails Inspired File Generator for Meteor
License: MIT License
Hi Adam, thanks for this awesome tool!
I noticed that in your example blog you name your controllers Posts.index
, Posts.new
etc, but the generator now uses PostsController.index
, PostsController.new
.
Which do you plan to use going forward? is there any benefit of one over the other?
Thanks again!
I hope they come soon. This is a cool-looking project for getting started fast on "this shouldn't take long" projects where the first few hours go into routine setup :o
Hi Adam, have you ever considered migration towards a yeoman generator such as https://github.com/Pent/generator-meteor or https://github.com/cmalven/generator-meteor-coffee ?
meteor-generate
is still using Meteor.Collection
. This still works, but it's not the current API.
When I generated posts page, ran meteor, then visited it in my browser I got the following error:
Couldn't find a template named "posts" or "posts". Are you sure you defined it?
Looking inside the generated files the problem is obvious, e.g. /client/pages/posts/index.html:
<template name='compName'>
<div class='comp-name'>
<h1>Page: compName</h1>
<p>Find me in client/pages/compName/index.html</p>
</div>
</template>
The index.html was generated from the version of meteor-generate I installed last week. I will try updating to the most recent version and regenerate everything and see if the error is still there.
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 like sudo install meteor-generate --global
After I installed and tried to run mgen create myproject
I got the following error:
module.js:338
throw err;
^
Error: Cannot find module 'coffee-script/register'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/local/lib/node_modules/meteor-generate/bin/mgen:4:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
Of course this was easily fixed by first running sudo npm install coffee-script --global
and then repeating mgen create myproject
. However I guess this means your package.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! :)
npm install -g meteor-generate coffee-script
mgen create example
Creating basic app structure
just hangs forever there.
Did I do something wrong? How long should it take?
Docs say "See wiki page"... but I don't find a wiki and the github wiki link redirects me to the main page, guess there's no wiki pages...
It just noops; is it not actually written, but just documented in the README? It doesn't even give an error.
None of the examples seem to be linked from readme.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.