updated readme

This commit is contained in:
Philipp Kunz 2015-11-26 06:51:13 +01:00
parent dd83c71420
commit ce56916db7
5 changed files with 31 additions and 3 deletions

View File

@ -1,2 +1,2 @@
# pushrocks
# smartenv
wrapper for all non-gulp npm plugins

View File

@ -1,2 +1,28 @@
# How to compile.
Make sure gulp and gulp-taypescript from npm are available. Then run the gulpfile in this directory.
store things about your environment and let them travel across modules
## Status
[![Build Status](https://travis-ci.org/pushrocks/smartenv.svg?branch=release)](https://travis-ci.org/pushrocks/smartenv)
[![Dependency Status](https://david-dm.org/pushrocks/smartenv.svg)](https://david-dm.org/pushrocks/smartenv)
[![devDependency Status](https://david-dm.org/pushrocks/smartenv/dev-status.svg)](https://david-dm.org/pushrocks/smartenv#info=devDependencies)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/smartenv/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/smartenv/master/dependencies/npm)
[![bitHound Overalll Score](https://www.bithound.io/github/pushrocks/smartenv/badges/score.svg)](https://www.bithound.io/github/pushrocks/smartenv)
## Install
Install the package through npm
```
npm install smartenv
```
## Usage
```javascript
var smartenv = require("smartenv");
smartenv.info(); //prints an output about your current environment and registered objects
smartenv.register({akey:"a text"},"somevalue"); // register a new object
smartenv.makeGlobal() // make smartenv available from gobal.smartenv
smartenv.get("somevalue").akey; // returns "a text"
smartenv.items.somevalue.akey; // also returns "a text"
```

View File

@ -3,6 +3,7 @@ var smartenv = require("./index.js");
var beautylog = require("beautylog")("os");
beautylog.info("Now testing the smartenv module");
smartenv.info();
beautylog.info("Now testing the smartenv module");
smartenv.register({ key1: "Peter" }, "docit");
smartenv.info();
beautylog.log(smartenv.get("docit").key1);

View File

@ -1 +1 @@
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,IAAI,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACrC,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,I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CAAC,UAAU,CAAC,CAAC"}

View File

@ -3,6 +3,7 @@ var smartenv = require("./index.js");
var beautylog = require("beautylog")("os");
beautylog.info("Now testing the smartenv module");
smartenv.info();
beautylog.info("Now testing the smartenv module");
smartenv.register({key1:"Peter"},"docit");
smartenv.info();
beautylog.log(smartenv.get("docit").key1);