Skip to content

Commit 1a3db29

Browse files
committed
touchups
1 parent 6050781 commit 1a3db29

File tree

5 files changed

+4742
-6
lines changed

5 files changed

+4742
-6
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ contributing.md
44
coverage
55
.nyc_output
66
.travis.yml
7+
yarn.lock

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ postcss: (ctx) => {
6161

6262
| Name | Description | Default |
6363
| ---- | ----------- | ------- |
64-
| **root** | Root path used to resolve layouts and includes | |
65-
| **path** | A path to a folder or an array of paths, telling postcss-import where to look for sss or css files to `@import`. | Defaults to the `assets/css` folder. |
66-
| **webpack** | Shortcut for webpack users to set the `root` and `addDependencyTo` options more easily. Pass webpack loader context. | |
64+
| **root** | Root path used to resolve paths from | If `webpack` option is provided, `options.context` |
65+
| **path** | A path to a folder or an array of paths, telling postcss-import where to look for sss or css files to `@import`. | If `webpack` option is provided, `loaderContext.resourcePath` |
66+
| **webpack** | Shortcut for webpack users to set the `root` and `path` options more easily. Pass webpack loader context. | |
6767
| **browsers** | Browser support provided to [autoprefixer](http://cssnext.io/usage/#browsers) | `> 1%, last 2 versions, Firefox ESR` |
6868
| **features** | Enable or disable [cssnext features](http://cssnext.io/usage/#features) | |
6969
| **warnForDuplicates** | Enable or disable [cssnext duplicate warnings](http://cssnext.io/usage/#warnforduplicates) | `true` |

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ module.exports = (options = {}) => {
99
if (options.parser === false) parser = undefined
1010
options.path = options.path ? Array.prototype.concat(options.path) : []
1111

12-
// define addDependencyTo if the webpack object is provided
12+
// define root/path defaults if the webpack object is provided
1313
if (options.webpack) {
1414
options.root = options.webpack.options.context
1515
options.path.push(options.webpack.resourcePath)
1616
}
1717

1818
// standard options merge
19-
const importOpt = selectiveMerge(options, ['root', 'addDependencyTo', 'path'])
19+
const importOpt = selectiveMerge(options, ['root', 'path'])
2020
const cssnextOpt = selectiveMerge(options, ['browsers', 'features', 'warnForDuplicates'])
2121

2222
// define normal plugin list

test/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ test('basic', (t) => {
2525
parser: false,
2626
webpack: {
2727
resourcePath: 'test',
28-
addDependency: 'test',
2928
options: { context: 'test' }
3029
},
3130
path: ['test/test1', 'test/test2'],

0 commit comments

Comments
 (0)