Skip to content

Commit

Permalink
remove caniuse-api as dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Frischmann committed May 22, 2017
1 parent e64cf7c commit 0852834
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 58 deletions.
6 changes: 6 additions & 0 deletions docs/api/inline-style-prefixer-generator/generateData.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# `generateData(browserList, options)`

> You need to have the `caniuse-api` package installed.
```sh
yarn add caniuse-api --dev
```

Generates all the data needed to create your own prefixer. It uses a list of browser versions to determine the required prefixes. It also writes the data to files if `staticPath` and/or `dynamicPath` is provided. The files are directly written in valid JavaScript, so that they can be imported and used as is.

The files always have the following shape (ES2015 example):
Expand Down
6 changes: 6 additions & 0 deletions docs/guides/CustomPrefixAll.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ This guide is quite similar to [Creating your own Prefixer](CustomPrefixer.md),
Make sure to read it first, as it describes the concepts with much more detail, as not everything is repeated here as well.

## Generating static data
First of all we need to install the `caniuse-api`.

```sh
yarn add caniuse-api --dev
```

Again, we are using [`generateData`](../api/inline-style-prefixer-generator/generateData.md) and a `browserList` to get our static data. This we will save the data to the `staticPath`.

```javascript
Expand Down
6 changes: 6 additions & 0 deletions docs/guides/CustomPrefixer.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
If your application requires different browser version support, you might consider creating your own `Prefixer`. To make it as simple as possible, we provide two different tools to get there. First of all, we have the [inline-style-prefixer/generator](../api/inline-style-prefixer-generator/generateData.md) that helps to generate the required prefixing data. Then, you can use [`createPrefixer`](../api/inline-style-prefixer/createPrefixer.md) to plug it all together.

## Generating dynamic data
First of all we need to install the `caniuse-api`.

```sh
yarn add caniuse-api --dev
```

Each Prefixer needs to know which properties to prefix and which plugins to use. This data can be generated using [`generateData`](../api/inline-style-prefixer-generator/generateData.md).
You need to provide a `browserList` containing all the minimum browser versions that should be supported.

Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inline-style-prefixer",
"version": "3.0.3",
"version": "3.0.4",
"description": "Run-time Autoprefixer for JavaScript style objects",
"main": "dynamic/index.js",
"files": [
Expand Down Expand Up @@ -41,9 +41,6 @@
"bowser": "^1.6.0",
"css-in-js-utils": "^1.0.3"
},
"peerDependencies": {
"caniuse-api": "^1.5.2"
},
"devDependencies": {
"babel": "^6.5.2",
"babel-cli": "^6.6.0",
Expand All @@ -55,7 +52,7 @@
"babel-preset-es2015-rollup": "^1.1.1",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"caniuse-api": "^1.5.2",
"caniuse-api": "^2.0.0",
"chai": "^3.2.0",
"codeclimate-test-reporter": "^0.1.1",
"cross-env": "^1.0.8",
Expand Down
91 changes: 38 additions & 53 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1083,12 +1083,12 @@ browser-resolve@^1.11.0:
dependencies:
resolve "1.1.7"

browserslist@^1.0.1:
version "1.7.0"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.0.tgz#738df5b2971354d198b2fbd5a22c560d2d896084"
browserslist@^2.0.0:
version "2.1.4"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.1.4.tgz#cc526af4a1312b7d2e05653e56d0c8ab70c0e053"
dependencies:
caniuse-db "^1.0.30000617"
electron-to-chromium "^1.2.1"
caniuse-lite "^1.0.30000670"
electron-to-chromium "^1.3.11"

buffer-shims@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -1132,19 +1132,18 @@ camelcase@^2.0.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"

caniuse-api@^1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.5.2.tgz#8f393c682f661c0a997b77bba6e826483fb3600e"
caniuse-api@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-2.0.0.tgz#b1ddb5a5966b16f48dc4998444d4bbc6c7d9d834"
dependencies:
browserslist "^1.0.1"
caniuse-db "^1.0.30000346"
lodash.memoize "^4.1.0"
lodash.uniq "^4.3.0"
shelljs "^0.7.0"
browserslist "^2.0.0"
caniuse-lite "^1.0.0"
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"

caniuse-db@^1.0.30000346, caniuse-db@^1.0.30000617:
version "1.0.30000617"
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000617.tgz#9b7fd81f58a35526315c83e60cb5f076f0beb392"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000670:
version "1.0.30000670"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000670.tgz#c94f7dbf0b68eaadc46d3d203f46e82e7801135e"

caseless@~0.11.0:
version "0.11.0"
Expand All @@ -1157,9 +1156,9 @@ center-align@^0.1.1:
align-text "^0.1.3"
lazy-cache "^1.0.3"

[email protected]:
version "3.2.0"
resolved "https://registry.yarnpkg.com/chai/-/chai-3.2.0.tgz#a91c06acc01057f4f4b67ed7785bd7ff4466b2fb"
chai@^3.2.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
dependencies:
assertion-error "^1.0.1"
deep-eql "^0.1.3"
Expand Down Expand Up @@ -1647,9 +1646,9 @@ [email protected]:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"

electron-to-chromium@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.1.tgz#63ac7579a1c5bedb296c8607621f2efc9a54b968"
electron-to-chromium@^1.3.11:
version "1.3.11"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.11.tgz#744761df1d67b492b322ce9aa0aba5393260eb61"

[email protected]:
version "1.0.0"
Expand Down Expand Up @@ -2395,21 +2394,13 @@ glob-parent@^2.0.0:
dependencies:
is-glob "^2.0.0"

"glob@3 || 4":
"glob@3 || 4", [email protected]:
version "3.2.11"
resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d"
dependencies:
inherits "2"
minimatch "0.3"

[email protected]:
version "3.2.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.3.tgz#e313eeb249c7affaa5c475286b0e115b59839467"
dependencies:
graceful-fs "~2.0.0"
inherits "2"
minimatch "~0.2.11"

glob@^6.0.1:
version "6.0.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22"
Expand Down Expand Up @@ -2475,17 +2466,13 @@ [email protected]:
version "4.1.4"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.4.tgz#ef089d2880f033b011823ce5c8fae798da775dbd"

graceful-fs@~2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-2.0.3.tgz#7cd2cdb228a4a3f36e95efa6cc142de7d1a136d0"

"graceful-readlink@>= 1.0.0":
version "1.0.1"
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"

growl@1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.8.1.tgz#4b2dec8d907e93db336624dcec0183502f8c9428"
growl@1.9.2:
version "1.9.2"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"

handlebars@^4.0.3:
version "4.0.6"
Expand Down Expand Up @@ -3266,7 +3253,7 @@ lodash.keys@~4.0.3, lodash.keys@~4.0.7:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.0.8.tgz#c0cf45d2fcf576c83055404d674c7e637c83ae81"

lodash.memoize@^4.1.0:
lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"

Expand Down Expand Up @@ -3310,7 +3297,7 @@ lodash.union@~4.4.0:
lodash._baseuniq "~4.6.0"
lodash.rest "^4.0.0"

lodash.uniq@^4.3.0:
lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"

Expand Down Expand Up @@ -3469,13 +3456,6 @@ minimatch@1:
dependencies:
brace-expansion "^1.0.0"

minimatch@~0.2.11:
version "0.2.14"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a"
dependencies:
lru-cache "2"
sigmund "~1.0.0"

[email protected], minimist@~0.0.1:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
Expand All @@ -3494,19 +3474,20 @@ [email protected], [email protected], "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdi
dependencies:
minimist "0.0.8"

[email protected]:
version "2.4.5"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.4.5.tgz#151768dd2875eb51bc8295e9800026e9f2bb398f"
mocha@^2.4.5:
version "2.5.3"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.5.3.tgz#161be5bdeb496771eb9b35745050b622b5aefc58"
dependencies:
commander "2.3.0"
debug "2.2.0"
diff "1.4.0"
escape-string-regexp "1.0.2"
glob "3.2.3"
growl "1.8.1"
glob "3.2.11"
growl "1.9.2"
jade "0.26.3"
mkdirp "0.5.1"
supports-color "1.2.0"
to-iso-string "0.0.2"

modify-babel-preset@^2.1.1:
version "2.1.1"
Expand Down Expand Up @@ -4790,7 +4771,7 @@ [email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170"

shelljs@^0.7.0, shelljs@^0.7.5:
shelljs@^0.7.5:
version "0.7.6"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad"
dependencies:
Expand Down Expand Up @@ -5068,6 +5049,10 @@ to-fast-properties@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320"

[email protected]:
version "0.0.2"
resolved "https://registry.yarnpkg.com/to-iso-string/-/to-iso-string-0.0.2.tgz#4dc19e664dfccbe25bd8db508b00c6da158255d1"

tough-cookie@>=0.12.0, tough-cookie@^2.2.0, tough-cookie@~2.3.0:
version "2.3.2"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a"
Expand Down

0 comments on commit 0852834

Please sign in to comment.