-
Notifications
You must be signed in to change notification settings - Fork 1.3k
how come vendor directory is ignored in package.json? #1183
Comments
We have decided not to include binaries in the npm package because currently there are 49 of them, weighing total 409 MB. With hopefully more to come! |
I understand not including the binaries in the package. My issue is that when I package up my app which depends on |
@gkatsev we understand your issue. Do you have a suggested fix that would not result in us publishing the binaries to npm? |
Including |
Sounds good. We'd be happy to see a PR. |
I haven't forgotten about this. Been away last week, hope to get a PR out this week. |
So, I've started finally looking at this in detail. Unfortunately, |
It's possible there isn't an answer here until npm/npm#10074 is resolved. |
I think a workaround is available by using this module: https://github.com/iarna/in-publish |
This is necessary because if a user is bundling node-sass in their package, the vendor directory should stay so that the user isn't required to run 'npm rebuild' afterwards, assuming that it was originally installed on a like-architecture. However, at the same time, when publishing, we don't want to include the binaries since they may not work for a user plus there's the build step that tries to download the correct binary for the current architecture. Unfortunately, npm's prepublish hook runs on both prepublish *and* npm install (see npm/npm#10074), so, using in-publish as a workaround to get the prepublish script to only run prepublish and pack but not on install. This fixes sass#1183.
Sorry it's taken so long but I finally have a PR ready for this in #1384. |
This is necessary because if a user is bundling node-sass in their package, the vendor directory should stay so that the user isn't required to run 'npm rebuild' afterwards, assuming that it was originally installed on a like-architecture. However, at the same time, when publishing, we don't want to include the binaries since they may not work for a user plus there's the build step that tries to download the correct binary for the current architecture. Unfortunately, npm's prepublish hook runs on both prepublish *and* npm install (see npm/npm#10074), so, using in-publish as a workaround to get the prepublish script to only run prepublish and pack but not on install. Fixes sass#1183 Closes sass#1384
Fix parent selector interpolation in attribute selector
I'm using node-sass in a build project of sorts which gets packaged on a CI/CD server using
npm pack
. However, because thepackage.json
is ignoring it in the files arraynpm pack
isn't including it in the output tarball.Our CI runs on the same architecture of the prod machine, so, it should just work if the binary were to be included.
Thanks!
The text was updated successfully, but these errors were encountered: