Allow boolean plugins support#142
Merged
egoist merged 3 commits intoegoist:masterfrom Jan 22, 2019
vinkla:boolean
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #142 +/- ##
==========================================
+ Coverage 94.61% 94.64% +0.02%
==========================================
Files 8 8
Lines 223 224 +1
Branches 77 78 +1
==========================================
+ Hits 211 212 +1
Misses 12 12
Continue to review full report at Codecov.
|
egoist
pushed a commit
that referenced
this pull request
Jan 22, 2019
* perform minimize after extract is finished * Allow boolean plugins support (#142) Allow boolean plugins similar to how Rollup plugins work. In the Rollup plugins array you may write the following to only run a plugin for production usage: ```js plugins: [ (process.env.NODE_ENV === 'production' && terser()) ] ``` This pull request allow the same approach for PostCSS plugins: ```js plugins: [ (process.env.NODE_ENV === 'production' && cssnano()) ] ``` [Example of how Rollup has implemented this feature.](https://github.com/rollup/rollup/blob/f58d1e60a3da4b8470e5d56aa0caef2ecadec2b8/src/rollup/index.ts#L107) * perform minimize after extract is finished * tweaks
bung87
pushed a commit
to bung87/rollup-plugin-postcss
that referenced
this pull request
Dec 3, 2019
Allow boolean plugins similar to how Rollup plugins work. In the Rollup plugins array you may write the following to only run a plugin for production usage: ```js plugins: [ (process.env.NODE_ENV === 'production' && terser()) ] ``` This pull request allow the same approach for PostCSS plugins: ```js plugins: [ (process.env.NODE_ENV === 'production' && cssnano()) ] ``` [Example of how Rollup has implemented this feature.](https://github.com/rollup/rollup/blob/f58d1e60a3da4b8470e5d56aa0caef2ecadec2b8/src/rollup/index.ts#L107)
bung87
pushed a commit
to bung87/rollup-plugin-postcss
that referenced
this pull request
Dec 3, 2019
* perform minimize after extract is finished * Allow boolean plugins support (egoist#142) Allow boolean plugins similar to how Rollup plugins work. In the Rollup plugins array you may write the following to only run a plugin for production usage: ```js plugins: [ (process.env.NODE_ENV === 'production' && terser()) ] ``` This pull request allow the same approach for PostCSS plugins: ```js plugins: [ (process.env.NODE_ENV === 'production' && cssnano()) ] ``` [Example of how Rollup has implemented this feature.](https://github.com/rollup/rollup/blob/f58d1e60a3da4b8470e5d56aa0caef2ecadec2b8/src/rollup/index.ts#L107) * perform minimize after extract is finished * tweaks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow boolean plugins similar to how Rollup plugins work. In the Rollup plugins array you may write the following to only run a plugin for production usage:
This pull request allow the same approach for PostCSS plugins:
Example of how Rollup has implemented this feature.