diff --git a/CHANGELOG.md b/CHANGELOG.md index a84ad81..a7a7c19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All Notable changes to `sass-config-manager` will be documented in this file +## 3.1.0 Release +- Remove namespace from config-get +- Added new tests for config-set with a namespace + ## 3.0.0 Release ### Added diff --git a/bower.json b/bower.json index 11c2676..f5b98da 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "growcss-sass-config-manager", - "version": "3.0.1", + "version": "3.1.0", "homepage": "http://growcss.com/", "authors": [ "Daniel Bannert " diff --git a/dist/_config-manager.scss b/dist/_config-manager.scss index 2d74e98..9ec3661 100644 --- a/dist/_config-manager.scss +++ b/dist/_config-manager.scss @@ -317,8 +317,6 @@ $config-namespace: "" !default; // // @return {*} The value of the configuration path @function config-get($key, $default: false) { - $key: $config-namespace + $key; - @if $default { @if config-map-has($config-default, $key) { @return config-map-get($config-default, $key); diff --git a/package.json b/package.json index ade3451..e133773 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "growcss-sass-config-manager", - "version": "3.0.1", + "version": "3.1.0", "description": "A dot-syntax configuration (Map) library for Sass (mixin / function).", "author": { "name": "Daniel Bannert", diff --git a/src/scss/functions/_config-get.scss b/src/scss/functions/_config-get.scss index 31c8dc4..5b32a94 100644 --- a/src/scss/functions/_config-get.scss +++ b/src/scss/functions/_config-get.scss @@ -9,8 +9,6 @@ // // @return {*} The value of the configuration path @function config-get($key, $default: false) { - $key: $config-namespace + $key; - @if $default { @if config-map-has($config-default, $key) { @return config-map-get($config-default, $key); diff --git a/tests/specs/_config-manager.scss b/tests/specs/_config-manager.scss index 2d74e98..9ec3661 100644 --- a/tests/specs/_config-manager.scss +++ b/tests/specs/_config-manager.scss @@ -317,8 +317,6 @@ $config-namespace: "" !default; // // @return {*} The value of the configuration path @function config-get($key, $default: false) { - $key: $config-namespace + $key; - @if $default { @if config-map-has($config-default, $key) { @return config-map-get($config-default, $key); diff --git a/tests/specs/scss/functions.scss b/tests/specs/scss/functions.scss index 33aa2d4..f3cf621 100644 --- a/tests/specs/scss/functions.scss +++ b/tests/specs/scss/functions.scss @@ -9,6 +9,23 @@ $expect: ("bar": "foo", "color": #fff); @include assert-equal($config-attr, $expect, "Check if map is correct."); + + @include config-reset("bar"); + @include config-reset("color"); + } + + // Testing namespace set functions + @include test("config-set [function] Set a single key with namespace.") { + $config-namespace: "test-" !global; + + @include config-set("bar", "foo"); + @include config-set("color", #fff); + + $expect: ("test-bar": "foo", "test-color": #fff); + + $config-namespace: "" !global; + + @include assert-equal($config-attr, $expect, "Check if map is correct."); } // Testing set functions