popmotion-x

1.1.1 • Public • Published

popmotion-x travis-ci

Friendly import-on-demand popmotion for babel-plugin-import.

Usage

First, install popmotion-x:

yarn add popmotion-x

Second, set .babelrc as follows:

{
  "plugins": [
    ["import", {
      "libraryName": "popmotion-x"
    }]
  ]
}

Then, you can import popmotion on demand:

import {
  action,
  calc,
  chain,
  composite,
  crossfade,
  css,
  decay,
  delay,
  easing,
  everyFrame,
  keyframes,
  listen,
  merge,
  multicast,
  multitouch,
  parallel,
  physics,
  pointer,
  schedule,
  scroll,
  spring,
  stagger,
  styler,
  svg,
  timeline,
  transform,
  tween,
  valueTypes,
  value
} from 'popmotion-x'

These will be transformed to someting like:

const action = require('popmotion-x/lib/action')
const calc = require('popmotion-x/lib/calc')
 
// ......
 
const valueTypes = require('popmotion-x/lib/value-types')
const value = require('popmotion-x/lib/value')

Readme

Keywords

none

Package Sidebar

Install

npm i popmotion-x

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

18.7 kB

Total Files

64

Last publish

Collaborators

  • funch