Matt Nelson
12/20/2023, 9:34 PMpackage.json
that some files within the package are "optional" and able to be excluded (or is that even something that needs to be done)?
Looking to achieve the same sort of functionality that Java/Android app's have with the ability to exclude resources (such as android's packagingOptions
gradle dsl). Is this something I need to define in the npm publication's package.json
?
e.g.
I publish https://www.npmjs.com/package/kmp-tor-binary-resources?activeTab=code
It contains pre-built native binaries for many platforms and architectures.
But want to be able to selectively exclude
files within the io/matthewnelson/kmp/tor/binary/native
directory for platforms that my node application won't be running on.Big Chungus
12/20/2023, 10:11 PMBig Chungus
12/20/2023, 10:11 PMBig Chungus
12/20/2023, 10:12 PMBig Chungus
12/20/2023, 10:13 PMMatt Nelson
12/21/2023, 8:46 AMHmm, I don't think that's something npm supports. Most bin packages published there usually just have the executables for all the platforms bundled together.Yeah, even though I've gzipped all the files individually, it's still a 40mb package. Tor is not small.
Big Chungus
12/21/2023, 11:45 PMMatt Nelson
12/22/2023, 11:10 AMMatt Nelson
12/22/2023, 11:14 AMjs("require.resolve({module-name}/io/matthewnelson/kmp/tor/binary/{platform}/{arch}/tor.gz") as String
and writing it to the filesystem