Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

pc__replace_animation_in_css

bakhirev80.0.1

This is plugin for nmp-package "Post-Compression". He`s searching and replaces long animation names on short animation names, in the CSS code.

plugin, post compression, gulp, grunt, build, minify, optimization, js, css, html, javascript, html5, uglifyjs, uglifycss, google compiler, searching

readme

Replace animation name in CSS

This is plugin for nmp-package "Post-Compression".
He`s searching and replaces long animation names on short animation names, in the CSS code.

An example of using:

var replaceAnimationInCSS = require("pc__replace_animation_in_css");

gulp.src("./*.css")
    .pipe(postCompression.search([
        replaceAnimationInCSS()
    ], shortNames));

Where:

  • shortNames - an object of type JSON with rules replace the long words to short words.

An example of the JSON object "shortNames":

{
    "animation_in_css": {    // the name of the group names
        "someNameA": "a",    // long name: short name
        "someNameB": "b"
    }
}

An example of CSS code before:

@-webkit-keyframes someNameA {
    ...
}
@keyframes someNameA {
    ...
}

An example of CSS code after:

@-webkit-keyframes a {
    ...
}
@keyframes b {
    ...
}