Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

frameworkless-stage

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frameworkless-stage

Push views onto a stage, with optional view transitions.

  • 0.7.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Frameworkless Stage NPM Version Bower Version

Transition those views to the stage.

View Demo

Build Status Dependency Status devDependency Status

Deploy


Use a Package Manager

bower:

bower install frameworkless-stage
# copy the stuff you want
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
# copy the stuff you want
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.

# Clone frameworkless-stage
git clone git@github.com:synacorinc/frameworkless-stage.git

# Install development dependencies
npm install

# Build the library
npm run-script build      # or just `grunt` if you have grunt-cli installed globally

# Check out the demo
PORT=8080 npm start       # this just does `node server.js`

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 views into <body>:
stage.init(document.body);

// A view can just be a DOM node:
var view = document.createElement('div');
view.innerHTML = '<h1>Hello, world!</h1>';

// Push the view onto the stage:
stage.show(view, {
	animation : 'fade',
	duration : 500
}, function() {

	// add some content to the view after it has been shown:
	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() {
			// push the view-presenter onto the stage:
			stage.show(this);
		}
	});
});

License

BSD

Keywords

FAQs

Package last updated on 02 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc