我对字符串和空格有问题。在创建在package.json中运行命令的别名时(由于在第一个空格剪切命令而失败)。
{
"scripts": {
...
"react-native-debugger:osx": "/Applications/React Native Debugger.app/Contents/MacOS/React Native Debugger"
...
}
}我需要这样做,以便能够自动启动环境来开发本地应用程序,而使用\进行转义则不起作用。
发布于 2018-04-19 06:25:35
我不知道是否有更好的解决方案,因为解决方案是用单引号(')设置带有空格的字符串。
{
"scripts": {
...
"react-native-debugger:osx": "/Applications/'React Native Debugger.app'/Contents/MacOS/'React Native Debugger'"
...
}
}发布于 2021-04-07 13:24:19
"scripts": {
"test": ".\\\"node modules\"\\.bin\\\"some folder\"\\protractor conf.js"
},对窗口使用反斜杠和双引号。
https://stackoverflow.com/questions/49914092
复制相似问题