Commit 5cb6e8a3881e70abb8f773b1ff638bd36a8708b6

Authored by Victor Costa
1 parent b4421c0d

Improve gulp build

Showing 3 changed files with 14 additions and 6 deletions   Show diff stats
@@ -36,14 +36,21 @@ @@ -36,14 +36,21 @@
36 "angular-load": "^0.4.1", 36 "angular-load": "^0.4.1",
37 "angular-translate-interpolation-messageformat": "^2.10.0", 37 "angular-translate-interpolation-messageformat": "^2.10.0",
38 "angular-bind-html-compile": "^1.2.1", 38 "angular-bind-html-compile": "^1.2.1",
39 - "angular-click-outside": "^2.7.1" 39 + "angular-click-outside": "^2.7.1",
  40 + "ng-ckeditor": "^0.2.1"
40 }, 41 },
41 "devDependencies": { 42 "devDependencies": {
42 - "angular-mocks": "~1.5.0",  
43 - "ng-ckeditor": "^0.2.1",  
44 - "ckeditor": "^4.5.8" 43 + "angular-mocks": "~1.5.0"
45 }, 44 },
46 "overrides": { 45 "overrides": {
  46 + "ng-ckeditor": {
  47 + "main": [
  48 + "ng-ckeditor.js",
  49 + "libs/ckeditor/lang",
  50 + "libs/ckeditor/ckeditor.js",
  51 + "libs/ckeditor/config.js"
  52 + ]
  53 + },
47 "bootstrap-sass": { 54 "bootstrap-sass": {
48 "main": [ 55 "main": [
49 "assets/stylesheets/_bootstrap.scss", 56 "assets/stylesheets/_bootstrap.scss",
@@ -103,6 +103,7 @@ gulp.task('fonts', function () { @@ -103,6 +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 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')));
107 }); 108 });
108 109
@@ -153,4 +154,4 @@ gulp.task('noosfero', ['html'], function () { @@ -153,4 +154,4 @@ gulp.task('noosfero', ['html'], function () {
153 return merge(layouts, theme, index); 154 return merge(layouts, theme, index);
154 }); 155 });
155 156
156 -gulp.task('build', ['html', 'fonts', 'other', 'locale', 'ckeditor', 'plugin-languages', 'noosfero']); 157 +gulp.task('build', ['ckeditor', 'html', 'fonts', 'other', 'locale', 'plugin-languages', 'noosfero']);
@@ -36,7 +36,7 @@ exports.configTheme(argv.theme); @@ -36,7 +36,7 @@ exports.configTheme(argv.theme);
36 * to inject css preprocessor deps and js files in karma 36 * to inject css preprocessor deps and js files in karma
37 */ 37 */
38 exports.wiredep = { 38 exports.wiredep = {
39 - exclude: [/jquery/, /\/bootstrap\.js$/, /\/bootstrap-sass\/.*\.js/, /\/bootstrap\.css/, /ckeditor/], 39 + exclude: [/jquery/, /\/bootstrap\.js$/, /\/bootstrap-sass\/.*\.js/, /\/bootstrap\.css/],
40 directory: 'bower_components' 40 directory: 'bower_components'
41 }; 41 };
42 42