content-handler-quick-start
Create your own content-handler based project to build your app/site in seconds!
How to install it?
-
Be sure to have node.js installed on your machine or install it: node.js
-
Install this package into your localhost directory
On UNIX system
$ project-dir=/var/www/html/project-name$ git clone https://github.com/Lcfvs/content-handler-quick-start.git $project-dir$ cd $project-dir$ npm i -D$ npm run buildOn Windows system
project-dir=C:\wamp\www\project-namegit clone https://github.com/Lcfvs/content-handler-quick-start.git %project-dir%cd %project-dir%npm i -Dnpm run build -
Open your browser on your project index http://localhost/project-name
-
Enjoy!
Make your first middleware
Create a ./assets/js/dev/test.js
{ thisstylebackgroundColor = '#ccc'} // create a listener to be applied on each element matching the `main.test` selectorContentHandler
Register your middleware
Import your listener into your ./assets/js/dev/index.js
// Import your own listeners here // Let the following lines at the end of this file
Build your app
Into your localhost directory, each time your JS code changes
$ npm run build
Create the content
Create a file into your project, for example ./pages/test.html
Test title This is the test content
Link it into your page
Load the test content