Skip to content

Commit

Permalink
Merge pull request #159 from 2gis/rsvg
Browse files Browse the repository at this point in the history
svg2png to rsvg
  • Loading branch information
andymost committed Feb 24, 2015
2 parents 8883db4 + bf4b320 commit 0c36314
Show file tree
Hide file tree
Showing 67 changed files with 360 additions and 172 deletions.
28 changes: 15 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,26 +240,19 @@
## Установка окружения для разных ОС
### Mac OS X

* Установите NodeJS с помощью [NodeJS Installer](http://nodejs.org/download/). Или с помощью homebrew:
* Установите homebrew перейдя по ссылке:

sudo brew install node
[http://brew.sh/index_ru.html](Руководство по установке brew)

* Установите Gulp из командной строки:
* Запустите `install_osx.sh`

sudo npm install -g gulp
sh install_osx.sh

### Ubuntu

* Установите NodeJS из командной строки:

sudo apt-get install python-software-properties
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

* Установите Gulp из командной строки:
* Запустите `install_ubuntu.sh`

sudo npm install -g gulp
sh install_osx.sh

### Windows

Expand All @@ -269,6 +262,15 @@

npm install -g gulp

* Перейдите по ссылке [http://www.gtk.org/download/win64.php](http://www.gtk.org/download/win64.php)
(или [http://www.gtk.org/download/win32.php](http://www.gtk.org/download/win32.php) для 32-разрядного NodeJS)

* Скачайте архив с бинарной сборкой GTK+

* Распакуйте в `C:\GTK`

* Добавьте `C:\GTK\bin;` в системную переменную PATH (подробнее: [https://www.java.com/ru/download/help/path.xml](https://www.java.com/ru/download/help/path.xml))

## Стандарты кодирования

### JavaScript
Expand Down
10 changes: 3 additions & 7 deletions gulp/tasks/copySVGRaster.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var flatten = require('gulp-flatten');
var svg2png = require('gulp-svg2png');
var rsvg = require('gulp-rsvg');
var rename = require('gulp-rename');
var newer = require('gulp-newer');
var util = require('gulp-util');
var gulp = require('gulp');
var path = require('path');
Expand All @@ -14,8 +13,7 @@ gulp.task('copySVGRaster', ['buildClean'], function (cb) {

gulp.src('src/**/img/**/*.svg')
.pipe(error.handle())
.pipe(newer({dest: 'build/tmp/img_newer', ext: '.png'}))
.pipe(svg2png())
.pipe(rsvg())
.pipe(rename(function (p) {
p.dirname = p.dirname.split(path.sep)[2];
}))
Expand All @@ -27,9 +25,7 @@ gulp.task('copySVGRaster', ['buildClean'], function (cb) {
.on('end', function () {
gulp.src('src/**/img/**/*.svg')
.pipe(error.handle())
.pipe(newer({dest: 'build/tmp/img_newer', ext: '.png'}))
.pipe(svg2png(2))
.pipe(gulp.dest('build/tmp/img_newer'))
.pipe(rsvg({scale: 2}))
.pipe(rename(function (p) {
p.extname = '@2x.png';
p.dirname = p.dirname.split(path.sep)[2];
Expand Down
13 changes: 13 additions & 0 deletions install_osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

echo 'Preparing to install Node.js & mapsapi'

node -v || brew install node
sudo npm install -g npm@2.x
brew install pkg-config
brew install librsvg
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig
npm install
sudo npm install -g gulp

echo 'Installation process finished'
15 changes: 15 additions & 0 deletions install_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

echo 'Preparing to install Node.js & mapsapi'

sudo apt-get update
sudo apt-get install -y python-software-properties make gcc g++
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
node -v || sudo apt-get install -y nodejs
sudo npm install -g npm@2.x
sudo apt-get -y install librsvg2-dev
npm install
sudo npm install -g gulp

echo 'Installation process finished'
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@
"gulp-less": "^3.0.0",
"gulp-load-plugins": "^0.8.0",
"gulp-minify-css": "0.3.2",
"gulp-newer": "^0.4.0",
"gulp-notify": "^2.2.0",
"gulp-plumber": "0.6.6",
"gulp-redust": "0.0.1",
"gulp-rename": "^1.2.0",
"gulp-rsvg": "^1.0.0",
"gulp-sourcemaps": "^1.3.0",
"gulp-svg2png": "^0.3.0",
"gulp-uglify": "^1.1.0",
"gulp-util": "^3.0.3",
"gulp.spritesmith": "^2.5.1",
Expand Down
8 changes: 7 additions & 1 deletion src/DGAttribution/skin/basic/img/DGAttribution__logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/DGGeoclicker/skin/basic/img/DGPopup__bookletLinkIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/DGGeoclicker/skin/basic/img/DGPopup__ratingStar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/DGGeoclicker/skin/basic/img/DGSchedule__clockOn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/DGGeoclicker/skin/dark/img/DGFirmCard__mailIcon_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0c36314

Please sign in to comment.