diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 2e0d506ab..6671de6cd 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -147,6 +147,12 @@ - **Table** - Fix inheritance of text alignment and vertical alignment - **Transition** - Fixed bug where transition could sometimes not occur when an element was determined to always be hidden +### Version 1.11.8 - April 13, 2015 + +**Bugs** +- **Build Tools** - Fixed `npm install` without `semantic.json` to merge changes with site theme and packaged themes in a similar fashion to `npm update` +- **Build** - `gulp build` now properly warns against missing `semantic.json` **Thanks @rudyrk** + ### Version 1.11.7 - April 13, 2015 **Bugs** diff --git a/tasks/build.js b/tasks/build.js index aab1f6d01..f9c941f7f 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -16,7 +16,7 @@ module.exports = function(callback) { console.info('Building Semantic'); if( !install.isSetup() ) { - console.error('Cannot find semantic.json file. Run "gulp install" to set-up Semantic'); + console.error('Cannot find semantic.json. Run "gulp install" to set-up Semantic'); return; } diff --git a/tasks/config/project/config.js b/tasks/config/project/config.js index dd956d7c0..3d0fecf45 100644 --- a/tasks/config/project/config.js +++ b/tasks/config/project/config.js @@ -119,6 +119,13 @@ module.exports = { config.globs = {}; } + // remove duplicates from component array + if(config.components instanceof Array) { + config.components = config.components.filter(function(component, index) { + return config.components.indexOf(component) == index; + }); + } + // takes component object and creates file glob matching selected components config.globs.components = (typeof config.components == 'object') ? (config.components.length > 1) diff --git a/tasks/config/project/install.js b/tasks/config/project/install.js index 2319c2898..a0df16d25 100644 --- a/tasks/config/project/install.js +++ b/tasks/config/project/install.js @@ -227,7 +227,7 @@ module.exports = { siteVariable: /@siteFolder .*\'(.*)/mg }, - // source paths (relative to tasks/install.js ) + // source paths (when installing) source: { config : './semantic.json.example', definitions : './src/definitions', @@ -238,6 +238,7 @@ module.exports = { themeConfig : './src/theme.config.example', themeImport : './src/theme.less', themes : './src/themes', + defaultTheme : './src/themes/default', userGulpFile : './tasks/config/npm/gulpfile.js' }, @@ -254,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..97b1f3a43 100644 --- a/tasks/install.js +++ b/tasks/install.js @@ -64,7 +64,7 @@ module.exports = function () { console.clear(); - /* Test NPM + /* Test NPM install manager = { name : 'NPM', root : path.normalize(__dirname + '/../') @@ -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 : path.join(folders.themes, 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); @@ -305,7 +311,7 @@ module.exports = function () { else { console.info('Creating site theme folder', installPaths.site); } - wrench.copyDirSyncRecursive(source.site, installPaths.site, settings.wrench.site); + wrench.copyDirSyncRecursive(source.site, installPaths.site, settings.wrench.merge); /*-------------- Theme Config