This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Improve dist builds to include both popper.js and non-popper.js …
…versions, rollup cleanup, and Readme update.
- Loading branch information
Showing
4 changed files
with
78 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
{ | ||
"presets": [["env", { "modules": false }], "stage-2", "react"], | ||
"plugins": ["transform-class-properties"] | ||
"presets": [ | ||
["env", { "modules": false }], | ||
"stage-2", | ||
"react" | ||
], | ||
"plugins": [ | ||
"external-helpers", | ||
"transform-class-properties" | ||
], | ||
"env": { | ||
"production": { | ||
"plugins": [ | ||
["transform-react-remove-prop-types", { "removeImport": true }] | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,32 @@ React wrapper around [PopperJS](https://github.com/FezVrasta/popper.js/). | |
|
||
`npm install react-popper --save` or `yarn add react-popper` | ||
|
||
|
||
### CDN | ||
|
||
If you prefer to include React Popper globally by marking `react-popper` as external in your application, the `react-popper` library (expose as `ReactPopper`) provides various single-file distributions, which are hosted on the following CDNs: | ||
|
||
* [**cdnjs**](https://cdnjs.com/libraries/react-popper) | ||
```html | ||
<!-- Wrapper only version (Excludes popper.js) --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-popper/0.10.2/react-popper.umd.min.js"></script> | ||
|
||
<!-- Full version (Includes popper.js) --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-popper/0.10.2/react-popper.full.umd.min.js"></script> | ||
``` | ||
|
||
* [**unpkg**](https://unpkg.com/react-popper/) | ||
```html | ||
<script src="https://unpkg.com/react-popper/dist/react-popper.js"></script> | ||
(UMD library exposed as `ReactPopper`) | ||
<!-- Wrapper only version (Excludes popper.js) --> | ||
<script src="https://unpkg.com/[email protected]/dist/react-popper.umd.min.js"></script> | ||
|
||
<!-- Full version (Includes popper.js) --> | ||
<script src="https://unpkg.com/[email protected]/dist/react-popper.full.umd.min.js"></script> | ||
``` | ||
|
||
> **Note**: To load a specific version of React Popper replace `0.10.2` with the version number. | ||
|
||
## Usage | ||
|
||
```js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters