Commit a8b161351e4495929768f6f1de831fe99314dc6c
Committed by
Ábner Oliveira
1 parent
139f17f3
Exists in
master
and in
10 other branches
Fix application startup process
The use of bootstrap to start the application broke the startup process.
Showing
4 changed files
with
21 additions
and
13 deletions
Show diff stats
bower.json
@@ -47,9 +47,7 @@ | @@ -47,9 +47,7 @@ | ||
47 | "ng-ckeditor": { | 47 | "ng-ckeditor": { |
48 | "main": [ | 48 | "main": [ |
49 | "ng-ckeditor.js", | 49 | "ng-ckeditor.js", |
50 | - "libs/ckeditor/lang", | ||
51 | - "libs/ckeditor/ckeditor.js", | ||
52 | - "libs/ckeditor/config.js" | 50 | + "libs/ckeditor/ckeditor.js" |
53 | ] | 51 | ] |
54 | }, | 52 | }, |
55 | "bootstrap-sass": { | 53 | "bootstrap-sass": { |
gulp/build.js
@@ -30,7 +30,8 @@ gulp.task('partials', function () { | @@ -30,7 +30,8 @@ gulp.task('partials', function () { | ||
30 | quotes: true | 30 | quotes: true |
31 | })) | 31 | })) |
32 | .pipe($.angularTemplatecache('templateCacheHtml-'+partialPath+'.js', { | 32 | .pipe($.angularTemplatecache('templateCacheHtml-'+partialPath+'.js', { |
33 | - module: 'noosferoApp', | 33 | + module: 'noosfero.templates.' + partialPath, |
34 | + standalone: true, | ||
34 | root: partialPath | 35 | root: partialPath |
35 | })) | 36 | })) |
36 | .pipe(gulp.dest(conf.paths.tmp + '/partials/'))); | 37 | .pipe(gulp.dest(conf.paths.tmp + '/partials/'))); |
@@ -81,7 +82,6 @@ gulp.task('html', ['inject', 'partials'], function () { | @@ -81,7 +82,6 @@ gulp.task('html', ['inject', 'partials'], function () { | ||
81 | .pipe($.revReplace({prefix: noosferoThemePrefix})) | 82 | .pipe($.revReplace({prefix: noosferoThemePrefix})) |
82 | .pipe(htmlFilter) | 83 | .pipe(htmlFilter) |
83 | .pipe($.replace('/bower_components/ng-ckeditor/libs/ckeditor/', noosferoThemePrefix + 'ng-ckeditor/libs/ckeditor/')) | 84 | .pipe($.replace('/bower_components/ng-ckeditor/libs/ckeditor/', noosferoThemePrefix + 'ng-ckeditor/libs/ckeditor/')) |
84 | - .pipe($.replace('/bower_components/ng-ckeditor/ng-ckeditor.min.js', noosferoThemePrefix + 'ng-ckeditor/ng-ckeditor.min.js')) | ||
85 | .pipe($.minifyHtml({ | 85 | .pipe($.minifyHtml({ |
86 | empty: true, | 86 | empty: true, |
87 | spare: true, | 87 | spare: true, |
@@ -103,7 +103,7 @@ gulp.task('fonts', function () { | @@ -103,7 +103,7 @@ gulp.task('fonts', function () { | ||
103 | }); | 103 | }); |
104 | 104 | ||
105 | gulp.task('ckeditor', function () { | 105 | gulp.task('ckeditor', function () { |
106 | - conf.wiredep.exclude.push(/ckeditor/); // exclude ckeditor from build to improve performance | 106 | + conf.wiredep.exclude.push(/bower_components\/ng-ckeditor\/libs\/ckeditor/); // exclude ckeditor from build to improve performance |
107 | return gulp.src(['bower_components/ng-ckeditor/**/*']).pipe(gulp.dest(path.join(conf.paths.dist, '/ng-ckeditor'))); | 107 | return gulp.src(['bower_components/ng-ckeditor/**/*']).pipe(gulp.dest(path.join(conf.paths.dist, '/ng-ckeditor'))); |
108 | }); | 108 | }); |
109 | 109 |
src/app/index.ts
@@ -6,7 +6,19 @@ import {AuthEvents} from "./login/auth-events"; | @@ -6,7 +6,19 @@ import {AuthEvents} from "./login/auth-events"; | ||
6 | 6 | ||
7 | declare var moment: any; | 7 | declare var moment: any; |
8 | 8 | ||
9 | -angular.module('noosfero.init', []).config(noosferoModuleConfig). | 9 | +//FIXME see a better way to declare template modules for dev mode |
10 | +try { | ||
11 | + angular.module('noosfero.templates.app'); | ||
12 | +} catch (error) { | ||
13 | + angular.module('noosfero.templates.app', []); | ||
14 | +} | ||
15 | +try { | ||
16 | + angular.module('noosfero.templates.plugins'); | ||
17 | +} catch (error) { | ||
18 | + angular.module('noosfero.templates.plugins', []); | ||
19 | +} | ||
20 | +angular.module('noosfero.init', ['noosfero.templates.app', 'noosfero.templates.plugins']). | ||
21 | + config(noosferoModuleConfig). | ||
10 | run(noosferoAngularRunBlock). | 22 | run(noosferoAngularRunBlock). |
11 | constant("moment", moment). | 23 | constant("moment", moment). |
12 | constant("AuthEvents", AuthEvents); | 24 | constant("AuthEvents", AuthEvents); |
src/index.html
@@ -30,6 +30,7 @@ | @@ -30,6 +30,7 @@ | ||
30 | <script> | 30 | <script> |
31 | CKEDITOR_BASEPATH='/bower_components/ng-ckeditor/libs/ckeditor/'; | 31 | CKEDITOR_BASEPATH='/bower_components/ng-ckeditor/libs/ckeditor/'; |
32 | </script> | 32 | </script> |
33 | + <script src="/bower_components/ng-ckeditor/libs/ckeditor/ckeditor.js"></script> | ||
33 | 34 | ||
34 | <!-- build:js(src) scripts/vendor.js --> | 35 | <!-- build:js(src) scripts/vendor.js --> |
35 | <!-- bower:js --> | 36 | <!-- bower:js --> |
@@ -38,15 +39,12 @@ | @@ -38,15 +39,12 @@ | ||
38 | <!-- endbuild --> | 39 | <!-- endbuild --> |
39 | 40 | ||
40 | <!-- build:js({.tmp/serve,.tmp/partials,src}) scripts/app.js --> | 41 | <!-- build:js({.tmp/serve,.tmp/partials,src}) scripts/app.js --> |
41 | - <script src="commons.js"></script> | ||
42 | - <script src="vendor.bundle.js"></script> | ||
43 | - <script src="noosfero.js"></script> | ||
44 | <!-- inject:partials --> | 42 | <!-- inject:partials --> |
45 | <!-- angular templates will be automatically converted in js and inserted here --> | 43 | <!-- angular templates will be automatically converted in js and inserted here --> |
46 | <!-- endinject --> | 44 | <!-- endinject --> |
45 | + <script src="commons.js"></script> | ||
46 | + <script src="vendor.bundle.js"></script> | ||
47 | + <script src="noosfero.js"></script> | ||
47 | <!-- endbuild --> | 48 | <!-- endbuild --> |
48 | - | ||
49 | - <script src="/bower_components/ng-ckeditor/libs/ckeditor/ckeditor.js"></script> | ||
50 | - <script src="/bower_components/ng-ckeditor/ng-ckeditor.min.js"></script> | ||
51 | </body> | 49 | </body> |
52 | </html> | 50 | </html> |