Skip to content

Commit

Permalink
Add react-styleguidist
Browse files Browse the repository at this point in the history
- uses fork for abs path support (styleguidist/react-styleguidist#658)
- disable example components
- sort package.json
  • Loading branch information
Philipp Bisson committed Oct 31, 2017
1 parent da324e1 commit 858d628
Show file tree
Hide file tree
Showing 26 changed files with 1,007 additions and 102 deletions.
11 changes: 7 additions & 4 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[ignore]
/node_modules/
.*/node_modules/redux-persist/.*
/node_modules/
.*/node_modules/redux-persist/.*
.*/node_modules/jss/.*
.*/node_modules/findup/.*
.*/styleguide.config.js.*
[include]
src/
src/node_modules/
src/
src/node_modules/
[libs]

[lints]
Expand Down
2 changes: 1 addition & 1 deletion generators/component/markdown.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic {{ properCase name }}:

```example
```jsx
<{{ properCase name }}>{{ name }}</{{ properCase name }}>
```
51 changes: 22 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@
"path": "./node_modules/babel-core"
}
},
"scripts": {
"styleguide": "styleguidist server",
"styleguide:build": "styleguidist build",
"gen": "plop --plopfile generators/plopfile.js",
"start": "node scripts/start.js",
"https": "HTTPS=true node scripts/start.js",
"build": "node scripts/build.js",
"precommit": "lint-staged",
"eslint": "eslint src",
"flow": "flow",
"jest": "jest",
"test": "node scripts/test.js --env=jsdom"
},
"lint-staged": {
"*.js": [
"eslint"
]
},
"dependencies": {
"bootflat": "^2.0.4",
"bootstrap": "~3.3.7",
Expand All @@ -26,6 +44,7 @@
"react-dom": "^16.0.0",
"react-redux": "^5.0.6",
"react-router-dom": "^4.2.2",
"react-styleguidist": "git://github.com/25th-floor/react-styleguidist.git#091dde8",
"redux": "^3.7.2",
"redux-persist": "^4.10.1",
"rest": "^2.0.0"
Expand Down Expand Up @@ -94,28 +113,6 @@
"webpack-manifest-plugin": "1.2.1",
"whatwg-fetch": "2.0.3"
},
"lint-staged": {
"*.js": [
"eslint",
"flow",
"test"
],
"*.test.js": [
"eslint",
"test"
]
},
"scripts": {
"gen": "plop --plopfile generators/plopfile.js",
"precommit": "lint-staged",
"flow": "flow",
"eslint": "eslint src",
"start": "node scripts/start.js",
"https": "HTTPS=true node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js --env=jsdom",
"jest": "jest"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx}"
Expand Down Expand Up @@ -165,13 +162,9 @@
"presets": [
"react-app"
],
"env": {
"development":{
"plugins": [
"react-hot-loader/babel"
]
}
}
"plugins": [
"react-hot-loader/babel"
]
},
"eslintConfig": {
"extends": "react-app"
Expand Down
Binary file removed public/16.jpg
Binary file not shown.
8 changes: 5 additions & 3 deletions src/container/Auth/components/Brand/Brand.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Basic Brand:
- Basic Brand:
- Basic Brand:
- Basic Brand:

```example
<Brand>Brand</Brand>
```disabled
<Brand />
```
2 changes: 1 addition & 1 deletion src/container/Auth/components/Login/Login.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic Login:

```example
```disabled
<Login>Login</Login>
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic UserSelection:

```example
```disabled
<UserSelection>UserSelection</UserSelection>
```
2 changes: 1 addition & 1 deletion src/container/Home/components/DatePicker/DatePicker.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic DatePicker:

```example
```disabled
<DatePicker>DatePicker</DatePicker>
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic DatePickerButton:

```example
```disabled
<DatePickerButton>DatePickerButton</DatePickerButton>
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic DatePickerContainer:

```example
```disabled
<DatePickerContainer>DatePickerContainer</DatePickerContainer>
```
2 changes: 1 addition & 1 deletion src/container/Home/components/Day/Day.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic Day:

```example
```disabled
<Day>Day</Day>
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic MonthSelection:

```example
```disabled
<MonthSelection>MonthSelection</MonthSelection>
```
2 changes: 1 addition & 1 deletion src/container/Home/components/Navigation/Navigation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic Navigation:

```example
```disabled
<Navigation>Navigation</Navigation>
```
2 changes: 1 addition & 1 deletion src/container/Home/components/Period/Period.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic Period:

```example
```disabled
<Period>Period</Period>
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic PeriodComment:

```example
```disabled
<PeriodComment>PeriodComment</PeriodComment>
```
2 changes: 1 addition & 1 deletion src/container/Home/components/PeriodsForm/PeriodsForm.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic PeriodsForm:

```example
```disabled
<PeriodsForm>PeriodsForm</PeriodsForm>
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic PeriodsFormRow:

```example
```disabled
<PeriodsFormRow>PeriodsFormRow</PeriodsFormRow>
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic ProfileWidget:

```example
```disabled
<ProfileWidget>ProfileWidget</ProfileWidget>
```
2 changes: 1 addition & 1 deletion src/container/Home/components/TimeInput/TimeInput.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic TimeInput:

```example
```disabled
<TimeInput>TimeInput</TimeInput>
```
2 changes: 1 addition & 1 deletion src/container/Home/components/Weeks/Weeks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic Weeks:

```example
```disabled
<Weeks>Weeks</Weeks>
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Basic YearSelection:

```example
```disabled
<YearSelection>YearSelection</YearSelection>
```
2 changes: 1 addition & 1 deletion src/node_modules/@components/Avatar/Avatar.js

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

8 changes: 5 additions & 3 deletions src/node_modules/@components/Avatar/Avatar.md

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

2 changes: 1 addition & 1 deletion src/node_modules/@components/Motto/Motto.md

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

22 changes: 22 additions & 0 deletions styleguide.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* eslint-disable */
// https://raw.githubusercontent.com/just-boris/react-app-styleguidist/master/styleguide.config.js
module.exports = {
assetsDir: './public',
title: 'TTRACK STYLE GUIDE',
showCode: true,
webpackConfig: require('./config/webpack.config.dev.js'),
sections: [
{
name: 'Global',
components: 'src/node_modules/@components/**/*.js',
},
{
name: 'Containers',
components: 'src/container/**/*.js',
},
],
ignore: [
'**/*.test.js',
'**/index.js',
],
};
Loading

0 comments on commit 858d628

Please sign in to comment.