@thaunknown/v8-profiler-next
Version:
node bindings for the v8 profiler
24 lines (18 loc) • 593 B
JavaScript
;
const path = require('path');
const fs = require('fs');
const versioning = require('@xprofiler/node-pre-gyp/lib/util/versioning.js');
const packagePath = versioning.evaluate(require('../package.json')).staged_tarball;
function copy() {
const release = path.join(__dirname, '../release');
if (!fs.existsSync(release)) {
fs.mkdirSync(release);
}
if (!fs.existsSync(packagePath)) {
return;
}
const filename = path.basename(packagePath);
const target = path.join(release, filename);
fs.copyFileSync(packagePath, target);
}
copy();