human2machine option ?
This is similar to question posted
https://github.com/perak/kitchen-site/issues/261
Not sure where to find this option after watching the videos, I have already installed locally:
$ npm install -g human2machine
@scheung38
You can simply do:
meteor-kitchen input_file_with_english_text.txt output_directory/
(if input file have .txt extension then kitchen will automatically call human2machine to "translate" to json, and will then generate the app)
$USER/meteor-kitchen/input_file.txt (just changed customers to products)
I want site with three pages: home, products and about. In home page I want jumbotron with title: "This application is written in English language!", text: "Human to describe app, machine to write code!", button url: "products". Please create one collection: products. In products collection I want three fields: ID, Title and Price. In products page I want CRUD for products collection. In about page I want text: "This application is written in English language using Meteor Kitchen, source code generator for Meteor".
But upon
$USER/meteor-kitchen$ meteor-kitchen input_file.txt output/
Converting human language to json using "human2machine"...
module.js:471
throw err;
^
Error: Cannot find module 'underscore'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/human2machine/human2machine.js:1:101)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Error converting human language to json. Error executing "human2machine". Undefined error: 0
I have underscore somewhere?
Also can't find the Field creation associated with the collection definition as present in the video?
@scheung38 oops, I didn't add underscore into dependencies list, will fix that. But, you can do:
npm -g install underscore
:+1:
Thank Petar, but how to specify the Field attributes in human format
In products collection three fields: name, address and e-mail.
to become:
In products collection three fields: ID, Title and Price.
where ID is the Mongo generated ID Title in String Price in Float
And in this format :
In products collection three fields: id, title and price.
or
In products collection three fields: _id, title and price.
or
In products collection three fields: ID, Title and Price.
and also option to choose blaze or react in human format too?