Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 9ed0cea

Browse files
authored
Merge pull request #22 from benox3/cdn
Update package.json and README
2 parents 7a52034 + e31a286 commit 9ed0cea

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Build Status](https://travis-ci.org/benox3/react-pic.svg?branch=master)](https://travis-ci.org/benox3/react-pic)
77
[![Coverage Status](https://coveralls.io/repos/github/benox3/react-pic/badge.svg?branch=master)](https://coveralls.io/github/benox3/react-pic?branch=master)
88

9-
A responsive image loading component.
9+
React component for progressive and responsive image loading.
1010

1111
react-pic works universally. On the server-side, it works by setting a default image (usually something very small to reduce data). On the client-side, it will try to load the optimal image based on [prop data](#Props).
1212

@@ -19,10 +19,10 @@ npm install react-pic --save
1919

2020
#### CDN:
2121
```html
22-
<script src='https://unpkg.com/react-pic@0.0.1/dist/umd/react-pic.js'></script>
22+
<script src='https://unpkg.com/react-pic@latest/dist/umd/react-pic.js'></script>
2323

2424
<!-- or use minified -->
25-
<script src='https://unpkg.com/react-pic@0.0.1/dist/umd/react-pic.min.js'></script>
25+
<script src='https://unpkg.com/react-pic@latest/dist/umd/react-pic.min.js'></script>
2626
```
2727

2828
## Usage
@@ -58,12 +58,6 @@ export default class Example extends Component {
5858
| noscriptIndex | false | Number | The image object to use on noscript render. **Default is last image in images** |
5959
| style | false | Object | Override the style object. **This will remove the default style:** `{ margin: '0 auto', maxWidth: '100%', width: '100%' }` |
6060

61-
## Testing
62-
63-
```sh
64-
$ npm test
65-
```
66-
6761
## Special Thanks
6862

6963
- To [remarkablemark](https://github.com/remarkablemark) and [tdlm](https://github.com/tdlm) for their feedback and review.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-pic",
3-
"version": "0.0.7",
4-
"description": "A responsive image loading component.",
3+
"version": "0.0.8",
4+
"description": "React component for progressive and responsive image loading.",
55
"author": "Ben Budnevich",
66
"main": "dist/commonjs/react-pic.js",
77
"scripts": {
@@ -35,7 +35,8 @@
3535
"img",
3636
"progressive",
3737
"loading",
38-
"responsive"
38+
"responsive",
39+
"universal"
3940
],
4041
"bugs": {
4142
"url": "https://github.com/benox3/react-pic/issues"

webpack.config.commonjs.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const env = process.env.NODE_ENV;
33

44
const config = {
55
entry: [
6-
'babel-polyfill',
76
'./lib/index.js'
87
],
98
devtool: 'source-map',

webpack.config.dev.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
const path = require('path');
2+
const webpack = require('webpack');
23

34
module.exports = {
45
entry: [
56
'./playground/client' // Your appʼs entry point
67
],
8+
target: 'node',
79
output: {
810
publicPath: 'http://localhost:8080/build/',
911
path: path.join(__dirname, 'build'),
1012
filename: './react-pic.js'
1113
},
14+
plugins: [
15+
new webpack.DefinePlugin({
16+
'process.env': {
17+
NODE_ENV: JSON.stringify('development')
18+
}
19+
})
20+
],
1221
module: {
1322
loaders: [
1423
{

0 commit comments

Comments
 (0)