diff --git a/README.md b/README.md index 6861af3..8ad92d2 100755 --- a/README.md +++ b/README.md @@ -5,6 +5,28 @@ applies them, manages merging of features via inter-feature dependencies and external criteria. +## Contents +- [`features.js`](#featuresjs) + - [Contents](#contents) + - [Basics](#basics) + - [Installing and usaging](#installing-and-usaging) + - [Organizational structure](#organizational-structure) + - [Lifecycle](#lifecycle) + - [How features are loaded](#how-features-are-loaded) + - [The main entities:](#the-main-entities) + - [`FeatureSet()`](#featureset) + - [`.Feature(..)`](#feature-setfeature) + - [`.` / `[]`](#feature-setfeature-tag--feature-setfeature-tag) + - [`.features`](#feature-setfeatures) + - [`.setup(..)`](#feature-setsetup) + - [`.remove(..)`](#feature-setremove) + - [`.gvGraph(..)`](#feature-setgvgraph) + - [`Feature(..)`](#feature) + - [Meta-features](#meta-features) + - [Extending](#extending) + - [License](#license) + + ## Basics If [actions] are a means to organize how methods are extended and called in the @@ -118,45 +140,34 @@ inheritance implementation, but though similar to it in some regards, `features.js` is quite different in others. -## Contents -- [`features.js`](#featuresjs) - - [Basics](#basics) - - [Contents](#contents) - - [Installing](#installing) - - [Organizational structure](#organizational-structure) - - [Lifecycle](#lifecycle) - - [How features are loaded](#how-features-are-loaded) - - [The main entities:](#the-main-entities) - - [`FeatureSet()`](#featureset) - - [`.Feature(..)`](#feature-setfeature) - - [`.` / `[]`](#feature-setfeature-tag--feature-setfeature-tag) - - [`.features`](#feature-setfeatures) - - [`.setup(..)`](#feature-setsetup) - - [`.remove(..)`](#feature-setremove) - - [`.gvGraph(..)`](#feature-setgvgraph) - - [`Feature(..)`](#feature) - - [Meta-features](#meta-features) - - [Extending](#extending) - - [License](#license) +## Installing and usaging - -## Installing +```shell +$ npm install --save ig-features +``` ```javascript var features = require('ig-features') ``` + ### Organizational structure - `FeatureSet` - Contains features, defines the main feature manipulation API, acts as the target - object constructor/factory. + Creates `` +- `` (`FeatureSet`) + Contains features, defines the main feature manipulation API and + `` constructor/factory. - `Feature` Creates a feature in the feature-set, defines the feature metadata, references the feature mixin / action set and configuration. - `ActionSet` / mixin - Contains the actions/methods of the feature mixin. + Contains the actions/methods of the feature mixin. + See [actions] for more details. +- `` (`ActionSet`) + Instance constructed by `` with all the feature action sets in + the prototype chain and a merged `.config`. @@ -249,7 +260,7 @@ For more info see: [`Feature(..)`](#feature) #### `.gvGraph(..)` -Get a [Graphvis](https://graphviz.org/) graph spec for the feature dependency graph. +Generate a [Graphvis] graph spec for the feature dependency graph. @@ -374,7 +385,10 @@ All rights reserved. +[ig-actions]: https://github.com/flynx/actions.js [actions]: https://github.com/flynx/actions.js +[python]: https://www.python.org/ +[graphvis]: https://graphviz.org/