Commit 5727b1d88a0b29350b58192cc5be238db71a6900

Authored by Victor Costa
1 parent dcb9f310

Fix build of ckeditor

Showing 3 changed files with 14 additions and 2 deletions   Show diff stats
gulp/build.js
... ... @@ -80,6 +80,8 @@ gulp.task('html', ['inject', 'partials'], function () {
80 80 .pipe($.useref())
81 81 .pipe($.revReplace({prefix: noosferoThemePrefix}))
82 82 .pipe(htmlFilter)
  83 + .pipe($.replace('/ng-ckeditor/libs/ckeditor/', noosferoThemePrefix + 'ng-ckeditor/libs/ckeditor/'))
  84 + .pipe($.replace('/ng-ckeditor/ng-ckeditor.min.js', noosferoThemePrefix + 'ng-ckeditor/ng-ckeditor.min.js'))
83 85 .pipe($.minifyHtml({
84 86 empty: true,
85 87 spare: true,
... ... @@ -100,6 +102,10 @@ gulp.task('fonts', function () {
100 102 .pipe(gulp.dest(path.join(conf.paths.dist, '/fonts/')));
101 103 });
102 104  
  105 +gulp.task('ckeditor', function () {
  106 + return gulp.src(['bower_components/ng-ckeditor/**/*']).pipe(gulp.dest(path.join(conf.paths.dist, '/ng-ckeditor')));
  107 +});
  108 +
103 109 gulp.task('locale', function () {
104 110 return gulp.src([
105 111 path.join("bower_components/angular-i18n", '*.js'),
... ... @@ -147,4 +153,4 @@ gulp.task('noosfero', ['html'], function () {
147 153 return merge(layouts, theme, index);
148 154 });
149 155  
150   -gulp.task('build', ['html', 'fonts', 'other', 'locale', 'plugin-languages', 'noosfero']);
  156 +gulp.task('build', ['html', 'fonts', 'other', 'locale', 'ckeditor', 'plugin-languages', 'noosfero']);
... ...
gulp/conf.js
... ... @@ -36,7 +36,7 @@ exports.configTheme(argv.theme);
36 36 * to inject css preprocessor deps and js files in karma
37 37 */
38 38 exports.wiredep = {
39   - exclude: [/jquery/, /\/bootstrap\.js$/, /\/bootstrap-sass\/.*\.js/, /\/bootstrap\.css/],
  39 + exclude: [/jquery/, /\/bootstrap\.js$/, /\/bootstrap-sass\/.*\.js/, /\/bootstrap\.css/, /ckeditor/],
40 40 directory: 'bower_components'
41 41 };
42 42  
... ...
src/index.html
... ... @@ -27,6 +27,10 @@
27 27  
28 28 <div ui-view></div>
29 29  
  30 + <script>
  31 + CKEDITOR_BASEPATH='/ng-ckeditor/libs/ckeditor/';
  32 + </script>
  33 +
30 34 <!-- build:js(src) scripts/vendor.js -->
31 35 <!-- bower:js -->
32 36 <!-- run `gulp inject` to automatically populate bower script dependencies -->
... ... @@ -42,5 +46,7 @@
42 46 <!-- endinject -->
43 47 <!-- endbuild -->
44 48  
  49 + <script src="/ng-ckeditor/libs/ckeditor/ckeditor.js"></script>
  50 + <script src="/ng-ckeditor/ng-ckeditor.min.js"></script>
45 51 </body>
46 52 </html>
... ...