Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var jsVars = require('interpret').jsVariants,
endsWith = require('lodash.endswith'),
availableExts = Object.keys(jsVars),
chalk = require('chalk');
// sort extensions to ensure that .babel.js and
// similar ones are always matched before .js
availableExts.sort(function(a, b) {
var res = -(a.split(/\./).length - b.split(/\./).length);
// all things being equal, we need to
// prioritize .js as it is most likely
if(res === 0) {
if(a === '.js') {
return -1;
}
if(b === '.js') {
return 1;
}
return 0;
shipit.start(runTasks)
}
}
function invoke(env) {
asyncInvoke(env).catch(error => {
setTimeout(() => {
throw error
})
})
}
const cli = new Liftoff({
name: 'shipit',
extensions: interpret.jsVariants,
v8flags,
})
cli.launch(
{
configPath: program.shipitfile,
require: program.require,
},
invoke,
)