Closed aoli-al closed 7 years ago
npm scripts package
和 clean
好像也不太能在windows上用,之前没有env
直接写变量,森森说windows不支持,加了env
可以在cygwin下用好像。
我打算看看把环境变量去掉吧,看看能不能都在js里处理,这样更能跨平台点
Use git bash or wsl
node is not really working with wsl. I'm using windows 10 stable, it will crash when I do npm start.
What about Git Bash?
Nobody is using git bash.
我初步打算用一下这个 https://github.com/dthree/cash
但是如果把环境变量放参数里那指定服务器就比较麻烦。。npm scripts好像没法加用户参数?
npm run someScript -- argv0 argv1 ...
npm run someScript argv0 argv1 ...
或者继续用环境变量 https://github.com/kentcdodds/cross-env
那个cross-env看起来可以。。。
他们最后逼用户下了一个git bash ((
我们没有逼用户,用户不需要git bash也能用
你们没有用户((
你不是用户,你是开发者
既然wsl用不了了。。。
Use this to change your life: https://git-scm.com/download/win
'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