Skip to content

Commit ddff8a6

Browse files
committedAug 22, 2018
init create-react-library@2.6.0
0 parents  commit ddff8a6

20 files changed

+17573
-0
lines changed
 

‎.babelrc

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"presets": [
3+
["env", {
4+
"modules": false
5+
}],
6+
"stage-0",
7+
"react"
8+
],
9+
"plugins": [
10+
"external-helpers"
11+
]
12+
}

‎.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

‎.eslintrc

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": [
4+
"standard",
5+
"standard-react"
6+
],
7+
"env": {
8+
"es6": true
9+
},
10+
"plugins": [
11+
"react"
12+
],
13+
"parserOptions": {
14+
"sourceType": "module"
15+
},
16+
"rules": {
17+
// don't force es6 functions to include space before paren
18+
"space-before-function-paren": 0,
19+
20+
// allow specifying true explicitly for boolean props
21+
"react/jsx-boolean-value": 0
22+
}
23+
}

‎.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# See https://help.github.com/ignore-files/ for more about ignoring files.
3+
4+
# dependencies
5+
node_modules
6+
7+
# builds
8+
build
9+
dist
10+
11+
# misc
12+
.DS_Store
13+
.env
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*

‎README.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# react-gradient-scroll-indicator
2+
3+
> A wrapper for scrollable content to add gradients indicating when more scrolling is possible
4+
5+
[![NPM](https://img.shields.io/npm/v/react-gradient-scroll-indicator.svg)](https://www.npmjs.com/package/react-gradient-scroll-indicator) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
6+
7+
## Install
8+
9+
```bash
10+
npm install --save react-gradient-scroll-indicator
11+
```
12+
13+
## Usage
14+
15+
```jsx
16+
import React, { Component } from 'react'
17+
18+
import MyComponent from 'react-gradient-scroll-indicator'
19+
20+
class Example extends Component {
21+
render () {
22+
return (
23+
<MyComponent />
24+
)
25+
}
26+
}
27+
```
28+
29+
## License
30+
31+
MIT © [jbccollins](https://github.com/jbccollins)

‎example/README.md

+2,164
Large diffs are not rendered by default.

‎example/package.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "react-gradient-scroll-indicator-example",
3+
"homepage": "https://jbccollins.github.io/react-gradient-scroll-indicator",
4+
"version": "0.0.0",
5+
"license": "MIT",
6+
"private": true,
7+
"dependencies": {
8+
"prop-types": "^15.6.2",
9+
"react": "^16.4.1",
10+
"react-dom": "^16.4.1",
11+
"react-scripts": "^1.1.4",
12+
"react-gradient-scroll-indicator": "link:.."
13+
},
14+
"scripts": {
15+
"start": "react-scripts start",
16+
"build": "react-scripts build",
17+
"test": "react-scripts test --env=jsdom",
18+
"eject": "react-scripts eject"
19+
}
20+
}

‎example/public/index.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6+
<meta name="theme-color" content="#000000">
7+
8+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
9+
10+
<title>react-gradient-scroll-indicator</title>
11+
</head>
12+
13+
<body>
14+
<noscript>
15+
You need to enable JavaScript to run this app.
16+
</noscript>
17+
18+
<div id="root"></div>
19+
</body>
20+
</html>

‎example/public/manifest.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"short_name": "react-gradient-scroll-indicator",
3+
"name": "react-gradient-scroll-indicator",
4+
"start_url": "./index.html",
5+
"display": "standalone",
6+
"theme_color": "#000000",
7+
"background_color": "#ffffff"
8+
}

‎example/src/App.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React, { Component } from 'react'
2+
3+
import ExampleComponent from 'react-gradient-scroll-indicator'
4+
5+
export default class App extends Component {
6+
render () {
7+
return (
8+
<div>
9+
<ExampleComponent text='Modern React component module' />
10+
</div>
11+
)
12+
}
13+
}

‎example/src/index.css

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
body {
2+
margin: 0;
3+
padding: 0;
4+
font-family: sans-serif;
5+
}

‎example/src/index.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react'
2+
import ReactDOM from 'react-dom'
3+
4+
import './index.css'
5+
import App from './App'
6+
7+
ReactDOM.render(<App />, document.getElementById('root'))

‎example/yarn.lock

+7,162
Large diffs are not rendered by default.

‎package.json

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"name": "react-gradient-scroll-indicator",
3+
"version": "1.0.0",
4+
"description": "A wrapper for scrollable content to add gradients indicating when more scrolling is possible",
5+
"author": "jbccollins",
6+
"license": "MIT",
7+
"repository": "jbccollins/react-gradient-scroll-indicator",
8+
"main": "dist/index.js",
9+
"module": "dist/index.es.js",
10+
"jsnext:main": "dist/index.es.js",
11+
"engines": {
12+
"node": ">=8",
13+
"npm": ">=5"
14+
},
15+
"scripts": {
16+
"test": "cross-env CI=1 react-scripts test --env=jsdom",
17+
"test:watch": "react-scripts test --env=jsdom",
18+
"build": "rollup -c",
19+
"start": "rollup -c -w",
20+
"prepare": "yarn run build",
21+
"predeploy": "cd example && yarn install && yarn run build",
22+
"deploy": "gh-pages -d example/build"
23+
},
24+
"peerDependencies": {
25+
"prop-types": "^15.5.4",
26+
"react": "^15.0.0 || ^16.0.0",
27+
"react-dom": "^15.0.0 || ^16.0.0"
28+
},
29+
"devDependencies": {
30+
"babel-core": "^6.26.3",
31+
"babel-eslint": "^8.2.5",
32+
"babel-plugin-external-helpers": "^6.22.0",
33+
"babel-preset-env": "^1.7.0",
34+
"babel-preset-react": "^6.24.1",
35+
"babel-preset-stage-0": "^6.24.1",
36+
"cross-env": "^5.1.4",
37+
"eslint": "^5.0.1",
38+
"eslint-config-standard": "^11.0.0",
39+
"eslint-config-standard-react": "^6.0.0",
40+
"eslint-plugin-import": "^2.13.0",
41+
"eslint-plugin-node": "^6.0.1",
42+
"eslint-plugin-promise": "^3.8.0",
43+
"eslint-plugin-react": "^7.10.0",
44+
"eslint-plugin-standard": "^3.1.0",
45+
"gh-pages": "^1.2.0",
46+
"react": "^16.4.1",
47+
"react-dom": "^16.4.1",
48+
"react-scripts": "^1.1.4",
49+
"rollup": "^0.62.0",
50+
"rollup-plugin-babel": "^3.0.7",
51+
"rollup-plugin-commonjs": "^9.1.3",
52+
"rollup-plugin-node-resolve": "^3.3.0",
53+
"rollup-plugin-peer-deps-external": "^2.2.0",
54+
"rollup-plugin-postcss": "^1.6.2",
55+
"rollup-plugin-url": "^1.4.0"
56+
},
57+
"files": [
58+
"dist"
59+
]
60+
}

