Browse Source

Install path changes #2101

pull/2136/head
jlukic 9 years ago
parent
commit
d6e0ccbf23
2 changed files with 22 additions and 15 deletions
  1. 5
      tasks/config/project/install.js
  2. 32
      tasks/install.js

5
tasks/config/project/install.js

@ -255,14 +255,15 @@ module.exports = {
folders: { folders: {
config : './', config : './',
definitions : 'src/definitions/', definitions : 'src/definitions/',
defaultTheme : 'default/',
lessImport : 'src/', lessImport : 'src/',
modules : 'node_modules/', modules : 'node_modules/',
site : 'src/site/', site : 'src/site/',
tasks : 'tasks/', tasks : 'tasks/',
themeConfig : 'src/', themeConfig : 'src/',
themeImport : '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 // questions asked during install

32
tasks/install.js

@ -87,12 +87,13 @@ module.exports = function () {
var var
updateFolder = path.join(manager.root, currentConfig.base), updateFolder = path.join(manager.root, currentConfig.base),
updatePaths = { 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); wrench.copyDirSyncRecursive(source.definitions, updatePaths.definition, settings.wrench.overwrite);
console.info('Updating default theme...'); 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...'); console.info('Updating tasks...');
wrench.copyDirSyncRecursive(source.tasks, updatePaths.tasks, settings.wrench.overwrite); wrench.copyDirSyncRecursive(source.tasks, updatePaths.tasks, settings.wrench.overwrite);
@ -233,11 +235,12 @@ module.exports = function () {
// special install paths only for PM install // special install paths only for PM install
installPaths = extend(false, {}, installPaths, { 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 // add project root to semantic root
@ -269,7 +272,10 @@ module.exports = function () {
console.info('Copying UI definitions'); console.info('Copying UI definitions');
wrench.copyDirSyncRecursive(source.definitions, installPaths.definition, settings.wrench.overwrite); 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'); console.info('Copying gulp tasks');
wrench.copyDirSyncRecursive(source.tasks, installPaths.tasks, settings.wrench.overwrite); wrench.copyDirSyncRecursive(source.tasks, installPaths.tasks, settings.wrench.overwrite);

Loading…
Cancel
Save