3 ms·
Yes but how to tell npm your app doesn't run on Windows? Checking for win32 or other well-known Win-specific "process" property in your "build" npm script, and
by tannhaeuser 7y ago
Yes but how to tell npm your app doesn't run on Windows? Checking for win32 or other well-known Win-specific "process" property in your "build" npm script, and make it fail if it hasn't any of the expected valued? I'm guessing is-windows is idiomatically used for this exact purpose, and people not wanting to hard-code a heuristic for detecting Windows in their app. But then, I'm not sure third-party packages are available during execution of "build". The last time I had to deal with this, it didn't work out as I intended, and I ran out of time to find a robust, generally used idiom for this.