node-std
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.
Included libraries:
- core - Essentials. Mixin your way to victory!
- blog
- cms
- database - We all need some persistency in our lives.
- debug - Write to me.
- forum
- framework - MVC? HMVC? MVVM? Your choice.
- site - Startup.
- wiki
- game
- ...more!
Installation
- Run this command:
npm install std
. If you don't have NPM installed, you can get it here or download manually STD here. - Done!
Usage
var std = require('std').std;
var blog = std('import blog');
var p1 = blog.post();
p1.title = 'Hello world!';
p1.save();
Custom modules
- Install 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 STD's importer:
var std = require('std').std;
std.add_path('./modules');
var my_module = std('import my_module');
Important
The API is still under construction, and may experience highly volatile changes.
Contribute
You can find STD in the src
directory, which is CoffeeScript compiled down to JavaScript in the lib
directory.
Command to watch and compile CoffeeScript:
cd node-std
coffee -wc -o lib src
Standard
Naming Convention
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.
Unit Testing
You can find existing unit tests in the test
directory.
Projects using STD
Credits
Major thanks to the CoffeeScript team.
Uses the following Node modules: backbone, underscore, connect, socket.io, node.js, mongoose, haml, less
Draws inspiration from the following projects: Boost, OGRE, haXe, Rails, Zend, Doctrine, jQuery, php.js, MaNGOS, as well as Phpr, C#.NET