Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The problem with the calculation of the path to the fonts #8

Open
khusamov opened this issue Oct 26, 2015 · 4 comments
Open

The problem with the calculation of the path to the fonts #8

khusamov opened this issue Oct 26, 2015 · 4 comments

Comments

@khusamov
Copy link

I have a problem with file paths.

Gulp task:

gulp.task("css", function () {
    let src = ["bower_components/bootswatch/united/bootstrap.css"];
    let options = { keepStructure: true, relative: true, assetsPath: "assets" };
    gulp.src(src)
        .pipe(postcss([assetsRebase(options)], { to: "public/build/all.css" }))
        .pipe(concatCss("all.css"))
        .pipe(gulp.dest("public/build"));
});

At the entrance to the file:

bower_components/bootswatch/united/bootstrap.css:

@font-face {
    src: url('../fonts/glyphicons-halflings-regular.eot');
}

The output is a file with an error (wrong path):

public/build/all.css:

@font-face {
    src: url("../../bootswatch/united/assets/bower_components/bootswatch/fonts/glyphicons-halflings-regular.eot");
}

And here I should get the file:

@font-face {
    src: url("assets/bower_components/bootswatch/fonts/glyphicons-halflings-regular.eot");
}

How do I configure a task so that the path to the font correctly calculated?

@cakeinpanic
Copy link
Collaborator

Hello!
thank you, seems like a bug.
I'll take a look

@khusamov
Copy link
Author

ок, буду очень благодарен... сам пока не смог найти ошибку...
В подобном скрипте похоже аналогичная ошибка
shutterstock/postcss-copy-assets#4
потому думал, что это я что-то неправильно делаю

@cakeinpanic
Copy link
Collaborator

I really can not reproduce you case. Can you attach some test repo?

@khusamov
Copy link
Author

Later, I will do.I loaded here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants