Skip to content

Commit 0852834

Browse files
author
Robin Frischmann
committed
remove caniuse-api as dependency
1 parent e64cf7c commit 0852834

File tree

5 files changed

+58
-58
lines changed

5 files changed

+58
-58
lines changed

docs/api/inline-style-prefixer-generator/generateData.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# `generateData(browserList, options)`
22

3+
> You need to have the `caniuse-api` package installed.
4+
5+
```sh
6+
yarn add caniuse-api --dev
7+
```
8+
39
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.
410

511
The files always have the following shape (ES2015 example):

docs/guides/CustomPrefixAll.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ This guide is quite similar to [Creating your own Prefixer](CustomPrefixer.md),
44
Make sure to read it first, as it describes the concepts with much more detail, as not everything is repeated here as well.
55

66
## Generating static data
7+
First of all we need to install the `caniuse-api`.
8+
9+
```sh
10+
yarn add caniuse-api --dev
11+
```
12+
713
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`.
814

915
```javascript

docs/guides/CustomPrefixer.md

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
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.
44

55
## Generating dynamic data
6+
First of all we need to install the `caniuse-api`.
7+
8+
```sh
9+
yarn add caniuse-api --dev
10+
```
11+
612
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).
713
You need to provide a `browserList` containing all the minimum browser versions that should be supported.
814

