roll-a-die
Advanced tools
Comparing version 1.3.1 to 1.5.2
{ | ||
"name": "roll-a-die", | ||
"version": "1.3.1", | ||
"version": "1.5.2", | ||
"description": "Simple 3D dice roll using CSS3 animation.", | ||
"main": "dist/roll-a-die.js", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"babel-core": "^6.26.3", | ||
"babel-loader": "^7.1.4", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-stage-2": "^6.24.1", | ||
"css-loader": "^0.28.11", | ||
"@babel/core": "^7.8.7", | ||
"@babel/preset-env": "^7.8.7", | ||
"babel-loader": "^8.0.6", | ||
"css-loader": "^3.4.2", | ||
"file-loader": "^1.1.11", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest-cli": "^22.4.3", | ||
"jest-cli": "^25.1.0", | ||
"less": "^3.0.4", | ||
@@ -21,4 +19,4 @@ "less-loader": "^4.1.0", | ||
"url-loader": "^1.0.1", | ||
"webpack": "^4.8.1", | ||
"webpack-cli": "^2.1.3" | ||
"webpack": "^4.42.0", | ||
"webpack-cli": "^3.3.11" | ||
}, | ||
@@ -28,4 +26,3 @@ "scripts": { | ||
"dev": "node_modules/.bin/webpack -p --watch", | ||
"build": "node_modules/.bin/webpack -p", | ||
"prepublish": "npm run build" | ||
"build": "node_modules/.bin/webpack -p" | ||
}, | ||
@@ -32,0 +29,0 @@ "repository": { |
# Roll A Die | ||
[![npm package](https://img.shields.io/npm/v/roll-a-die.svg?style=flat-square)](https://www.npmjs.org/package/roll-a-die) [![Build Status](https://img.shields.io/travis/chukwumaijem/roll-a-die.svg?style=flat-square)](https://travis-ci.com/chukwumaijem/roll-a-die.svg?branch=master) | ||
[![npm package](https://img.shields.io/npm/v/roll-a-die.svg?style=flat-square)](https://www.npmjs.org/package/roll-a-die) ![](https://github.com/chukwumaijem/roll-a-die/workflows/NPM%20Test/badge.svg) ![](https://github.com/chukwumaijem/roll-a-die/workflows/NPM%20Publish/badge.svg) | ||
Simple 3D dice roll animator by CSS3 Animation. | ||
@@ -9,10 +10,14 @@ | ||
## Vanilla JS | ||
Copy dist/roll-a-die.js into your library folder | ||
Load it into your HTML script | ||
``` | ||
<script type="text/javascript" src="path/to/roll-a-die.js"></script> | ||
``` | ||
You can use the [UNPKG](https://unpkg.com) link `https://unpkg.com/roll-a-die@1.3.0/dist/roll-a-die.js`. Remember to update the package number to the most recent. | ||
Call the method with its options. | ||
``` | ||
@@ -23,3 +28,5 @@ rollADie({ element, numberOfDice: 2, callback}); | ||
## With npm (and CommonJS builder) | ||
Install with npm. | ||
``` | ||
@@ -30,2 +37,3 @@ npm install --save roll-a-die | ||
Install with yarn. | ||
``` | ||
@@ -38,2 +46,3 @@ yarn add roll-a-die | ||
ES5 | ||
``` | ||
@@ -44,2 +53,3 @@ const rollADie = require('roll-a-die'); | ||
ES6 | ||
``` | ||
@@ -50,2 +60,3 @@ import rollADie from 'roll-a-die'; | ||
Call the method | ||
``` | ||
@@ -60,14 +71,16 @@ rollADie({ element, numberOfDice: 2, callback}); | ||
* `element`: The element to render die animation on. Type: HTMLElement | ||
* `numberOfDice`: The number of dice to use.` Type: number | ||
* `callback`: Called when animation is finished. Returns an array of the values from throw. Type: Function | ||
* `noSound`: Roll the die without sound (Optional). Type: boolean | ||
* `delay`: Time in milliseconds to delay before removing animations (Optional). Type: number | ||
* `values`: Values to show on die face. When provided, it overrides library genrated values. (Optional). Type: Array of numbers | ||
- `element`: The element to render die animation on. Type: HTMLElement | ||
- `numberOfDice`: The number of dice to use.` Type: number | ||
- `callback`: Called when animation is finished. Returns an array of the values from throw. Type: Function | ||
- `noSound`: Roll the die without sound (Optional). Type: boolean | ||
- `delay`: Time in milliseconds to delay before removing animations (Optional). Type: number | ||
- `values`: Values to show on die face. When provided, it overrides library genrated values. (Optional). Type: Array of numbers | ||
## Thanks | ||
* (Sound Effect) | ||
* http://commons.nicovideo.jp/material/nc93322 | ||
- (Sound Effect) | ||
- http://commons.nicovideo.jp/material/nc93322 | ||
## License | ||
MIT License | ||
MIT License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14
80
4338
3