UNPKG

roc

Version:

Build modern web applications easily

47 lines (35 loc) 1.47 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getConfiguration; var _helpers = require('../helpers'); var _helpers2 = require('../configuration/helpers'); var _helpers3 = require('./helpers'); var _hooks = require('../hooks'); var _actions = require('../hooks/actions'); /** * Builds the Roc configuration object without running the cli. * * @param {string} dirPath - The directory path to create the configuration from. * @param {string} applicationConfigPath - The path to use to read configuration file. * * @returns {Object} - An object containing appConfig, config, meta, hooks and actions from {@link rocCommandObject} */ function getConfiguration(dirPath, applicationConfigPath) { const path = (0, _helpers.getAbsolutePath)(dirPath); // Build the complete config object const applicationConfig = (0, _helpers2.getApplicationConfig)(applicationConfigPath, path, false); var _buildCompleteConfig = (0, _helpers3.buildCompleteConfig)(false, applicationConfig, undefined, {}, {}, path, true, false); let packageConfig = _buildCompleteConfig.packageConfig; let configObject = _buildCompleteConfig.config; let metaObject = _buildCompleteConfig.meta; return { configObject, metaObject, packageConfig, hooks: (0, _hooks.getHooks)(), actions: (0, _actions.getActions)() }; } //# sourceMappingURL=get-configuration.js.map