package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "inline-style-prefixer",
3-
"version": "3.0.3",
3+
"version": "3.0.4",
44
"description": "Run-time Autoprefixer for JavaScript style objects",
55
"main": "dynamic/index.js",
66
"files": [
@@ -41,9 +41,6 @@
4141
"bowser": "^1.6.0",
4242
"css-in-js-utils": "^1.0.3"
4343
},
44-
"peerDependencies": {
45-
"caniuse-api": "^1.5.2"
46-
},
4744
"devDependencies": {
4845
"babel": "^6.5.2",
4946
"babel-cli": "^6.6.0",
@@ -55,7 +52,7 @@
5552
"babel-preset-es2015-rollup": "^1.1.1",
5653
"babel-preset-react": "^6.5.0",
5754
"babel-preset-stage-0": "^6.5.0",
58-
"caniuse-api": "^1.5.2",
55+
"caniuse-api": "^2.0.0",
5956
"chai": "^3.2.0",
6057
"codeclimate-test-reporter": "^0.1.1",
6158
"cross-env": "^1.0.8",

yarn.lock

+38-53
Original file line numberDiff line numberDiff line change
@@ -1083,12 +1083,12 @@ browser-resolve@^1.11.0:
10831083
dependencies:
10841084
resolve "1.1.7"
10851085

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

10931093
buffer-shims@^1.0.0:
10941094
version "1.0.0"
@@ -1132,19 +1132,18 @@ camelcase@^2.0.1:
11321132
version "2.1.1"
11331133
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
11341134

1135-
caniuse-api@^1.5.2:
1136-
version "1.5.2"
1137-
resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.5.2.tgz#8f393c682f661c0a997b77bba6e826483fb3600e"
1135+
caniuse-api@^2.0.0:
1136+
version "2.0.0"
1137+
resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-2.0.0.tgz#b1ddb5a5966b16f48dc4998444d4bbc6c7d9d834"
11381138
dependencies:
1139-
browserslist "^1.0.1"
1140-
caniuse-db "^1.0.30000346"
1141-
lodash.memoize "^4.1.0"
1142-
lodash.uniq "^4.3.0"
1143-
shelljs "^0.7.0"
1139+
browserslist "^2.0.0"
1140+
caniuse-lite "^1.0.0"
1141+
lodash.memoize "^4.1.2"
1142+
lodash.uniq "^4.5.0"
11441143

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

11491148
caseless@~0.11.0:
11501149
version "0.11.0"
@@ -1157,9 +1156,9 @@ center-align@^0.1.1:
11571156
align-text "^0.1.3"
11581157
lazy-cache "^1.0.3"
11591158

1160-
1161-
version "3.2.0"
1162-
resolved "https://registry.yarnpkg.com/chai/-/chai-3.2.0.tgz#a91c06acc01057f4f4b67ed7785bd7ff4466b2fb"
1159+
chai@^3.2.0:
1160+
version "3.5.0"
1161+
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
11631162
dependencies:
11641163
assertion-error "^1.0.1"
11651164
deep-eql "^0.1.3"
@@ -1647,9 +1646,9 @@ [email protected]:
16471646
version "1.1.1"
16481647
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
16491648

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

16541653
16551654
version "1.0.0"
@@ -2395,21 +2394,13 @@ glob-parent@^2.0.0:
23952394
dependencies:
23962395
is-glob "^2.0.0"
23972396

2398-
"glob@3 || 4":
2397+
"glob@3 || 4", [email protected]:
23992398
version "3.2.11"
24002399
resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d"
24012400
dependencies:
24022401
inherits "2"
24032402
minimatch "0.3"
24042403

2405-
2406-
version "3.2.3"
2407-
resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.3.tgz#e313eeb249c7affaa5c475286b0e115b59839467"
2408-
dependencies:
2409-
graceful-fs "~2.0.0"
2410-
inherits "2"
2411-
minimatch "~0.2.11"
2412-
24132404
glob@^6.0.1:
24142405
version "6.0.4"
24152406
resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22"
@@ -2475,17 +2466,13 @@ [email protected]:
24752466
version "4.1.4"
24762467
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.4.tgz#ef089d2880f033b011823ce5c8fae798da775dbd"
24772468

2478-
graceful-fs@~2.0.0:
2479-
version "2.0.3"
2480-
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-2.0.3.tgz#7cd2cdb228a4a3f36e95efa6cc142de7d1a136d0"
2481-
24822469
"graceful-readlink@>= 1.0.0":
24832470
version "1.0.1"
24842471
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
24852472

2486-
growl@1.8.1:
2487-
version "1.8.1"
2488-
resolved "https://registry.yarnpkg.com/growl/-/growl-1.8.1.tgz#4b2dec8d907e93db336624dcec0183502f8c9428"
2473+
growl@1.9.2:
2474+
version "1.9.2"
2475+
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
24892476

24902477
handlebars@^4.0.3:
24912478
version "4.0.6"
@@ -3266,7 +3253,7 @@ lodash.keys@~4.0.3, lodash.keys@~4.0.7:
32663253
version "4.0.8"
32673254
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.0.8.tgz#c0cf45d2fcf576c83055404d674c7e637c83ae81"
32683255

3269-
lodash.memoize@^4.1.0:
3256+
lodash.memoize@^4.1.2:
32703257
version "4.1.2"
32713258
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
32723259

@@ -3310,7 +3297,7 @@ lodash.union@~4.4.0:
33103297
lodash._baseuniq "~4.6.0"
33113298
lodash.rest "^4.0.0"
33123299

3313-
lodash.uniq@^4.3.0:
3300+
lodash.uniq@^4.5.0:
33143301
version "4.5.0"
33153302
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
33163303

@@ -3469,13 +3456,6 @@ minimatch@1:
34693456
dependencies:
34703457
brace-expansion "^1.0.0"
34713458

3472-
minimatch@~0.2.11:
3473-
version "0.2.14"
3474-
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a"
3475-
dependencies:
3476-
lru-cache "2"
3477-
sigmund "~1.0.0"
3478-
34793459
[email protected], minimist@~0.0.1:
34803460
version "0.0.8"
34813461
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
@@ -3494,19 +3474,20 @@ [email protected], [email protected], "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdi
34943474
dependencies:
34953475
minimist "0.0.8"
34963476

3497-
3498-
version "2.4.5"
3499-
resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.4.5.tgz#151768dd2875eb51bc8295e9800026e9f2bb398f"
3477+
mocha@^2.4.5:
3478+
version "2.5.3"
3479+
resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.5.3.tgz#161be5bdeb496771eb9b35745050b622b5aefc58"
35003480
dependencies:
35013481
commander "2.3.0"
35023482
debug "2.2.0"
35033483
diff "1.4.0"
35043484
escape-string-regexp "1.0.2"
3505-
glob "3.2.3"
3506-
growl "1.8.1"
3485+
glob "3.2.11"
3486+
growl "1.9.2"
35073487
jade "0.26.3"
35083488
mkdirp "0.5.1"
35093489
supports-color "1.2.0"
3490+
to-iso-string "0.0.2"
35103491

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

4793-
shelljs@^0.7.0, shelljs@^0.7.5:
4774+
shelljs@^0.7.5:
47944775
version "0.7.6"
47954776
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad"
47964777
dependencies:
@@ -5068,6 +5049,10 @@ to-fast-properties@^1.0.1:
50685049
version "1.0.2"
50695050
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320"
50705051

5052+
5053+
version "0.0.2"
5054+
resolved "https://registry.yarnpkg.com/to-iso-string/-/to-iso-string-0.0.2.tgz#4dc19e664dfccbe25bd8db508b00c6da158255d1"
5055+
50715056
tough-cookie@>=0.12.0, tough-cookie@^2.2.0, tough-cookie@~2.3.0:
50725057
version "2.3.2"
50735058
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a"

0 commit comments

Comments
 (0)