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

Bug: disabling rehash for fonts does not disable their name change in CSS #226

Open
SamuelMiller opened this issue May 11, 2022 · 0 comments

Comments

@SamuelMiller
Copy link

SamuelMiller commented May 11, 2022

Hello, excluding fonts from being rehashed by triggering the dontRenameFile option, only excludes the names of the fonts themselves in their folder, not their names in the CSS.

function revBreak() {
    return src(paths.cdn.src)
        .pipe(revall.revision({ hashLength: 4, includeFilesInManifest: ['.css', '.js', '.html'], 
         dontRenameFile: [/^\/favicon.ico$/g, ".html", "woff", "woff2"] }))
        .pipe(dest(paths.cdn.dest))
        .pipe(revall.manifestFile())
        .pipe(dest(paths.cdn.dest))
        .pipe(revall.versionFile())
        .pipe(dest(paths.cdn.dest));
};

The result of the above Gulp code:
Font names in "Fonts" folder:
trashhand-webfont.woff
trashhand-webfont.woff2

Font names in CSS:
@font-face {
font-family: trashhand;
src: url(../fonts/trashhand-webfont.6daa.woff2) format("woff2"), url(../fonts/trashhand-webfont.14b6.woff) format("woff")
}

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

1 participant