From 4f05bab231bebd3ce1f289e0195af0e0d40b7269 Mon Sep 17 00:00:00 2001 From: Li Date: Tue, 22 Aug 2017 14:48:15 +0800 Subject: [PATCH] 0.0.2 in browser --- .gitignore | 3 ++- .npmignore | 3 ++- .travis.yml | 3 ++- README.md | 19 +++++++++++---- package.json | 9 ++++--- webpack.config.js | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 87 insertions(+), 10 deletions(-) create mode 100644 webpack.config.js diff --git a/.gitignore b/.gitignore index d1afd21..a87472c 100644 --- a/.gitignore +++ b/.gitignore @@ -57,8 +57,9 @@ typings/ # dotenv environment variables file .env -# lib +# lib dist lib +dist #idea .idea \ No newline at end of file diff --git a/.npmignore b/.npmignore index b180318..d3b6ec1 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,3 @@ * -!lib/* \ No newline at end of file +!lib/* +!dist/* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 3e0d8b8..1efb1db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,5 @@ notifications: install: npm install --dev script: - - npm run compile \ No newline at end of file + - npm run compile + - npm run dist \ No newline at end of file diff --git a/README.md b/README.md index dd842e1..a49d0db 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -[![Build Status](https://travis-ci.org/hnsylitao/react-dplayer.svg?branch=master)](https://travis-ci.org/hnsylitao/react-dplayer) -[![Version](https://img.shields.io/npm/v/react-dplayer.svg?style=flat)](https://www.npmjs.com/package/react-dplayer) +[![Build Status](https://travis-ci.org/MoePlayer/react-dplayer.svg?branch=master)](https://travis-ci.org/MoePlayer/react-dplayer)[![Version](https://img.shields.io/npm/v/react-dplayer.svg?style=flat)](https://www.npmjs.com/package/react-dplayer) [![NPM](https://img.shields.io/npm/dt/react-dplayer.svg?style=flat)](https://www.npmjs.com/package/react-dplayer) [![LICENSE](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/hnsylitao/react-dplayer/blob/master/LICENSE) @@ -15,6 +14,7 @@ npm install react-dplayer -save ## Usage +### commonjs ```js import Dplayer from "react-dplayer"; @@ -25,12 +25,22 @@ class Example extends Component { render() { return ( - + ) } } ``` +### browser +```html + +