From da794e1abcf85fdeecc5d85dce2033ed11b80634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20=C5=BBelechowski?= Date: Fri, 14 Sep 2018 17:11:52 +0200 Subject: [PATCH] #73: require fonts with extended characters Fix #73 1. replace minify-css with clean-css 2. declare font face imports as css 3. prevent clean-css from expanding imports 4. request fonts with extended characters 5. update build instructions 6. add BUILD.CMD --- .gitignore | 1 + BUILD.CMD | 8 ++++++++ README.md | 16 +++++++++++++--- assets/css/openSUSE.less | 2 +- assets/css/opensuse-countdown.less | 2 +- gulpfile.js | 4 ++-- 6 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 BUILD.CMD diff --git a/.gitignore b/.gitignore index 5c03b0ba..7469571e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ po/*.po* node_modules/ +build/ diff --git a/BUILD.CMD b/BUILD.CMD new file mode 100644 index 00000000..dd53906b --- /dev/null +++ b/BUILD.CMD @@ -0,0 +1,8 @@ +CALL "C:\Program Files\nodejs\nodevars.bat" +ECHO ON +REM GOTO RUN +CALL NPM install gulp gulp-concat gulp-uglify gulp-rename gulp-strip-debug gulp-less ^ + gulp-clean-css gulp-imagemin gulp-cache gulp-shell +:RUN +CALL NODE_MODULES\.BIN\GULP +PAUSE diff --git a/README.md b/README.md index 300383e0..0cacfe2e 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,23 @@ GULP is used to run automatic tasks to preprocess CSS (from less), compress imag # zypper in 'rubygem(nokogiri)' 'rubygem(gettext)' npm gettext-tools $ po/update_po.rb $ npm update -$ npm install gulp +$ npm install \ + gulp \ + gulp-concat \ + gulp-uglify \ + gulp-rename \ + gulp-strip-debug \ + gulp-less \ + gulp-clean-css \ + gulp-imagemin \ + gulp-cache \ + gulp-shell $ node_modules/.bin/gulp More info about gulp here -Gulp will give the final touch in the code so then you only need to open the project in your browser -http://localhost:8000 +Gulp will give the final touch in the code so then you only need to open [the project](http://localhost:8000) in your browser +(that requires python; if you do not have python, just open the file index.html). Test your language works well. To make sure there is no variable without translation, open up the web inspector of your browser and check if there is error message in the console, if not, you have done an Excellent job! So, open a new Pull Request in github, we will double check everything is fine, and then Merge your contribution! diff --git a/assets/css/openSUSE.less b/assets/css/openSUSE.less index 71d18d24..ed6d852e 100644 --- a/assets/css/openSUSE.less +++ b/assets/css/openSUSE.less @@ -1,5 +1,5 @@ //dependencies -@import url(//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600); +@import (css) url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600&subset=latin-ext'); @import "vendor/bootstrap/bootstrap.less"; //Opensuse theme diff --git a/assets/css/opensuse-countdown.less b/assets/css/opensuse-countdown.less index 530ebecb..76190f69 100644 --- a/assets/css/opensuse-countdown.less +++ b/assets/css/opensuse-countdown.less @@ -1,4 +1,4 @@ -@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,700); +@import (css) url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,700&subset=latin-ext'); .opensuse-countdown { padding-top: 30px; diff --git a/gulpfile.js b/gulpfile.js index 19e5d459..b728bddf 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -38,7 +38,7 @@ gulp.task('scripts', function() { // Preprocess CSS var less = require('gulp-less'); var path = require('path'); -var minifyCss = require('gulp-minify-css'); +var minifyCss = require('gulp-clean-css'); gulp.task('less', function () { return gulp.src(assets + 'css/openSUSE.less') @@ -46,7 +46,7 @@ gulp.task('less', function () { paths: [ path.join(__dirname, 'less', 'includes') ] })) .pipe(rename({suffix: '.min'})) - .pipe(minifyCss()) + .pipe(minifyCss({inline: false})) .pipe(gulp.dest(destination + 'css')); });