Artificial intelligent assistant

npm scriptsでif文を使用したい packackge.json TravisCI`npm publish`hook { "scripts": { "prepublish": "if [ $TRAVIS ]; then npm run compile; fi" } } bash Windows `npm install`hook`$TRAVIS was unexpected at this time.` Windows`npm publish`/`npm install`TRAVIS

{
"scripts": {
"prepublish": "node -e \"if(process.env.TRAVIS){}else{process.exit(1)}\" && echo true || echo false"
}
}


Win/Mac

~~Evaluate script **Travis** ifwin/mac~~


{
"scripts": {
"prepublish": "node -e \"if(!process.env.TRAVIS)process.exit(1)\" && npm run compile"
}
}


~~bash`"``!``"``'`bat~~


$ node ifTravis.js && npm run compile


~~~~

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d37ff5ae4e924b7d39cfdb1cd0c73e91