‎rollup.config.js

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import babel from 'rollup-plugin-babel'
2+
import commonjs from 'rollup-plugin-commonjs'
3+
import external from 'rollup-plugin-peer-deps-external'
4+
import postcss from 'rollup-plugin-postcss'
5+
import resolve from 'rollup-plugin-node-resolve'
6+
import url from 'rollup-plugin-url'
7+
8+
import pkg from './package.json'
9+
10+
export default {
11+
input: 'src/index.js',
12+
output: [
13+
{
14+
file: pkg.main,
15+
format: 'cjs',
16+
sourcemap: true
17+
},
18+
{
19+
file: pkg.module,
20+
format: 'es',
21+
sourcemap: true
22+
}
23+
],
24+
plugins: [
25+
external(),
26+
postcss({
27+
modules: true
28+
}),
29+
url(),
30+
babel({
31+
exclude: 'node_modules/**'
32+
}),
33+
resolve(),
34+
commonjs()
35+
]
36+
}

‎src/.eslintrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"env": {
3+
"jest": true
4+
}
5+
}

‎src/index.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React, { Component } from 'react'
2+
import PropTypes from 'prop-types'
3+
4+
import styles from './styles.css'
5+
6+
export default class ExampleComponent extends Component {
7+
static propTypes = {
8+
text: PropTypes.string
9+
}
10+
11+
render() {
12+
const {
13+
text
14+
} = this.props
15+
16+
return (
17+
<div className={styles.test}>
18+
Example Component: {text}
19+
</div>
20+
)
21+
}
22+
}

‎src/styles.css

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* add css styles here (optional) */
2+
3+
.test {
4+
display: inline-block;
5+
margin: 2em auto;
6+
border: 2px solid #000;
7+
font-size: 2em;
8+
}

‎src/test.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import ExampleComponent from './'
2+
3+
describe('ExampleComponent', () => {
4+
it('is truthy', () => {
5+
expect(ExampleComponent).toBeTruthy()
6+
})
7+
})

‎yarn.lock

+7,940
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.