Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
605 B
20 lines
605 B
let parts = [process.platform, process.arch];
|
|
if (process.platform === 'linux') {
|
|
const {MUSL, family} = require('detect-libc');
|
|
if (family === MUSL) {
|
|
parts.push('musl');
|
|
} else if (process.arch === 'arm') {
|
|
parts.push('gnueabihf');
|
|
} else {
|
|
parts.push('gnu');
|
|
}
|
|
} else if (process.platform === 'win32') {
|
|
parts.push('msvc');
|
|
}
|
|
|
|
let name = `./fs-search.${parts.join('-')}.node`;
|
|
if (process.env.PARCEL_BUILD_ENV === 'production') {
|
|
module.exports = require(name);
|
|
} else if (require('fs').existsSync(require('path').join(__dirname, name))) {
|
|
module.exports = require(name);
|
|
}
|
|
|