spacecraft

1.0.2 • Public • Published

spacecraft

Build Status Coverage Status npm

A light framework core for everyone can mount more component or write component, to create a node app which have not more redundant file and function.Using es6/es7

Usage

Install

$ npm install --save spacecraft

create a component

const Component = require('spacecraft/component');
 
class DemoComponent extends Component {
  getInfo() {
    return {
      name: 'demo',
      version: '1.0.0',
    }
  }
 
  onMount() {
 
  }
 
  onLoad() {
 
  }
 
  onUnmount() {
 
  }
}
 
module.exports = DemoComponent;

In a component, we have 3 function when component is mount, app is start and component is unmount, all of this is optional.

For every component, have a function getInfo must to be override, via the return object to division other component. Same name component will not mount twice.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    11
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    11
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i spacecraft

Weekly Downloads

11

Version

1.0.2

License

MIT

Last publish

Collaborators

  • moonrailgun