Genuine.js is a framework to start projects with the rights tools.
You can launch the app directly by doing a node app.js but in order to release all the power of Genuine.js you'd better installed gulp as well like so
npm install --global gulpThen to install the dependencies do :
npm installFirst you need to create a local-config.js file to declare your local ENV vars.
cp local-config-sample.js local-config.jsNow you can launch the project like so
gulpYou can browse to http://localhost:3000 and see the result
We added a simple command that generate a page automatically like this :
gulp page --name 'About us'This will generate the route about-us, the partial view file about-us.ejs and even the js functions to be able to develop right away.
You decide which slug and filename you want to use. Just do this:
gulp page --name 'About us' --slug about --partial about-fileContent type will basically be your menu sections. Let's say you are doing a website for a restaurant. There is plenty of chance that you will need a "Menus" category with all your entries.
So do generate all the things for this new content type just type :
gulp generate --type 'menus'
#The type should only be letters. No '-' or '_'Then do add you new entries, it's pretty similar to pages
gulp add --type 'menus' --name 'King Menu' --slug king-menu --partial king-menuIn fact 'Pages' is a content type too so if you do a :
gulp add --type 'pages' --name 'About us' --slug about --partial about-fileIt will do the exact same thing that a :
gulp page --name 'About us' --slug about --partial about-fileEverything should make sense now, right?
For the rest, since it's built on top of Express.js you should check the Express doc.
My brower doesn't refresh with Livereload as promised.
It seems there is an issue on Chrome see here : livereload/livereload-extensions#26
The solution is actually to open the developer mode.
- 2.0.0 : ES6 compatibility and refactoring a lot
- Add new gulp command for script
- Find a way to manage css dependencies
- Generate Nav automatically
- Add production README explanation
- Add Dockerfile