The idea of this library is to provide you with all the essential building blocks you need to get your node on. Extensive. Consistent. Structured. Modular. Grab what you need; ignore the rest.
Like it? Don't like it? It's all about picking your poison. I've chosen an uncommon (unorthodox?) poison, but this library will be updated frequently, have many examples and documentation, and that's what matters.
Included libraries:
- core - Essentials. Mixin your way to victory!
- blog
- cms
- database - We all need a little persistency in our lives.
- debug - Write to me.
- forum
- framework - MVC? HMVC? MVVM? Your choice.
- site - Startup.
- wiki
- game
- ...more!
- Run this command:
npm install node-std
. If you don't have NPM installed, you can get it here, navigate to thenode-std
directory and run:npm install .
- Done!
var std = require('std').std;
var blog = std('import blog');
var p1 = blog.post();
p1.title = 'Hello world!';
- Install node-std if you haven't already.
- Create
modules
directory for your module. - Create
my_module
directory. - Add a
__init__.js
package file to your module directory. - Add any exports to your package file that you may want to be accessible.
- You're ready to create your module's structure.
Add your modules to node-std's importer:
var std = require('std').std;
std.prototype.add_path('./modules');
var my_module = std('import my_module');
The API is still under construction, and may experience highly volatile changes.
You can find the library in the src
directory, which is CoffeeScript compiled down to JavaScript in the lib
directory.
Command to watch and compile:
cd node-std
node bake.js
All code is to be lower-case using underscores for logical separation. Everything is lower-cased and underscored: variables, functions, classes, directories, files, event names, table names, and so on. We are aware JavaScript, and by consequence Node.js is traditionally pascal/camel case. Sorry.
You can find existing unit tests in the test
directory.
- Nether (unreleased)
Major thanks to the CoffeeScript team.
Uses the following Node modules: backbone, underscore, connect, socket.io