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
gulp/build.js
| ... | ... | @@ -30,7 +30,8 @@ gulp.task('partials', function () { |
| 30 | 30 | quotes: true |
| 31 | 31 | })) |
| 32 | 32 | .pipe($.angularTemplatecache('templateCacheHtml-'+partialPath+'.js', { |
| 33 | - module: 'noosferoApp', | |
| 33 | + module: 'noosfero.templates.' + partialPath, | |
| 34 | + standalone: true, | |
| 34 | 35 | root: partialPath |
| 35 | 36 | })) |
| 36 | 37 | .pipe(gulp.dest(conf.paths.tmp + '/partials/'))); |
| ... | ... | @@ -81,7 +82,6 @@ gulp.task('html', ['inject', 'partials'], function () { |
| 81 | 82 | .pipe($.revReplace({prefix: noosferoThemePrefix})) |
| 82 | 83 | .pipe(htmlFilter) |
| 83 | 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 | 85 | .pipe($.minifyHtml({ |
| 86 | 86 | empty: true, |
| 87 | 87 | spare: true, |
| ... | ... | @@ -103,7 +103,7 @@ gulp.task('fonts', function () { |
| 103 | 103 | }); |
| 104 | 104 | |
| 105 | 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 | 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 | 6 | |
| 7 | 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 | 22 | run(noosferoAngularRunBlock). |
| 11 | 23 | constant("moment", moment). |
| 12 | 24 | constant("AuthEvents", AuthEvents); | ... | ... |
src/index.html
| ... | ... | @@ -30,6 +30,7 @@ |
| 30 | 30 | <script> |
| 31 | 31 | CKEDITOR_BASEPATH='/bower_components/ng-ckeditor/libs/ckeditor/'; |
| 32 | 32 | </script> |
| 33 | + <script src="/bower_components/ng-ckeditor/libs/ckeditor/ckeditor.js"></script> | |
| 33 | 34 | |
| 34 | 35 | <!-- build:js(src) scripts/vendor.js --> |
| 35 | 36 | <!-- bower:js --> |
| ... | ... | @@ -38,15 +39,12 @@ |
| 38 | 39 | <!-- endbuild --> |
| 39 | 40 | |
| 40 | 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 | 42 | <!-- inject:partials --> |
| 45 | 43 | <!-- angular templates will be automatically converted in js and inserted here --> |
| 46 | 44 | <!-- endinject --> |
| 45 | + <script src="commons.js"></script> | |
| 46 | + <script src="vendor.bundle.js"></script> | |
| 47 | + <script src="noosfero.js"></script> | |
| 47 | 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 | 49 | </body> |
| 52 | 50 | </html> | ... | ... |