UNPKG

@interaktiv/dia-scripts

Version:

CLI toolbox with common scripts for most sort of projects at DIA

29 lines (21 loc) 717 B
#!/usr/bin/env node "use strict"; const updateNotifier = require('update-notifier'); const semver = require('semver'); const diaScriptsPkg = require('../package.json'); const { SCRIPTS_PACKAGE_NAME, pkg } = require('./utils'); const { engines: { node: supportedNodeVersion } = {} } = diaScriptsPkg; // Check min Node version if we run self if (pkg.name === SCRIPTS_PACKAGE_NAME && semver.satisfies(process.version, supportedNodeVersion) === false) { throw new Error(`You must use Node version ${supportedNodeVersion} to run the scripts within ${pkg.name} because we dogfood the untranspiled version of the scripts.`); } updateNotifier({ pkg: diaScriptsPkg }).notify(); require('./run-script');