prisme / black-mirroir

Mirror, mirror, on the wall, Who in this land is fairest of all?

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Black Mirroir

Used on many projects at ultranoir before React/Vue was cool

minimalist MV framework that manages application state, inspired by bigwheel framework and based on handpicked npm packages : browserify - gulp - page.js - handlebars / mustache - GSAP …

upon route change :

  • current view exit : animateOut then remove the view DOM container
  • next view enter : loadData (JSON), compileTemplate, ready, preload, animateIn

Rendering is done client side at the moment but allows direct url access. TODO : server-side rendering
generate static html files during build process, and/or use Mustache templates shared between PHP & Js, enabling server + client side rendering without duplication.

Getting Started

  1. Duplicate sources and rename folder.

  2. Edit .htaccess RewriteBase to your project folder on line 34

RewriteBase /YourProjectFolder/

  1. Edit assets/js/app.js _ROOT to your project folder on line 5

window._ROOT = '/YourProjectFolder/';

  1. Open Terminal and navigate to the project (from finder, drag and drop folder onto terminal application icon). Install project depencies as listed in package.json (requires node and npm to be installed)

npm install

  1. Run Gulp to do a first build and to launch watchify (instructions listed in gulpfile.js)

gulp

  1. Open your project in a browser.

  2. Edit any files, and the watchify should rebuild the project automatically (assets/js/bundle.js). If gulpfile.js edited, cancel the process in terminal and relaunch it

ctrl + c gulp

About

Mirror, mirror, on the wall, Who in this land is fairest of all?

License:MIT License


Languages

Language:JavaScript 99.3%Language:CSS 0.3%Language:HTML 0.3%Language:Handlebars 0.1%