项目作者: retyui

项目描述 :
PostCSS plugin that adds `@keyframes` from animate.css.
高级语言: JavaScript
项目地址: git://github.com/retyui/postcss-animation.css-data.git
创建时间: 2017-03-17T10:17:24Z
项目社区:https://github.com/retyui/postcss-animation.css-data

开源协议:MIT License

下载


postcss-animation.css-data

Autogenerated data for postcss-animations plugin.

Parsed all @keyframes from magic.css.

Install

  1. yarn add -D postcss-animation.css-data postcss-animations
  2. # or npm i -D postcss-animation.css-data postcss-animations

Use

  1. const postcss = require("postcss");
  2. const postcssAnimations = require("postcss-animations");
  3. (async () => {
  4. const CSS = `.my-jackInTheBox { animation-name: jackInTheBox; }`;
  5. const PLUGINS = [
  6. postcssAnimations({
  7. data: [require("postcss-animation.css-data")],
  8. checkDuplications: true,
  9. disableCheckCssVariables: true
  10. })
  11. ];
  12. try {
  13. const { css, messages } = await postcss(PLUGINS).process(
  14. CSS /*, {from,to}*/
  15. );
  16. messages.map(msg => console.log(msg.toString()));
  17. console.log(css);
  18. /*
  19. .my-jackInTheBox { animation-name: jackInTheBox; }
  20. @keyframes jackInTheBox { }
  21. */
  22. } catch (e) {
  23. console.error(e);
  24. }
  25. })();

Other animation data:

Update data:

  1. git clone https://github.com/retyui/postcss-animation.css-data
  2. cd postcss-animation.css-data
  3. yarn
  4. yarn build