Add .gitignore to exclude all node packages and lock files
This commit is contained in:
Generated
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.loadConfig = void 0;
|
||||
const node_fs_1 = require("node:fs");
|
||||
const node_path_1 = __importDefault(require("node:path"));
|
||||
const load_config_1 = require("./load-config");
|
||||
const log_1 = require("./log");
|
||||
const parsed_cli_1 = require("./parsed-cli");
|
||||
const defaultConfigFileJavascript = 'remotion.config.js';
|
||||
const defaultConfigFileTypescript = 'remotion.config.ts';
|
||||
const loadConfig = (remotionRoot) => {
|
||||
if (parsed_cli_1.parsedCli.config) {
|
||||
const fullPath = node_path_1.default.resolve(process.cwd(), parsed_cli_1.parsedCli.config);
|
||||
if (!(0, node_fs_1.existsSync)(fullPath)) {
|
||||
log_1.Log.error({ indent: false, logLevel: 'error' }, `You specified a config file location of "${parsed_cli_1.parsedCli.config}" but no file under ${fullPath} was found.`);
|
||||
process.exit(1);
|
||||
}
|
||||
return (0, load_config_1.loadConfigFile)(remotionRoot, parsed_cli_1.parsedCli.config, fullPath.endsWith('.js'));
|
||||
}
|
||||
if (remotionRoot === null) {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
if ((0, node_fs_1.existsSync)(node_path_1.default.resolve(remotionRoot, defaultConfigFileTypescript))) {
|
||||
return (0, load_config_1.loadConfigFile)(remotionRoot, defaultConfigFileTypescript, false);
|
||||
}
|
||||
if ((0, node_fs_1.existsSync)(node_path_1.default.resolve(remotionRoot, defaultConfigFileJavascript))) {
|
||||
return (0, load_config_1.loadConfigFile)(remotionRoot, defaultConfigFileJavascript, true);
|
||||
}
|
||||
return Promise.resolve(null);
|
||||
};
|
||||
exports.loadConfig = loadConfig;
|
||||
Reference in New Issue
Block a user