Package Exports
- detect-libc
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (detect-libc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
detect-libc
Node.js module to detect the C standard library (libc) implementation family and version in use on a given system.
Provides a value suitable for use with the --libc option of
prebuild,
prebuild-ci and
prebuild-install,
therefore allowing build and provision of pre-compiled binaries
for musl-based Linux e.g. Alpine as well as glibc-based.
Currently supports libc detection on Linux (glibc, musl) and OS X (bsd).
Install
npm install detect-libcUsage
detect-libc-family
Prints the libc family e.g. "glibc" or "musl" to stdout.
detect-libc-version
Prints the libc version e.g. "1.23" to stdout.
API
const { family, version } = require('detect-libc');familyis a String containing the system's libc family.versionis a String representing the system's libc version.
Integrating with prebuild
"scripts": {
"install": "prebuild-install --libc `detect-libc-family` || node-gyp rebuild",
"test": "mocha && prebuild-ci --libc `detect-libc-family`"
},
"dependencies": {
"detect-libc": "^0.0.3",
"prebuild-install": "^2.1.2"
},
"devDependencies": {
"prebuild": "^6.2.0",
"prebuild-ci": "^2.2.2"
}Licence
Copyright 2017 Lovell Fuller
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.