Skip to content

Modify tasks to use process.env.NODE_ENV convention#23

Merged
MartijnCuppens merged 1 commit into
Intracto:masterfrom
gijsroge:feature/env
Oct 4, 2019
Merged

Modify tasks to use process.env.NODE_ENV convention#23
MartijnCuppens merged 1 commit into
Intracto:masterfrom
gijsroge:feature/env

Conversation

@gijsroge

@gijsroge gijsroge commented Sep 29, 2019

Copy link
Copy Markdown
Contributor

This would allows user to use the context in for example a PostCSS config (#19).

module.exports = (ctx) => {
    return {
        plugins: [
            require('rfs')(),
            require('postcss-inline-svg')(),
            require('autoprefixer')(),
            ctx.env === 'production' ? require('cssnano')() : false,
        ]
    }
};

Thoughts?

@MartijnCuppens

Copy link
Copy Markdown
Contributor

Yup, would be better indeed. Could you resolve the conflicts here?

…om boolean.

This allows Intracto#19 to use the env context in custom PostCSS config's.
@gijsroge

gijsroge commented Oct 3, 2019

Copy link
Copy Markdown
Contributor Author

@MartijnCuppens done.

@MartijnCuppens MartijnCuppens merged commit a285c28 into Intracto:master Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants