Skip to content

Commit f91e5f7

Browse files
committed
chore: Add prettier, with pipeline and rename docs for github pages
1 parent f442827 commit f91e5f7

35 files changed

+7082
-325
lines changed

Diff for: .eslintrc.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es2021": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:react/recommended",
10+
"prettier",
11+
"prettier/react",
12+
"plugin:prettier/recommended"
13+
],
14+
"parserOptions": {
15+
"ecmaFeatures": {
16+
"jsx": true
17+
},
18+
"ecmaVersion": 12
19+
},
20+
"plugins": ["react"],
21+
"rules": {}
22+
}

Diff for: .github/workflows/main.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Build
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
node_version: [14]
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: Use Node.js ${{ matrix.node_version }}
16+
uses: actions/setup-node@v1
17+
with:
18+
node_version: ${{ matrix.node_version }}
19+
20+
- name: run CI
21+
run: |
22+
yarn install
23+
# yarn lint
24+
yarn format
25+
yarn prepublish

Diff for: .npmignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.gitignore
22
src
3-
examples
3+
docs

Diff for: .prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
5+
}

Diff for: examples/app.css renamed to docs/app.css

File renamed without changes.
File renamed without changes.

Diff for: examples/index.html renamed to docs/index.html

File renamed without changes.

Diff for: examples/index.jsx renamed to docs/index.jsx

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: docs/views/home/home-view.jsx

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
var React = require("react");
2+
var BothScrollbar = require("./examples/both-scrollbar.jsx");
3+
var HorizontalScrollbar = require("./examples/horizontal-scrollbar.jsx");
4+
var VerticalScrollbar = require("./examples/vertical-scrollbar.jsx");
5+
var CustomScrollbar = require("./examples/custom-scrollbar.jsx");
6+
var AffixScrollbar = require("./examples/affix-scrollbar.jsx");
7+
8+
require("./home-view.css");
9+
10+
module.exports = React.createClass({
11+
getInitialState: function () {
12+
return {};
13+
},
14+
15+
render: function () {
16+
return (
17+
<div className="Home">
18+
<header className="Home-header">
19+
<h1>React-Scrollbars</h1>
20+
<h2>
21+
<a href="https://github.com/ojame/react-scrollbar">
22+
view on github
23+
</a>
24+
</h2>
25+
</header>
26+
27+
<div className="Home-container">
28+
<aside className="Home-navigation">
29+
<p>
30+
Super simple custom scrollbars. Works on Chrome, Firefox, Safari,
31+
IE10+ and mobile.
32+
</p>
33+
<nav>
34+
<ul>
35+
<li>
36+
<a href="#vertical">Vertical</a>
37+
</li>
38+
<li>
39+
<a href="#horizontal">Horizontal</a>
40+
</li>
41+
<li>
42+
<a href="#both">Both</a>
43+
</li>
44+
<li>
45+
<a href="#affix">Affix</a>
46+
</li>
47+
<li>
48+
<a href="#implementation">Implementation</a>
49+
</li>
50+
</ul>
51+
</nav>
52+
</aside>
53+
54+
<div className="Home-content">
55+
<div className="Home-content-block" id="vertical">
56+
<h3>Vertical Scrollbars</h3>
57+
<VerticalScrollbar />
58+
</div>
59+
60+
<div className="Home-content-block" id="horizontal">
61+
<h3>Horizontal Scrollbars</h3>
62+
<HorizontalScrollbar />
63+
</div>
64+
65+
<div className="Home-content-block" id="both">
66+
<h3>Horizontal and Vertical Scrollbars</h3>
67+
<BothScrollbar />
68+
</div>
69+
70+
<div className="Home-content-block" id="custom">
71+
<h3>Custom Scrollbars</h3>
72+
<CustomScrollbar />
73+
</div>
74+
75+
<div className="Home-content-block" id="affix">
76+
<h3>Horizontal Affix Scrollbars</h3>
77+
<AffixScrollbar />
78+
</div>
79+
80+
<div className="Home-content-block" id="implementation">
81+
<h3>Implementation</h3>
82+
<div className="markdown">
83+
<div
84+
dangerouslySetInnerHTML={{
85+
__html: require("../../../README.md"),
86+
}}
87+
></div>
88+
</div>
89+
</div>
90+
</div>
91+
</div>
92+
93+
<footer className="Home-footer">
94+
made by{" "}
95+
<a href="https://twitter.com/_ojame" target="_blank">
96+
@_ojame
97+
</a>{" "}
98+
and{" "}
99+
<a href="https://twitter.com/ncreen_same" target="_blank">
100+
@nscreen_same
101+
</a>{" "}
102+
on Macropod (
103+
<a href="https://twitter.com/MacropodHQ" target="_blank">
104+
@MacropodHQ
105+
</a>
106+
) time.
107+
</footer>
108+
</div>
109+
);
110+
},
111+
});
File renamed without changes.
File renamed without changes.

Diff for: examples/views/home/home-view.jsx

-83
This file was deleted.

0 commit comments

Comments
 (0)