Skip to content
The modular framework for NodeJS
JavaScript Shell
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
docker
documentation
example
lib-es6
lib-old
lib
test
.gitignore
.travis.yml
LICENSE
README.md
package.json

README.md

SolfegeJS

The modular framework for NodeJS.

Requirements

  • NodeJS >= 0.12
  • Babel >= 5

Installation

npm install solfegejs

Example

Create your application file ./bundle-es6/MyBundle.js:

import solfege from "solfegejs";

export default class MyBundle
{
    constructor()
    {
    }

    *setApplication(application)
    {
        application.on(solfege.kernel.Application.EVENT_START, this.onApplicationStart);
    }

    *onApplicationStart()
    {
         console.log("woot");
    }
}

Create the startup file ./bundle-es6/console.js:

import solfege from "solfegejs";
import MyBundle from "./MyBundle";

// Initialize the application
let application = new solfege.kernel.Application(__dirname);

// Add the internal bundle
application.addBundle("myBundle", new MyBundle);

// Start the application
application.start();

Compile with Babel :

babel ./bundle-es6 --blacklist=regenerator --out-dir ./bundle-es5

Start the application :

node --harmony --harmony-proxies ./bundle-es5/console.js
Something went wrong with that request. Please try again.