Files
yarn/bin/yarn.js
Burak Yigit Kaya 3a3bed7520 build(node4): Drop Node 4 builds which has expired
Thanks for all the fish Node 4, you won't be missed.
2018-04-26 10:19:19 +01:00

30 lines
889 B
JavaScript
Executable File

#!/usr/bin/env node
/* eslint-disable no-var */
/* eslint-disable flowtype/require-valid-file-annotation */
'use strict';
var ver = process.versions.node;
var majorVer = parseInt(ver.split('.')[0], 10);
if (majorVer < 6) {
console.error('Node version ' + ver + ' is not supported, please use Node.js 6.0 or higher.');
process.exit(1); // eslint-disable-line no-process-exit
} else {
var dirPath = '../lib/';
var v8CompileCachePath = dirPath + 'v8-compile-cache';
var fs = require('fs');
// We don't have/need this on dev builds
if (fs.existsSync(v8CompileCachePath)) {
require(v8CompileCachePath);
}
// Just requiring this package will trigger a yarn run since the
// `require.main === module` check inside `cli/index.js` will always
// be truthy when built with webpack :(
var cli = require(dirPath + 'cli');
if (!cli.autoRun) {
cli.default();
}
}