Skip to content

Commit

Permalink
Merge pull request #146 from postcss/remove-glob
Browse files Browse the repository at this point in the history
Remove glob support
  • Loading branch information
MoOx committed Jan 9, 2016
2 parents 4fb0c2b + b6ae424 commit 74879af
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 83 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ postcssImport({
})
```

- Removed: glob support
([#146](https://github.com/postcss/postcss-import/pull/146))

Globs can be implemented with custom `resolve` option

```js
postcssImport({
resolve: function(id, base) {
return glob.sync(path.join(base, id))
}
})
```

# 7.1.3 - 2015-11-05

- Fixed: ensure node 0.12 compatibility, round 2
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@ Default: `null`

Function called after the import process. Take one argument (array of imported files).

#### `glob`

Type: `Boolean`
Default: `false`

Set to `true` if you want @import rules to parse glob patterns.
Files will be searched in base directory and paths specified in `path` option.

#### `resolve`

Type: `Function`
Expand Down
8 changes: 0 additions & 8 deletions lib/resolve-id.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var fs = require("fs")
var path = require("path")
var globby = require("globby")
var resolve = require("resolve")

var moduleDirectories = [
Expand Down Expand Up @@ -36,13 +35,6 @@ function resolveModule(id, opts) {
module.exports = function(id, base, options) {
var paths = options.path

if (options.glob) {
paths = [ base ].concat(paths)
return globby(paths.map(function(p) {
return path.resolve(p, id)
}))
}

var resolveOpts = {
basedir: base,
moduleDirectory: moduleDirectories,
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"index.js"
],
"dependencies": {
"globby": "^4.0.0",
"object-assign": "^4.0.1",
"postcss": "^5.0.2",
"postcss-value-parser": "^3.2.3",
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/glob-base.css

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/glob-base.expected.css

This file was deleted.

2 changes: 0 additions & 2 deletions test/fixtures/glob-missing.css

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/glob-missing.expected.css

This file was deleted.

5 changes: 0 additions & 5 deletions test/fixtures/glob-resolve.css

This file was deleted.

10 changes: 0 additions & 10 deletions test/fixtures/glob-resolve.expected.css

This file was deleted.

2 changes: 0 additions & 2 deletions test/fixtures/glob.css

This file was deleted.

3 changes: 0 additions & 3 deletions test/fixtures/glob.expected.css

This file was deleted.

41 changes: 0 additions & 41 deletions test/glob.js

This file was deleted.

0 comments on commit 74879af

Please sign in to comment.