From d6e0ccbf23ca50b209bc067297e212aa7cc4d454 Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 13 Apr 2015 16:21:50 -0400 Subject: [PATCH] Install path changes #2101 --- tasks/config/project/install.js | 5 +++-- tasks/install.js | 32 +++++++++++++++++++------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/tasks/config/project/install.js b/tasks/config/project/install.js index e8c4a1547..c271274c9 100644 --- a/tasks/config/project/install.js +++ b/tasks/config/project/install.js @@ -255,14 +255,15 @@ module.exports = { folders: { config : './', definitions : 'src/definitions/', - defaultTheme : 'default/', lessImport : 'src/', modules : 'node_modules/', site : 'src/site/', tasks : 'tasks/', themeConfig : 'src/', themeImport : 'src/', - themes : 'src/themes/' + themes : 'src/themes/', + + defaultTheme : 'default/' // only path that is relative to another directory and not root }, // questions asked during install diff --git a/tasks/install.js b/tasks/install.js index d7da7fc99..ec97ee83b 100644 --- a/tasks/install.js +++ b/tasks/install.js @@ -87,12 +87,13 @@ module.exports = function () { var updateFolder = path.join(manager.root, currentConfig.base), updatePaths = { - config : path.join(manager.root, files.config), - tasks : path.join(updateFolder, folders.tasks), - themeImport : path.join(updateFolder, folders.themeImport), - definition : path.join(currentConfig.paths.source.definitions), - site : path.join(currentConfig.paths.source.site), - theme : path.join(currentConfig.paths.source.themes, folders.defaultTheme) + config : path.join(manager.root, files.config), + tasks : path.join(updateFolder, folders.tasks), + themeImport : path.join(updateFolder, folders.themeImport), + definition : path.join(currentConfig.paths.source.definitions), + site : path.join(currentConfig.paths.source.site), + theme : path.join(currentConfig.paths.source.themes), + defaultTheme : path.join(currentConfig.paths.source.themes, folders.defaultTheme) } ; @@ -107,7 +108,8 @@ module.exports = function () { wrench.copyDirSyncRecursive(source.definitions, updatePaths.definition, settings.wrench.overwrite); console.info('Updating default theme...'); - wrench.copyDirSyncRecursive(source.themes, updatePaths.theme, settings.wrench.overwrite); + wrench.copyDirSyncRecursive(source.themes, updatePaths.theme, settings.wrench.merge); + wrench.copyDirSyncRecursive(source.defaultTheme, updatePaths.defaultTheme, settings.wrench.overwrite); console.info('Updating tasks...'); wrench.copyDirSyncRecursive(source.tasks, updatePaths.tasks, settings.wrench.overwrite); @@ -233,11 +235,12 @@ module.exports = function () { // special install paths only for PM install installPaths = extend(false, {}, installPaths, { - definition : folders.definitions, - lessImport : folders.lessImport, - tasks : folders.tasks, - theme : folders.themes, - themeImport : folders.themeImport + definition : folders.definitions, + lessImport : folders.lessImport, + tasks : folders.tasks, + theme : folders.themes, + defaultTheme : folders.defaultTheme, + themeImport : folders.themeImport }); // add project root to semantic root @@ -269,7 +272,10 @@ module.exports = function () { console.info('Copying UI definitions'); wrench.copyDirSyncRecursive(source.definitions, installPaths.definition, settings.wrench.overwrite); - wrench.copyDirSyncRecursive(source.themes, installPaths.theme, settings.wrench.overwrite); + + console.info('Copying UI themes'); + wrench.copyDirSyncRecursive(source.themes, installPaths.theme, settings.wrench.merge); + wrench.copyDirSyncRecursive(source.defaultTheme, installPaths.defaultTheme, settings.wrench.overwrite); console.info('Copying gulp tasks'); wrench.copyDirSyncRecursive(source.tasks, installPaths.tasks, settings.wrench.overwrite);