Frameworkless Stage
Transition those views to the stage.
View Demo
Use a Package Manager
bower:
bower install frameworkless-stage
cp bower_components/frameworkless-stage/dist/stage.js src/lib
cp bower_components/frameworkless-stage/dist/less/stage.less src/less/lib
npm:
npm install frameworkless-stage
cp node_modules/frameworkless-stage/dist/stage.js src/lib
cp node_modules/frameworkless-stage/dist/less/stage.less src/less/lib
Use the Source
Get started right away, so you can disassemble and play around at your leisure.
git clone git@github.com:synacorinc/frameworkless-stage.git
npm install
npm run-script build
PORT=8080 npm start
Quick Repo Tour
/src
is where the source code lives/dist
is the built library/demo
is a simple demo, using requirejs
Usage
var stage = require('stage');
stage.init(document.body);
var view = document.createElement('div');
view.innerHTML = '<h1>Hello, world!</h1>';
stage.show(view, {
animation : 'fade',
duration : 500
}, function() {
var more = document.createElement('p');
more.textContent = 'I am visible now!';
view.appendChild(more);
});
Usage with frameworkless-view
Setup:
define(['stage'], function(stage) {
stage.init(document.body);
});
In a route:
define(['view', 'stage'], function(view, stage) {
return view({
template : '<h1>Hello, world!</h1>',
load : function() {
stage.show(this);
}
});
});
License
BSD