GyrosWorkshop / WukongWeb

Wukong Music Web Client
MIT License
2 stars 1 forks source link

Make Windows happy #38

Closed aoli-al closed 7 years ago

aoli-al commented 7 years ago

'env' is not recognized as an internal or external command, operable program or batch file.

http://stackoverflow.com/questions/9249830/how-can-i-set-node-env-production-in-windows

Qusic commented 7 years ago

npm scripts packageclean 好像也不太能在windows上用,之前没有env直接写变量,森森说windows不支持,加了env可以在cygwin下用好像。

我打算看看把环境变量去掉吧,看看能不能都在js里处理,这样更能跨平台点

Senorsen commented 7 years ago

Use git bash or wsl

aoli-al commented 7 years ago

node is not really working with wsl. I'm using windows 10 stable, it will crash when I do npm start.

Senorsen commented 7 years ago

What about Git Bash?

aoli-al commented 7 years ago

Nobody is using git bash.

Qusic commented 7 years ago

我初步打算用一下这个 https://github.com/dthree/cash

但是如果把环境变量放参数里那指定服务器就比较麻烦。。npm scripts好像没法加用户参数?

Senorsen commented 7 years ago
npm run someScript -- argv0 argv1 ...
npm run someScript argv0 argv1 ...
Qusic commented 7 years ago

或者继续用环境变量 https://github.com/kentcdodds/cross-env

aoli-al commented 7 years ago

那个cross-env看起来可以。。。

aoli-al commented 7 years ago

他们最后逼用户下了一个git bash ((

Qusic commented 7 years ago

我们没有逼用户,用户不需要git bash也能用

aoli-al commented 7 years ago

你们没有用户((

Senorsen commented 7 years ago

你不是用户,你是开发者

aoli-al commented 7 years ago

既然wsl用不了了。。。

Senorsen commented 7 years ago

Use this to change your life: https://git-scm.com/download/win