Skip to content

Commit

Permalink
issue: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Sep 19, 2018
1 parent 7b04bf8 commit 8481e8e
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# react-fade-img
# react-fade-image
> Fade or lazy image for react

Expand Down
10 changes: 5 additions & 5 deletions _README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# react-fade-img
# react-fade-image
> Fade or lazy image for react
## properties:
Expand All @@ -8,19 +8,19 @@ BACKUP_PROPERTIES

## install && import:
```bash
npm install --save afeiship/react-fade-img --registry=https://registry.npm.taobao.org
npm install --save afeiship/react-fade-image --registry=https://registry.npm.taobao.org
```

```js
import ReactFadeImg from 'react-fade-img';
import ReactFadeImage from 'react-fade-image';
```

```scss
// customize your styles:
$react-fade-img-options:(
$react-fade-image-options:(
);

@import 'node_modules/react-fade-img/dist/style.scss';
@import 'node_modules/react-fade-image/dist/style.scss';
```


Expand Down
2 changes: 1 addition & 1 deletion build/auto-readme.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const targetUsageRE = /## usage:\n```jsx\n(.*)\n```/;
let readmeFile = path.join(__dirname,'../README.md');
let _readmeFile = path.join(__dirname,'../_README.md');
let exampleFile = path.join(__dirname,'../src/dev.js');
let templateFile = path.join(__dirname,'../src/components/react-fade-img.js');
let templateFile = path.join(__dirname,'../src/components/react-fade-image.js');



Expand Down
4 changes: 2 additions & 2 deletions build/webpack.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ base.entry = {
base.output = {
path: config.build.assetsRoot,
publicPath: config.build.assetsPublicPath,
filename: 'react-fade-img.js',
library: 'ReactFadeImg',
filename: 'react-fade-image.js',
library: 'ReactFadeImage',
libraryTarget: 'umd'
}

Expand Down
2 changes: 2 additions & 0 deletions dist/react-fade-image.js

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

1 change: 1 addition & 0 deletions dist/react-fade-image.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions dist/react-fade-img.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/react-fade-img.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions dist/style.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
$react-fade-img-options: (
$react-fade-image-options: (
duration: 0.3s
) !default;

.react-fade-img {
.react-fade-image {
$duration: map-get(
$map: $react-fade-img-options,
$map: $react-fade-image-options,
$key: duration
);

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<meta name="format-detection" content="date=no" />
<meta name="referrer" content="never">

<title>react-fade-img</title>
<title>react-fade-image</title>
</head>
<body>
<div id="app"></div>
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"name": "react-fade-img",
"name": "react-fade-image",
"version": "0.0.1",
"description": "Fade or lazy image for react",
"author": "afeiship <1290657123@qq.com>",
"keywords": [
"components",
"react-fade-img",
"react-fade-image",
"ui",
"theme"
],
"private": false,
"repository": {
"type": "git",
"url": "git+https://github.com/afeiship/react-fade-img.git"
"url": "git+https://github.com/afeiship/react-fade-image.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/afeiship/react-fade-img/issues"
"url": "https://github.com/afeiship/react-fade-image/issues"
},
"homepage": "https://github.com/afeiship/react-fade-img",
"homepage": "https://github.com/afeiship/react-fade-image",
"scripts": {
"dev": "node build/dev-server.js",
"build": "node build/build.js",
"docs": "node build/auto-readme.js"
},
"main": "./dist/react-fade-img.js",
"main": "./dist/react-fade-image.js",
"devDependencies": {
"autoprefixer": "^6.4.0",
"autoprefixer-loader": "^3.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class extends Component {
<img
onLoad={this._onLoad}
data-loaded={_value}
className={classNames('react-fade-img', className)}
className={classNames('react-fade-image', className)}
{...props}
/>
);
Expand Down
6 changes: 3 additions & 3 deletions src/components/style.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
$react-fade-img-options: (
$react-fade-image-options: (
duration: 0.3s
) !default;

.react-fade-img {
.react-fade-image {
$duration: map-get(
$map: $react-fade-img-options,
$map: $react-fade-image-options,
$key: duration
);

Expand Down
10 changes: 5 additions & 5 deletions src/dev.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import './dev.scss';
import ReactFadeImg from './main';
import ReactFadeImage from './main';

/*===example start===*/

// install: npm install afeiship/react-fade-img --save
// import : import ReactFadeImg from 'react-fade-img'
// install: npm install afeiship/react-fade-image --save
// import : import ReactFadeImage from 'react-fade-image'

class App extends React.Component{
state = {
Expand All @@ -20,8 +20,8 @@ class App extends React.Component{

render(){
return (
<div className="hello-react-fade-img">
<ReactFadeImg value={false} src="http://imglf4.nosdn.127.net/img/KzNuMlRKSFVENitYYjJBYnU5Q2cwQjRjd0ljSURUWmxZeGxvWVlOYnhHZWRReFBoUVJWUXFRPT0.jpg?imageView&thumbnail=1680x0&quality=96&stripmeta=0&type=jpg" ref='rc' />
<div className="hello-react-fade-image">
<ReactFadeImage value={false} src="http://imglf4.nosdn.127.net/img/KzNuMlRKSFVENitYYjJBYnU5Q2cwQjRjd0ljSURUWmxZeGxvWVlOYnhHZWRReFBoUVJWUXFRPT0.jpg?imageView&thumbnail=1680x0&quality=96&stripmeta=0&type=jpg" ref='rc' />
</div>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/dev.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ button{
@import './components/style.scss';


.hello-react-fade-img{
.hello-react-fade-image{
color:#F00;
padding:50px 20px;

.react-fade-img{
.react-fade-image{
width: 100%;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import ReactFadeImg from 'components/react-fade-img';
export default ReactFadeImg;
import ReactFadeImage from 'components/react-fade-image';
export default ReactFadeImage;

0 comments on commit 8481e8e

Please sign in to comment.