mirror of
https://github.com/blasten/turn.js.git
synced 2025-04-06 03:57:41 +08:00
Update readme
This commit is contained in:
parent
95431f8f32
commit
fd058cfa8c
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "turn.js",
|
"name": "turn.js",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "Web page flipper",
|
"description": "Web page flipper",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "https://github.com/igghera/turn.js.git",
|
"repository": "https://github.com/igghera/turn.js.git",
|
||||||
|
26
readme.md
26
readme.md
@ -1,4 +1,24 @@
|
|||||||
|
|
||||||
A fork of [https://github.com/blasten/turn.js](https://github.com/blasten/turn.js)
|
A fork of [https://github.com/blasten/turn.js](https://github.com/blasten/turn.js)
|
||||||
with support for npm/yarn. Basically I just added a package.json file and
|
with support for npm/yarn.
|
||||||
specified a main entry point + a dependency (jquery)
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
```
|
||||||
|
import $ from 'jquery';
|
||||||
|
import 'turn.js';
|
||||||
|
|
||||||
|
$('#flipbook').turn({
|
||||||
|
width: 800,
|
||||||
|
height: 600,
|
||||||
|
autoCenter: true
|
||||||
|
// ... plus any extra option you need
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
Basically I just added a package.json file and specified a main entry point + a
|
||||||
|
dependency (jquery) to make turn.js installable via npm/yarn.
|
||||||
|
|
||||||
|
I have submitted a PR to the authors of [https://github.com/blasten/turn.js](https://github.com/blasten/turn.js) but in the meantime you can use this one, as they don't seem to update their repo regularly.
|
||||||
|
|
||||||
|
Latest version uses jQuery 1.12.0 because jQuery 3.x was breaking the page
|
||||||
|
flipper.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user