sirrobert-mixins
v1.1.8
Published
A collection of mixins useful for development.
Readme
Rationale
I want a collection of mixins that I don't have to import individually. This is that collection.
The sirrobert- prefix.
This set of modules in the sirrobert- namespace is largely for personal
use. If there's ever any reason to release it under a better name or as a
framework or toolkit, I'm happy to publish it under a new name.
Installation
Local installation
npm install --save sirrobert-mixinsGlobal installation
npm install --global sirrobert-mixinsUsage
First require the plugin. I like to use the Mixin name. Also, this
module works well with the sirrobert-mixin plugin, which is a mixin
manager.
let Mix = require("sirrobert-mixin");
let Mixin = require("sirrobert-mixins");Then you can use the mixins individually.
class MyClass extends Mix.with(Mixin.Params);Alternately, you can load just the module you want:
let Mix = require("sirrobert-mixin");
let Params = require("sirrobert-mixins").Params;
class MyClass extends Mix.with(Params);Mixins List
Each mixin has its own readme in the same dir as the source code for it.
- Params A mixin for managing class construction parameters.
- Hook A mixin for adding hook capabilities to a class.
TO DO
- Add module method to load only the modules you want and return them as an array or something.
