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

NODE_ENV doesn't work on windows #1

Open
yoshuawuyts opened this issue Aug 31, 2017 · 3 comments
Open

NODE_ENV doesn't work on windows #1

yoshuawuyts opened this issue Aug 31, 2017 · 3 comments

Comments

@yoshuawuyts
Copy link
Member

See choojs/create-choo-app#20

λ npm start

> choo-electon-app-01@1.0.0 start D:\gitwork\choo-electon-app-01
> NODE_ENV=development electron main.js

'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
@conoro
Copy link

conoro commented Aug 31, 2017

This works on Windows:

"start": "set NODE_ENV=development && electron main.js"

@chrisdwheatley
Copy link

Took a quick look at this & the related issue in create-choo-app, I think you might be able to get away with not using cross-env (for now at least) by removing the setting of NODE_ENV and allowing users to set it themselves when desired.

e.g. UNIX users run NODE_ENV=production && npm start, Windows users run set NODE_ENV=production & npm start and so on and so forth for other platforms.

There may be some intricacies I'm missing so feel free to correct me if that's the case.

@yoshuawuyts
Copy link
Member Author

@chrisdwheatley from my own experience I tend to forget setting NODE_ENV=production all too often, haha — something we might do is set the knob to production in bankai build by default, so we can evade this.

A PR would be very welcome to set that behavior by default in Bankai, and then another to remove cross-env from all our create-choo-* repos! — hope this make sense; thanks! ✨

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

No branches or pull requests

3 participants