Gestion des imports dans les profils

This commit is contained in:
2015-11-05 14:39:48 +01:00
parent bb26fc2759
commit 996ccd90f1
8 changed files with 101 additions and 23 deletions

View File

@ -4,7 +4,7 @@ var LOAD_PROFILE = exports.LOAD_PROFILE = 'LOAD_PROFILE';
var LOAD_PROFILE_SUCCESS = exports.LOAD_PROFILE_SUCCESS = 'LOAD_PROFILE_SUCCESS';
var LOAD_PROFILE_FAILED = exports.LOAD_PROFILE_FAILED = 'LOAD_PROFILE_FAILED';
exports.loadProfile = function(profilePath) {
exports.loadProfile = function(profilePath, withImports) {
return function(dispatch, getState) {
@ -12,7 +12,7 @@ exports.loadProfile = function(profilePath) {
Util.Logger.info('Loading profile "%s"', profilePath);
return Util.System.loadJSON(profilePath)
return Util.Profile.load(profilePath, withImports)
.then(function(profile) {
Util.Logger.info('Profile loaded.');
dispatch({ type: LOAD_PROFILE_SUCCESS, profile: profile });