Add CHANGELOG entry and docs for CSS export
Closes https://github.com/kytta/shareon/issues/35 See: https://codeberg.org/kytta/shareon/pulls/12
This commit is contained in:
parent
89c84b053f
commit
f91643b831
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -19,6 +19,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
<script src="path/to/shareon.js" init>
|
||||
```
|
||||
|
||||
- CSS export for use in Webpack/Rollup/etc. ([#35](https://github.com/kytta/shareon/issues/35))
|
||||
|
||||
```js
|
||||
import "shareon/css";
|
||||
```
|
||||
|
||||
```js
|
||||
require("shareon/css");
|
||||
```
|
||||
|
||||
### Changed
|
||||
|
||||
- **BREAKING:** default version of the package doesn't auto-initialize buttons
|
||||
|
|
|
@ -71,6 +71,7 @@ pnpm add shareon # or `npm install`, or `yarn add`
|
|||
|
||||
```js
|
||||
import { init } from "shareon";
|
||||
import "shareon/css"; // most bundlers will transpile this CSS
|
||||
|
||||
init();
|
||||
```
|
||||
|
@ -79,6 +80,7 @@ CommonJS imports are also supported:
|
|||
|
||||
```js
|
||||
const Shareon = require("shareon");
|
||||
require("shareon/css"); // most bundlers will transpile this CSS
|
||||
|
||||
Shareon.init();
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue