Skip to content

Commit de902cb

Browse files
author
hustcc
committed
init
0 parents commit de902cb

19 files changed

+20684
-0
lines changed

.babelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": ["react", "es2015"],
3+
"plugins": ["transform-es3-member-expression-literals", "transform-es3-property-literals"],
4+
"env": {
5+
"development": {
6+
}
7+
}
8+
}

.eslintrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"ecmaFeatures": {
3+
"jsx": true,
4+
"modules": true
5+
},
6+
"env": {
7+
"browser": true,
8+
"node": true
9+
},
10+
"parser": "babel-eslint",
11+
"rules": {
12+
"quotes": [2, "single"],
13+
"strict": [2, "never"],
14+
"babel/generator-star-spacing": 1,
15+
"babel/new-cap": 1,
16+
"babel/object-shorthand": 1,
17+
"babel/arrow-parens": 1,
18+
"babel/no-await-in-loop": 1,
19+
"react/jsx-uses-react": 2,
20+
"react/jsx-uses-vars": 2,
21+
"react/react-in-jsx-scope": 2
22+
},
23+
"plugins": [
24+
"babel",
25+
"react"
26+
]
27+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
npm-debug.*

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: node_js
2+
node_js:
3+
- "0.12"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) hustcc
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# react-adsence
2+
3+
4+
> react-adsence is a React-component for Google AdSence / Baidu advertisement.
5+
6+
[![Build Status](https://travis-ci.org/hustcc/react-adsence.svg?branch=master)](https://travis-ci.org/hustcc/react-adsence) [![npm](https://img.shields.io/npm/v/react-adsence.svg?style=flat-square)](https://www.npmjs.com/package/react-adsence) [![npm](https://img.shields.io/npm/dt/react-adsence.svg?style=flat-square)](https://www.npmjs.com/package/react-adsence) [![npm](https://img.shields.io/npm/l/react-adsence.svg?style=flat-square)](https://www.npmjs.com/package/react-adsence)
7+
8+
9+
# 1. Install
10+
11+
> **npm install react-adsence**
12+
13+
14+
# 2. Usage
15+
16+
```js
17+
import React from 'react';
18+
import AdSence from 'react-adsence';
19+
20+
<AdSence.Google client='ca-pub-7292810486004926'
21+
slot='7806394673' />
22+
23+
// or
24+
25+
<AdSence.Google client='ca-pub-7292810486004926'
26+
slot='7806394673'
27+
style={{width: 500, height: 300, float: 'left'}}
28+
format='' />
29+
```
30+
31+
32+
# 3. TODO
33+
34+
- `Baidu` advertisement supported.
35+
- `Google` sync adsence supported.
36+
37+
38+
# 4. LICENSE
39+
40+
MIT

demo/demo.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pre {
2+
background-color: #f6dcd7;
3+
padding: 10px 15px;
4+
}
5+
pre.strong {
6+
font-weight: bold;
7+
}
8+
9+
#wrapper {
10+
max-width: 1000px;
11+
margin: 0 auto;
12+
}

0 commit comments

Comments
 (0)