hay / stapes

the Javascript MVC microframework that does just enough
http://hay.github.io/stapes
MIT License
443 stars 54 forks source link

Load Stapes from node #41

Closed sylouuu closed 11 years ago

sylouuu commented 11 years ago

Hey,

In my node code:

var Stapes = require('stapes');

var Module = Stapes.subclass({
    constructor : function(name) {
        this.name = name;
    },

    sayName : function() {
        console.log('My name is: ' + name);
    }
});

var module = new Module('Emmylou');

"module stapes not found"

I made before a npm install stapes

Can you give an example with Node.js please?

Regards

hay commented 11 years ago

Are you sure you're not having any other problems? I reproduced your example and it worked fine with me...

Note that the variable name in your sayName function should be this.name.