Skip to content

Commit

Permalink
fix: fetch properties from mdn-data import instead of require
Browse files Browse the repository at this point in the history
  • Loading branch information
apasov committed Apr 7, 2020
1 parent 9026f01 commit ae0c1b1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/animatable.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/animatable.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@babel/core": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@rollup/plugin-commonjs": "^11.0.1",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^7.0.0",
"babel-jest": "^25.2.6",
"eslint": "^6.8.0",
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import { terser } from 'rollup-plugin-terser'
import * as pkg from './package.json'

Expand All @@ -14,8 +15,9 @@ export default {
sourcemap: true,
},
plugins: [
resolve(),
commonjs(),
json(),
resolve(),
terser({
output: {
preamble: `//${pkg.name} v${pkg.version} ${pkg.homepage}`,
Expand Down
2 changes: 1 addition & 1 deletion src/properties.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const mdnProperties = require('mdn-data/css/properties.json')
import mdnProperties from 'mdn-data/css/properties.json'
const properties = []
Object.keys(mdnProperties).forEach((key) => {
if (key.charAt(0) !== '-' && mdnProperties[key].animationType !== 'discrete') {
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,13 @@
magic-string "^0.25.2"
resolve "^1.11.0"

"@rollup/plugin-json@^4.0.2":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.0.2.tgz#482185ee36ac7dd21c346e2dbcc22ffed0c6f2d6"
integrity sha512-t4zJMc98BdH42mBuzjhQA7dKh0t4vMJlUka6Fz0c+iO5IVnWaEMiYBy1uBj9ruHZzXBW23IPDGL9oCzBkQ9Udg==
dependencies:
"@rollup/pluginutils" "^3.0.4"

"@rollup/plugin-node-resolve@^7.0.0":
version "7.1.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.1.tgz#8c6e59c4b28baf9d223028d0e450e06a485bb2b7"
Expand All @@ -955,7 +962,7 @@
is-module "^1.0.0"
resolve "^1.14.2"

"@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.6":
"@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.0.6":
version "3.0.8"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.0.8.tgz#4e94d128d94b90699e517ef045422960d18c8fde"
integrity sha512-rYGeAc4sxcZ+kPG/Tw4/fwJODC3IXHYDH4qusdN/b6aLw5LPUbzpecYbEJh4sVQGPFJxd2dBU4kc1H3oy9/bnw==
Expand Down

0 comments on commit ae0c1b1

Please sign in to comment.