npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

postcss-animate-merge

v0.0.1

Published

PostCSS plugin merge animate defined in animate.css

Downloads

7

Readme

PostCSS Animate Merge

PostCSS plugin merge animate defined in animate.css.

@merge .newAnimate {
  /*
    only support animate which only include `animation-*` properties

    For example:
    shake is:
    .shake {
      -webkit-animation-name: shake;
      animation-name: shake;
    }
    it only include `animation-name` which matches `animation-*`

    bounce is:
    .bounce {
      -webkit-animation-name: bounce;
      animation-name: bounce;
      -webkit-transform-origin: center bottom;
      transform-origin: center bottom;
    }
    it includes `transform-origin` that is not support
   */
   /* the [shake slideUpDown] is meaning this two animation executes at the same time */
  name: shake, [shake slideUpDown], shake;
  duration: 1s;
  /* other `animation-*` properties also support: */
  /* delay, fill-mode, ... */

  /*
    especially it can appoint conf which is the base configure class, such as: .animate, .animate.delay-1s
    conf: animate, animate.delay-1s
   */

  /*
    all property will be fill by the last value if the len is less than name:
    name: shake, [shake slideUpDown], shake; // len is 3
    duration: 1s, 2s; // so will be duration: 1s, 2s, 2s;
  */

}
.newAnimate {
  animation-name: shake, shake, slideOutDown, shake;
  animation-duration: 1s, 1s, 1s, 1s;
  animation-delay: 0ms, 1000ms, 1000ms, 2000ms;
}

Usage

Check you project for existed PostCSS config: postcss.config.js in the project root, "postcss" section in package.json or postcss in bundle config.

If you already use PostCSS, add the plugin to plugins list:

module.exports = {
  plugins: [
+   require('postcss-animate-to-json'),
    require('autoprefixer')
  ]
}

Options

// the following is default value
{
  filename: ['animate.css'], // the filename of animate.css or its expansion
  conf: ["\.animated.*"], // the regexp to `conf` classed
  path: './', // the base path, filename and json.output will be execute relatived this path
  json: {
    save: true, // if save the json configure
    load: false, // if load json configure. if true, ignore filename
    output: 'animate.json' // the path to output the json configure file
  }
}

If you do not use PostCSS, add it according to official docs and set this plugin in settings.