From 63a0a10260243b3856e53f3a82f77dcaeff71052 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Wed, 8 Jun 2016 20:02:08 -0300 Subject: [PATCH] Fix application startup process --- bower.json | 4 +--- gulp/build.js | 6 +++--- src/app/index.ts | 14 +++++++++++++- src/index.html | 10 ++++------ 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/bower.json b/bower.json index d620d14..9d2526a 100644 --- a/bower.json +++ b/bower.json @@ -46,9 +46,7 @@ "ng-ckeditor": { "main": [ "ng-ckeditor.js", - "libs/ckeditor/lang", - "libs/ckeditor/ckeditor.js", - "libs/ckeditor/config.js" + "libs/ckeditor/ckeditor.js" ] }, "bootstrap-sass": { diff --git a/gulp/build.js b/gulp/build.js index 951f420..0b7424e 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -30,7 +30,8 @@ gulp.task('partials', function () { quotes: true })) .pipe($.angularTemplatecache('templateCacheHtml-'+partialPath+'.js', { - module: 'noosferoApp', + module: 'noosfero.templates.' + partialPath, + standalone: true, root: partialPath })) .pipe(gulp.dest(conf.paths.tmp + '/partials/'))); @@ -81,7 +82,6 @@ gulp.task('html', ['inject', 'partials'], function () { .pipe($.revReplace({prefix: noosferoThemePrefix})) .pipe(htmlFilter) .pipe($.replace('/bower_components/ng-ckeditor/libs/ckeditor/', noosferoThemePrefix + 'ng-ckeditor/libs/ckeditor/')) - .pipe($.replace('/bower_components/ng-ckeditor/ng-ckeditor.min.js', noosferoThemePrefix + 'ng-ckeditor/ng-ckeditor.min.js')) .pipe($.minifyHtml({ empty: true, spare: true, @@ -103,7 +103,7 @@ gulp.task('fonts', function () { }); gulp.task('ckeditor', function () { - conf.wiredep.exclude.push(/ckeditor/); // exclude ckeditor from build to improve performance + conf.wiredep.exclude.push(/bower_components\/ng-ckeditor\/libs\/ckeditor/); // exclude ckeditor from build to improve performance return gulp.src(['bower_components/ng-ckeditor/**/*']).pipe(gulp.dest(path.join(conf.paths.dist, '/ng-ckeditor'))); }); diff --git a/src/app/index.ts b/src/app/index.ts index fb601fe..276acac 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -6,7 +6,19 @@ import {AuthEvents} from "./login/auth-events"; declare var moment: any; -angular.module('noosfero.init', []).config(noosferoModuleConfig). +//FIXME see a better way to declare template modules for dev mode +try { + angular.module('noosfero.templates.app'); +} catch (error) { + angular.module('noosfero.templates.app', []); +} +try { + angular.module('noosfero.templates.plugins'); +} catch (error) { + angular.module('noosfero.templates.plugins', []); +} +angular.module('noosfero.init', ['noosfero.templates.app', 'noosfero.templates.plugins']). + config(noosferoModuleConfig). run(noosferoAngularRunBlock). constant("moment", moment). constant("AuthEvents", AuthEvents); diff --git a/src/index.html b/src/index.html index 463d494..34939d9 100644 --- a/src/index.html +++ b/src/index.html @@ -30,6 +30,7 @@ + @@ -38,15 +39,12 @@ - - - + + + - - - -- libgit2 0.21.2