Closed anotherangrymouse closed 10 years ago
This is something I'd really like to include.
I haven't had a chance to port the templates to other languages yet but if anybody can contribute identical versions of them implemented in their favourite language, I'd be happy to include it as an option and maintain parity between template languages going forward
(well, maybe up to three or four popular languages - too many might make it too costly to add features to the templates...)
I have a branch with hbs support included. I want to go back through and make sure I have complete parity with the jade templates before I send the official PR.
Amazing work. I just had a peak at source and saw that it offers a handlebars option. The only issue I had is when i used the generator (using the method described in this repo) it didn't give me the option to choose Jade or HBS.
Do I have to check out a different branch or build the generator from this repo to use it?
@anotherangrymouse shouldn't have to do anything special, my only thought is you might be out of date with the generator and may need to reinstall/update the package using npm.
One thing that could help to trouble shoot is if you run the following command from shell
cat /usr/local/lib/node_modules/generator-keystone/package.json
and reply with the output from your package. The latest version of the keystone generator should contain the colors
package.
@mgan59 Thanks for your reply.
I have tried updating the package and even did so on a fresh machine and no luck (will try again here though!)
I ran cat on the file and this is what I got:
package.json
{
"name": "generator-keystone",
"version": "0.1.11",
"description": "A KeystoneJS Project Generator for Yeoman",
"keywords": [
"yeoman-generator",
"keystonejs",
"keystone",
"express",
"cms",
"mongoose"
],
"homepage": "https://github.com/JedWatson/generator-keystone",
"bugs": {
"url": "https://github.com/JedWatson/generator-keystone/issues"
},
"author": {
"name": "Jed Watson",
"url": "https://github.com/JedWatson"
},
"main": "app/index.js",
"repository": {
"type": "git",
"url": "git://github.com/JedWatson/generator-keystone.git"
},
"scripts": {
"mocha": "~1.18.2"
},
"peerDependencies": {
"yo": "~1.1.2"
},
"engines": {
"node": ">=0.10.0",
"npm": ">=1.2.10"
},
"licenses": [
{
"type": "MIT"
}
],
"readme": "# Keystone Generator\n\nA Yeoman generator for KeystoneJS, the model-driven cms for node.js built on Express and MongoDB.\n\nyo keystone
will sc
affold a new KeystoneJS project for you, and offer to set up blog, gallery, and enquiry (contact form)
models + views.\n\n## Getting Started\n\nFirst up, you'll need Node.js >= 0.10.x and MongoDB >= 2.4.x
installed. If you don't have them, follow the Dependencies instructions below.\n\nThen, install t
he Keystone generator:\n\n\n$ npm install -g generator-keystone\n
\n\nIf you see errors, check
the problems section below.\n\nWith
the generator installed, create an empty directory for your new KeystoneJS Project, and run yo keyst one
in it:\n\n\n$ mkdir myproject\n$ cd myproject\n$ yo keystone\n
\n\nThe generator will ask
you a few questions about which features to include, then prompt you for Cloudinary and Mandrill accou
nt details.\n\nThese accounts are optional, but Cloudinary is used to host the images for the blog
and gallery templates. You can get a free account for each at:\n\n* Cloudinary - Image serving and management in the cloud\n* Mandrill - Transactional email service by Mailchimp\n\n### What next?\n\nWhen
you've got your new project, check out the KeystoneJS Documentation to
learn more about how to get started with KeystoneJS.\n\n## Problems?\n\n### ERR! Please try running th
is command again as root/Administrator.\n\nWhen running npm install -g generator-keystone
, you may g
et an EACCES error asking you to run the command again as root/Administrator. This indicates that
there is a permissions issue.\n\nOn your development system you can change directory ownership to the
current $USER so you do not have to run sudo
while installing untrusted code:\n\n\nsudo chown -R $USER /usr/local\n\n# Other directories may be required depending on your O/S\nsudo chown -R $USER /u sr/lib/node_modules/\n
\n\nFor a production/shared environment you may wish to re-run the npm
com
mand with the sudo
prefix:\n\n\nsudo npm install -g generator-keystone\n
\n\nFor more informa
tion, see the \"What, no sudo?\" of the Intro
to npm by Isaac Schulueter.\n\n### What do you mean it couldn't find my Database?\n\nBy default, Keys
toneJS will look for a MongoDB server running on localhost
on the default port, and connect to it. I
f you're getting errors related to the MongoDB connection, make sure your MongoDB server is running.\n
\nIf you haven't installed MongoDB yet, follow the instructions below.\n\nTo connect to a server oth
er than localhost
, add a MONGO_URI
setting to the .env
file in your Keystone project directory
:\n\n\nMONGO_URI=mongodb://your-server/database-name\n
\n\n\n## Dependencies\n\n### Install Nod
e.js\n\nDownload and install the node.js binaries for your platform from the Node.js download page.\n\n### Install MongoDB\n\nIf you're on a mac, the easiest way to install
MongoDB is to use the homebrew package manager for OS X. To install it, run this in
your terminal:\n\n\nruby -e \"$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)\" \n
\n\nWith Homebrew installed, run this in your terminal to download and install MongoDB:\n\n\ nbrew mongo\n
\n\nFor other platforms, see the MongoDB installation guides.\n\n\n## License\n\nMIT License\n"
,
"readmeFilename": "README.md",
"_id": "generator-keystone@0.1.11",
"dist": {
"shasum": "ebd3dbba8dc635cdc7dd8938bb120bb8b2980b34"
},
"_from": "generator-keystone@",
"_resolved": "https://registry.npmjs.org/generator-keystone/-/generator-keystone-0.1.11.tgz"
}
Just made a pastebin version for easier access if required: http://pastebin.com/VmBJSD8u
hhmm looking at the package.json there is some pieces missing.
Could you maybe followup with another dump using
cat /usr/local/lib/node_modules/generator-keystone/app/index.js
maybe put the output in a gist, think I like it better than pastebin
@mgan59 apologies for the delay in response. Been insanely busy and not had a minute to spare. I can't recreate the error anymore since the last update to the generator which I am more than happy about.
recommend marking as closed @JedWatson
Agreed!
Love Keystone.
I was wondering though, would it be possible to add a question on what views engine we would prefer? (Default: Jade, options like EJS etc.)
Not a fan of Jade personally (think it is a love it or hate it thing) and something like an option to automatically scaffold EJS would be a great time saver.