-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STRWEB-111 Refresh PostCSS stack. (#142)
* remove unnecessary postcss plugins, reconfigure for native css variables * remove postcss-plugin dependencies from package.json * remove the imports of removed dependencies * Update CHANGELOG.md
- Loading branch information
Showing
5 changed files
with
36 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* omit-imports will remove imports that match the supplied 'contains' regex */ | ||
|
||
const plugin = (options = { contains: '' }) => { | ||
return { | ||
postcssPlugin: 'postcss-omit-imports', | ||
prepare (result) { | ||
return { | ||
AtRuleExit: { | ||
import: atRule => { | ||
if (options.contains && options.contains.test(atRule.params)) { | ||
atRule.remove(); | ||
} | ||
} | ||
}, | ||
} | ||
} | ||
} | ||
}; | ||
plugin.postcss = true; | ||
|
||
module.exports = plugin; |