diff --git a/gulp/build.js b/gulp/build.js index f587663..01813fc 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -3,10 +3,13 @@ var path = require('path'); var gulp = require('gulp'); var rename = require('gulp-rename'); +var insert = require('gulp-insert'); var merge = require('merge-stream'); var conf = require('./conf'); -var noosferoThemePrefix = path.join("/designs/themes/angular-theme", conf.paths.dist, '/'); +var themeName = conf.paths.theme.replace('-', ' '); +themeName = themeName.charAt(0).toUpperCase() + themeName.slice(1); +var noosferoThemePrefix = path.join("/designs/themes/", conf.paths.theme, '/'); var $ = require('gulp-load-plugins')({ pattern: ['gulp-*', 'main-bower-files', 'uglify-save-license', 'del'] @@ -114,17 +117,18 @@ gulp.task('other', function () { }); gulp.task('clean', function () { - return $.del([path.join(conf.paths.dist, '/'), path.join(conf.paths.tmp, '/')]); + return $.del(["dist", path.join(conf.paths.tmp, '/')]); }); gulp.task('clean-docs', [], function() { - return $.del([path.join(conf.paths.docs, '/')]); + return $.del([path.join(conf.paths.docs, '/')]); }); gulp.task('noosfero', ['html'], function () { var layouts = gulp.src('layouts/**/*') .pipe(gulp.dest(path.join(conf.paths.dist, "layouts"))); var theme = gulp.src('theme.yml') + .pipe(insert.prepend('name: "' + themeName + '"\n')) .pipe(gulp.dest(conf.paths.dist)); var index = gulp.src(path.join(conf.paths.dist, 'index.html')) .pipe(rename('index.html.erb')) diff --git a/gulp/conf.js b/gulp/conf.js index 4c62fca..7dc9b25 100644 --- a/gulp/conf.js +++ b/gulp/conf.js @@ -22,7 +22,7 @@ exports.paths = { themes: 'themes' }; exports.configTheme = function(theme) { - exports.paths.theme = path.join(exports.paths.themes, theme || "default"); + exports.paths.theme = theme || "angular-default"; exports.paths.allSources = [exports.paths.src, exports.paths.theme]; exports.paths.dist = path.join("dist", exports.paths.theme); } diff --git a/package.json b/package.json index d6157b3..89a10af 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "ng-forward": "0.0.1-alpha.12" }, "config": { - "theme": "default" + "theme": "angular-default" }, "scripts": { "build": "webpack; gulp clean && gulp --theme=$npm_package_config_theme build", @@ -46,6 +46,7 @@ "gulp-eslint": "~1.0.0", "gulp-filter": "~3.0.1", "gulp-flatten": "~0.2.0", + "gulp-insert": "^0.5.0", "gulp-inject": "~3.0.0", "gulp-load-plugins": "~0.10.0", "gulp-minify-css": "~1.2.1", diff --git a/theme.yml b/theme.yml index da4710f..9c99c76 100644 --- a/theme.yml +++ b/theme.yml @@ -1,3 +1,2 @@ -name: "Angular theme" layout: "angular-layout" icon_theme: [default, pidgin] diff --git a/themes/angular-default/.keep b/themes/angular-default/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/themes/angular-default/.keep diff --git a/themes/default/.keep b/themes/default/.keep deleted file mode 100644 index e69de29..0000000 --- a/themes/default/.keep +++ /dev/null -- libgit2 0.21.2