Skip to content

Commit

Permalink
Merge branch 'release/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
maoberlehner committed Dec 12, 2016
2 parents 813a141 + 7bc0af8 commit 52eb789
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 11 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,25 @@ sass.render({
node-sass --importer node_modules/node-sass-magic-importer/dist/cli.js -o dist src/index.scss
```

## Upgrade from 2.x.x to 3.x.x
Version 3.x.x changes the way how nested CSS selectors are imported. Up until version 2.x.x you had to specify all nested selectors if you wanted to import them. With version 3.x.x nested selectors are imported automatically if you import the parent selector.

```scss
// File: styles.scss
.selector {
.nested-selector { }
.other-nested-selector { }
}

// New way of importing .selector and all it's child selectors:
@import '{ .selector } from styles.scss';

// Old way:
@import '{ .selector, .nested-selector, .other-nested-selector } from styles.scss';
```

It is not possible anymore to import only certain nested selectors. If this is a major concern in your daily work feel free to create a new issue or pull request and I may think about making this configurable.

## Upgrade from 1.x.x to 2.x.x
Version 2.x.x does not return a node-sass custom importer function directly. Instead a function which can take a optional parameter for configuration is returned. When the function is executed, it returns a node-sass custom importer function.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"sass",
"selector-importer"
],
"version": "2.1.4",
"version": "3.0.0",
"author": "Markus Oberlehner",
"homepage": "https://github.com/maoberlehner/node-sass-magic-importer",
"license": "MIT",
Expand All @@ -24,7 +24,7 @@
"dependencies": {
"node-sass-glob-importer": "^3.0.0",
"node-sass-package-importer": "^3.0.0",
"node-sass-selector-importer": "^3.1.0",
"node-sass-selector-importer": "^4.0.0",
"unique-concat": "^0.2.2"
},
"devDependencies": {
Expand Down
27 changes: 18 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,11 @@ css-select@~1.2.0:
domutils "1.5.1"
nth-check "~1.0.1"

css-selector-extract@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/css-selector-extract/-/css-selector-extract-1.3.1.tgz#7780ecbfd729d02a6e09bad1f847a60b0fc95bc1"
css-selector-extract@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/css-selector-extract/-/css-selector-extract-2.0.1.tgz#f3c2646f424fb617e0dc2fce042da38163a7befa"
dependencies:
postcss "^5.2.0"
postcss "^5.2.6"
optionalDependencies:
esdoc "^0.4.8"

Expand Down Expand Up @@ -1751,11 +1751,11 @@ node-sass-package-importer@^3.0.0:
dependencies:
resolve "^1.1.7"

node-sass-selector-importer@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/node-sass-selector-importer/-/node-sass-selector-importer-3.1.0.tgz#ccedddb8228c6df8bb3492736b6b3fe3aa5194e4"
node-sass-selector-importer@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/node-sass-selector-importer/-/node-sass-selector-importer-4.0.0.tgz#4ec5e6b87b04e1d4c28f1c8fd1a249e7a4b7ca59"
dependencies:
css-selector-extract "^1.3.1"
css-selector-extract "^2.0.1"
node-sass "^3.13.0"
postcss-scss "^0.3.1"

Expand Down Expand Up @@ -1977,7 +1977,7 @@ postcss-scss@^0.3.1:
dependencies:
postcss "^5.2.4"

postcss@^5.2.0, postcss@^5.2.4:
postcss@^5.2.4:
version "5.2.4"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.4.tgz#8eb4bee3e5c4e091585b116df32d8db24a535f21"
dependencies:
Expand All @@ -1986,6 +1986,15 @@ postcss@^5.2.0, postcss@^5.2.4:
source-map "^0.5.6"
supports-color "^3.1.2"

postcss@^5.2.6:
version "5.2.6"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.6.tgz#a252cd67cd52585035f17e9ad12b35137a7bdd9e"
dependencies:
chalk "^1.1.3"
js-base64 "^2.1.9"
source-map "^0.5.6"
supports-color "^3.1.2"

pre-git@^3.11.1:
version "3.11.1"
resolved "https://registry.yarnpkg.com/pre-git/-/pre-git-3.11.1.tgz#79e65963e7b1ec4afe8768b6645210f73ad1fef3"
Expand Down

0 comments on commit 52eb789

Please sign in to comment.