Skip to content

Commit

Permalink
Minify dist and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
DonRai committed Oct 15, 2017
1 parent 626a2fe commit 33fc9e6
Show file tree
Hide file tree
Showing 6 changed files with 287 additions and 90 deletions.
7 changes: 6 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
"es2015",
"stage-0",
"react"
]
],
"env": {
"production": {
"presets": ["minify"]
}
}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![npm][npm]][npm-url]

## Basic Info
Tiny component 2 KB.
React component for check browser support format WebP and insert if supported WebP image. More about WebP https://developers.google.com/speed/webp/

## Online example
Expand Down
83 changes: 1 addition & 82 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions examples/modules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import Image from 'react-image-webp';

class TestImage extends React.Component {
class TestImage extends Component {
/**
* Render jsx to html
* @returns {XML}
Expand All @@ -21,7 +21,4 @@ class TestImage extends React.Component {
}
}

ReactDOM.render(
<TestImage />,
document.getElementById('root')
);
ReactDOM.render(<TestImage/>, document.getElementById('root'));
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-image-webp",
"version": "0.2.0",
"version": "0.2.1",
"description": "React component for check browser support format webp and insert if supported webp image.",
"repository": {
"type": "git",
Expand All @@ -13,9 +13,11 @@
],
"main": "dist/index.js",
"scripts": {
"build": "babel modules/ --out-dir dist/"
"build": "babel modules/ --out-dir dist/",
"minify": "minify dist -d dist"
},
"devDependencies": {
"babel-minify": "^0.2.0",
"babel-cli": "^6.9.0",
"babel-core": "^6.17.0",
"babel-eslint": "^7.0.0",
Expand Down
Loading

0 comments on commit 33fc9e6

Please sign in to comment.