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:
Nikita Karamov 2022-02-11 16:13:15 +01:00
parent 89c84b053f
commit f91643b831
No known key found for this signature in database
GPG Key ID: 3C8E688C96EEB9C9
2 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -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();
```