UNPKG

1.16 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3debugger;
4require('source-map-support/register');
5const altt_options_1 = require("./altt/altt-options");
6const env = altt_options_1.getEnvFromArgv(process.argv);
7const options = altt_options_1.getAlttOptions(env, process.cwd());
8if (!options.deploy) {
9 throw new Error('Create a deploy section in altt.json');
10}
11function tryRequire(mod) {
12 try {
13 return require(mod).default;
14 }
15 catch (err) {
16 return null;
17 }
18}
19const modName = `@altt/altt-deploy-${options.deploy.using}`;
20const deployer = tryRequire(options.deploy.using) ||
21 tryRequire(modName) ||
22 tryRequire(process.cwd() + '/node_modules/' + options.deploy.using) ||
23 tryRequire(process.cwd() + '/node_modules/' + modName);
24if (!deployer) {
25 console.error(`Could not load ${options.deploy.using}, do you have it installed?
26
27 npm install ${modName} --save-dev
28 `);
29 process.exit(1);
30}
31const argv = [process.argv[0], __filename, ...process.argv.slice(2)];
32deployer(env, argv).catch(err => {
33 console.error(err);
34 process.exit(1);
35});
36//# sourceMappingURL=altt-deploy.js.map
\No newline at end of file