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

Use dotenv variables to switch dev mode in grunt #549

Open
TiSiE opened this issue Jul 18, 2019 · 0 comments
Open

Use dotenv variables to switch dev mode in grunt #549

TiSiE opened this issue Jul 18, 2019 · 0 comments

Comments

@TiSiE
Copy link
Member

TiSiE commented Jul 18, 2019

Currently Grunt is called after npm install.
It is however unaware of the environment (development / test / production)
Because of this, even in development environments, all generated files will be 'uglified' by grunt - as it assumes production env.
We also define a grunt task alias for development environments omitting the 'uglification' of files.

We are using a dotenv file to set environment variables for the composer and php application.

There is a dotenv library available for nodes.

So the goal is to create a npm post-install script that calls grunt with environment specific tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant