diff --git a/CHANGELOG.md b/CHANGELOG.md index 86b2262..d668043 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,19 +2,42 @@ All Notable changes to `sass-config-manager` will be documented in this file -## NEXT - YYYY-MM-DD +## 2.0.4 Release ### Added -- Nothing +- infos to CHANGELOG +- to README a how to use this library. + +## 2.0.3 Release + +### Added +- added sache.json, and keys to sache.json, bower.json and package.json. + +## 2.0.2 Release + +### Fixed +- bower.json and package.json main tag. + +## 2.0.1 Release + +### Fixed +- cs-fixes + +## 2.0.0 Release + +### Added +- added tests for config-set(), config-get(), config-has() ### Deprecated - Nothing ### Fixed -- Nothing +- many cs-fixes +- some bugs in config-set() if a single key was added. ### Removed -- Nothing +- config-bind() +- config-remove() ### Security -- Nothing \ No newline at end of file +- Nothing diff --git a/README.md b/README.md index 404da71..301c84d 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,52 @@ Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recen grunt test ~~~ +## How to + +### Usage +Include this library. If you use bower ``@import 'bower_components/sass-config-manager/src/scss/config-manager';`` or ``@import 'node_modules/sass-config-manager/src/scss/config-manager';`` + +### Set default settings +~~~scss +// Default configuration settings +// Passing true to the 3rd parameter, +// the value is assigned to the configuration path as the default +@include config-set('color.black', #000, true); +@include config-set('color.white', #fff, true); +@include config-set('single-key', red, true); + +// or assign values to a configuration path by using Map +@include config-set('color', (black: #000, white: #fff), true); +~~~ + +### Get your settings +~~~scss +body { + color: config-get('color.black'); // #000 + background-color: config-get('color.white'); // #fff +} +~~~ + +### Compatibility +~~~scss +// Variables +$color-black: #000 !default; +$color-white-bg: #fff !default; + +$color: ( + fg: $color-black, + bg: $color-white-bg +) !default; + +// config-set() +@include config-set('color', $color, true); + +body { + color: config-get('color.fg'); // #666666 + background-color: config-get('color.bg'); // white +} +~~~ + ## Contributing Please see [CONTRIBUTING](CONTRIBUTING.md) for details. diff --git a/bower.json b/bower.json index 9553cea..0dab24f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "growcss-sass-config-manager", - "version": "2.0.3", + "version": "2.0.4", "homepage": "http://growcss.com/", "authors": [ "Daniel Bannert " diff --git a/package.json b/package.json index a223bda..5b3dece 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "growcss-sass-config-manager", - "version": "2.0.3", + "version": "2.0.4", "description": "A dot-syntax configuration (Map) library for Sass (mixin / function).", "author": { "name": "Daniel Bannert",