Skip to content

Commit

Permalink
Use more lenient pattern-matching for Webpack files
Browse files Browse the repository at this point in the history
We currently expect every Webpack manifest to include a stem of `config`
or `conf`. Webpack's configuration docs tell a different story, however.
At least three different filenames are mentioned, none of them even make
mention of a `.config.js` suffix!

See: https://webpack.js.org/guides/production/
Fixes #748
  • Loading branch information
Alhadis committed Jul 15, 2018
1 parent 9d6a96a commit 3c1fef3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
[Unpublished]: https://github.com/file-icons/atom/compare/v2.1.22...HEAD


[Unpublished]
----------------------
### Added
- [[`#748`][]]: Significantly better support for [Webpack configs][], which no longer require `config` or `conf` to be part of the filename.

[Webpack configs]: https://webpack.js.org/guides/production/
[`#748`]: https://github.com/file-icons/atom/issues/748



[v2.1.22] - 2018-07-03
----------------------
### Added
Expand Down
6 changes: 2 additions & 4 deletions config.cson
Original file line number Diff line number Diff line change
Expand Up @@ -4821,10 +4821,8 @@ fileIcons:
Webpack:
icon: "webpack"
priority: 2
match: [
[/webpack(\.[\w\-]+)*\.conf(ig)?\./i, "medium-blue"]
[/^webpackfile\.js$/i, "medium-blue"]
]
match: /(^|\.)webpack(file)?(?=\.|$).*\.([jt]sx?|json)$/i
colour: "medium-blue"

WeChat:
icon: "wechat"
Expand Down
2 changes: 1 addition & 1 deletion lib/icons/.icondb.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ module.exports = [
["vs-icon",["dark-green","dark-green"],/\.vssettings(?:\.json)?$/i,2],
["vs-icon",["medium-blue","medium-blue"],/\.vscodeignore(?:\.json)?$/i,2],
["watchman-icon",["medium-blue","medium-blue"],/\.watchmanconfig$|^watchman\.json$/i,2],
["webpack-icon",["medium-blue","medium-blue"],/webpack(?:\.[\w\-]+)*\.conf(?:ig)?\.|^webpackfile\.js$/i,2],
["webpack-icon",["medium-blue","medium-blue"],/(?:^|\.)webpack(?:file)?(?=\.|$).*\.(?:[jt]sx?|json)$/i,2],
["wercker-icon",["medium-purple","medium-purple"],/^wercker\.ya?ml$/i,2],
["workbox-icon",["medium-orange","medium-orange"],/^workbox-config\.js$/i,2],
["yarn-icon",["medium-blue","medium-blue"],/^yarn\.lock$|\.yarn-metadata(?:\.json)?$/i,2],
Expand Down

0 comments on commit 3c1fef3

Please sign in to comment.