Skip to content

Commit

Permalink
openSUSE#73: require fonts with extended characters
Browse files Browse the repository at this point in the history
Fix openSUSE#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
  • Loading branch information
Krzysztof Żelechowski committed Sep 14, 2018
1 parent 1b80d25 commit da794e1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
po/*.po*
node_modules/
build/
8 changes: 8 additions & 0 deletions BUILD.CMD
Original file line number Diff line number Diff line change
@@ -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
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
</pre>
<small>More info about <a href="http://gulpjs.com/" target="_blank">gulp here</a></small>

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 <U >index.html</U>).
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!

Expand Down
2 changes: 1 addition & 1 deletion assets/css/openSUSE.less
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion assets/css/opensuse-countdown.less
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ 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')
.pipe(less({
paths: [ path.join(__dirname, 'less', 'includes') ]
}))
.pipe(rename({suffix: '.min'}))
.pipe(minifyCss())
.pipe(minifyCss({inline: false}))
.pipe(gulp.dest(destination + 'css'));
});

Expand Down

0 comments on commit da794e1

Please sign in to comment.