Skip to content

Commit 53b4445

Browse files
committed
Fixed SCSS url issue (replace string in gulp when processing CSS)
1 parent 394dff0 commit 53b4445

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

app/assets/scss/_herbs.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
}
172172
.herbIMG {
173173
@include centerImage;
174-
background-image: url('../images/preloader.svg');
174+
background-image: url('../../images/preloader.svg');
175175
background-size: 75px;
176176
width: 100%;
177177
padding-top: 100%;

gulpfile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var gulp = require('gulp'),
55
concat = require('gulp-concat'),
66
rename = require('gulp-rename'),
77
uglify = require('gulp-uglify'),
8+
replace = require('gulp-replace'),
89
cleanCSS = require('gulp-clean-css');
910

1011
var config = {
@@ -26,6 +27,7 @@ gulp.task('scss', function() {
2627
.pipe(plumber({ errorHandler: notify.onError("Error: <%= error.message %>") }))
2728
.pipe(scss())
2829
.pipe(cleanCSS({compatibility: 'ie8'}))
30+
.pipe(replace('app/', ''))
2931
.pipe(gulp.dest(config.cssDestPath))
3032
});
3133

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"gulp-plumber": "*",
1414
"gulp-prettify": "*",
1515
"gulp-rename": "^1.2.2",
16+
"gulp-replace": "^0.5.4",
1617
"gulp-sass": "*",
1718
"gulp-uglify": "^2.1.2",
1819
"gulp-useref": "*"

public/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)