Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove glob support #146

Merged
merged 2 commits into from
Jan 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.