Add CHANGELOG entry and docs for CSS export
Closes https://github.com/kytta/shareon/issues/35 See: https://codeberg.org/kytta/shareon/pulls/12pull/45/head
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>
|
<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
|
### Changed
|
||||||
|
|
||||||
- **BREAKING:** default version of the package doesn't auto-initialize buttons
|
- **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
|
```js
|
||||||
import { init } from "shareon";
|
import { init } from "shareon";
|
||||||
|
import "shareon/css"; // most bundlers will transpile this CSS
|
||||||
|
|
||||||
init();
|
init();
|
||||||
```
|
```
|
||||||
|
@ -79,6 +80,7 @@ CommonJS imports are also supported:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const Shareon = require("shareon");
|
const Shareon = require("shareon");
|
||||||
|
require("shareon/css"); // most bundlers will transpile this CSS
|
||||||
|
|
||||||
Shareon.init();
|
Shareon.init();
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue