Repository navigation
Do platform checks at build time - #390
Conversation
|
The glorious unreachable code removal for production builds: |
|
|
||
| private static getAskPassTrampolinePath(): string { | ||
| const extension = process.platform === 'win32' ? 'bat' : 'sh' | ||
| const extension = __WIN32__ ? 'bat' : 'sh' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Absolutely glorious. The only downside is that we're reducing the meaning of the warning from uglifyjs but I can't say that we've been inspecting them closely anyway. It'd be real nice if we could figure out if it's feasible to write our own lint checks so that we could enforce that we don't start accessing process.platform in the future. |
Me neither. And I think TypeScript would warning us about most everything too (unused expressions, unreachable code, etc.).
That's a' nerd sniping' 🎯 |
Fixes #384