diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/gulp/styles.js | 39 | ||||
-rw-r--r-- | server/sonar-web/src/main/less/init.less | 8 | ||||
-rw-r--r-- | server/sonar-web/src/main/less/pages.less | 10 | ||||
-rw-r--r-- | server/sonar-web/src/main/less/sonar.less (renamed from server/sonar-web/src/main/less/components.less) | 30 |
4 files changed, 46 insertions, 41 deletions
diff --git a/server/sonar-web/gulp/styles.js b/server/sonar-web/gulp/styles.js index f97360b89db..9f4c4c35d3c 100644 --- a/server/sonar-web/gulp/styles.js +++ b/server/sonar-web/gulp/styles.js @@ -1,38 +1,31 @@ var path = require('path'); var gulp = require('gulp'); -var concat = require('gulp-concat'); var gulpif = require('gulp-if'); var less = require('gulp-less'); var nano = require('gulp-cssnano'); var autoprefixer = require('gulp-autoprefixer'); -module.exports.styles = function (output, production) { - return gulp.src([ - 'src/main/less/jquery-ui.less', - 'src/main/less/select2.less', - 'src/main/less/select2-sonar.less', +var nanoOptions = { + discardComments: { removeAll: true } +}; - 'src/main/less/init.less', - 'src/main/less/components.less', - 'src/main/less/pages.less', +var autoprefixerOptions = { + browsers: [ + 'last 3 Chrome versions', + 'last 3 Firefox versions', + 'Safari >= 8', + 'Edge >= 12', + 'IE 11' + ] +}; - 'src/main/less/style.less', - 'src/main/less/*.less' - ]) +module.exports.styles = function (output, production) { + return gulp.src(['src/main/less/sonar.less']) .pipe(less()) - .pipe(autoprefixer({ - browsers: [ - 'last 3 Chrome versions', - 'last 3 Firefox versions', - 'Safari >= 8', - 'Edge >= 12', - 'IE 11' - ] - })) - .pipe(gulpif(production, nano())) - .pipe(concat('sonar.css')) + .pipe(autoprefixer(autoprefixerOptions)) + .pipe(gulpif(production, nano(nanoOptions))) .pipe(gulp.dest(path.join(output, 'css'))); }; diff --git a/server/sonar-web/src/main/less/init.less b/server/sonar-web/src/main/less/init.less deleted file mode 100644 index c2fe9052204..00000000000 --- a/server/sonar-web/src/main/less/init.less +++ /dev/null @@ -1,8 +0,0 @@ -@import "init/base"; -@import "init/type"; -@import "init/links"; -@import "init/tables"; -@import "init/lists"; -@import "init/forms"; -@import "init/icons"; -@import "init/misc"; diff --git a/server/sonar-web/src/main/less/pages.less b/server/sonar-web/src/main/less/pages.less deleted file mode 100644 index 2280226ec49..00000000000 --- a/server/sonar-web/src/main/less/pages.less +++ /dev/null @@ -1,10 +0,0 @@ -@import "pages/analysis-reports"; -@import "pages/coding-rules"; -@import "pages/dashboard"; -@import "pages/issues"; -@import "pages/quality-gates"; -@import "pages/maintenance"; -@import "pages/login"; -@import "pages/api-documentation"; -@import "pages/overview"; -@import "pages/code"; diff --git a/server/sonar-web/src/main/less/components.less b/server/sonar-web/src/main/less/sonar.less index 4a8869dd25c..292f72533e2 100644 --- a/server/sonar-web/src/main/less/components.less +++ b/server/sonar-web/src/main/less/sonar.less @@ -1,3 +1,16 @@ +@import 'jquery-ui'; +@import 'select2'; +@import 'select2-sonar'; + +@import "init/base"; +@import "init/type"; +@import "init/links"; +@import "init/tables"; +@import "init/lists"; +@import "init/forms"; +@import "init/icons"; +@import "init/misc"; + @import "components/ui"; @import "components/source"; @import "components/bubble-popup"; @@ -25,3 +38,20 @@ @import "components/search"; @import "components/pills"; @import "components/react-select"; + +@import "pages/analysis-reports"; +@import "pages/coding-rules"; +@import "pages/dashboard"; +@import "pages/issues"; +@import "pages/quality-gates"; +@import "pages/maintenance"; +@import "pages/login"; +@import "pages/api-documentation"; +@import "pages/overview"; +@import "pages/code"; + +@import 'style'; +@import 'deprecated'; +@import 'print'; +@import 'sonar-colorizer'; +@import 'mixins'; |