generated from louisgv/lrct
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9c49c87
Showing
27 changed files
with
13,537 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": [["react-app", { "typescript": true }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
/dist | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
/keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import '@storybook/addon-storysource/register'; | ||
import '@storybook/addon-a11y/register'; | ||
import '@storybook/addon-actions/register'; | ||
import 'storybook-styled-components/register'; | ||
import '@storybook/addon-links/register'; | ||
import '@storybook/addon-knobs/register'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { configure, addDecorator } from '@storybook/react' | ||
import { withThemes } from 'storybook-styled-components' | ||
|
||
import { theme } from '../src/styles' | ||
|
||
addDecorator(withThemes({ | ||
'default' : theme | ||
})) | ||
|
||
const req = require.context('../src', true, /.stories.tsx$/) | ||
function loadStories() { | ||
req.keys().forEach(req) | ||
} | ||
configure(loadStories, module) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = ({ config }) => { | ||
config.module.rules.push({ | ||
test: /\.stories\.(ts|tsx)?$/, | ||
loaders: [ | ||
{ | ||
loader: require.resolve('@storybook/addon-storysource/loader'), | ||
options: { parser: 'typescript' }, | ||
}, | ||
], | ||
enforce: 'pre', | ||
}); | ||
|
||
config.module.rules.push({ | ||
test: /\.(ts|tsx)$/, | ||
use: [ | ||
{ | ||
loader: require.resolve('babel-loader'), | ||
options: { | ||
presets: [require.resolve('babel-preset-react-app')] | ||
} | ||
}, | ||
require.resolve('react-docgen-typescript-loader') | ||
] | ||
}) | ||
config.resolve.extensions.push('.ts', '.tsx') | ||
return config | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
### Changelog | ||
|
||
All notable changes to this project will be documented in this file. Dates are displayed in UTC. | ||
|
||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). | ||
|
||
#### [v0.3.0](https://github.com/louisgv/lrct/compare/v0.2.1...v0.3.0) | ||
|
||
> 9 September 2019 | ||
- Using babel to compile for babel-macro [`e5f02aa`](https://github.com/louisgv/lrct/commit/e5f02aa6e67409861561f4d5d547d25f6f0deaf6) | ||
|
||
#### [v0.2.1](https://github.com/louisgv/lrct/compare/v0.2.0...v0.2.1) | ||
|
||
> 9 September 2019 | ||
#### [v0.2.0](https://github.com/louisgv/lrct/compare/v0.1.2...v0.2.0) | ||
|
||
> 9 September 2019 | ||
- Fix wrong addons file [`3d6bb4e`](https://github.com/louisgv/lrct/commit/3d6bb4e9b3e611790a6077d716fa1f0e8a817d4c) | ||
- Figure out simple dist strategy [`2ca39a3`](https://github.com/louisgv/lrct/commit/2ca39a35f42f58244577452f981b39c0e1596ced) | ||
|
||
#### [v0.1.2](https://github.com/louisgv/lrct/compare/v0.1.1...v0.1.2) | ||
|
||
> 9 September 2019 | ||
#### v0.1.1 | ||
|
||
> 9 September 2019 | ||
- Initial commit [`b462dc2`](https://github.com/louisgv/lrct/commit/b462dc2c4fd555a19531e30491dbc46e4b78e9d5) | ||
- Initial working storybook with minimal change to structure overall [`a93c94c`](https://github.com/louisgv/lrct/commit/a93c94c853cf54099719144d880b19d071537da6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2099 L | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# L's React Component Template | ||
|
||
What's included: | ||
|
||
1. [![storybook](https://img.shields.io/badge/storybook-%F0%9F%93%95-red)](https://storybook.js.org/) [![Storybook](https://cdn.jsdelivr.net/gh/storybookjs/brand@master/badge/badge-storybook.svg)](https://louisgv.ga/lrct) | ||
2. [![typescript](https://img.shields.io/badge/typescript-%E2%9C%A8-blue)](https://www.typescriptlang.org/) | ||
3. [![styled-system](https://img.shields.io/badge/styled--system-%F0%9F%97%B3-lightgrey)](https://github.com/styled-system/styled-system) | ||
4. [![auto-changelog](https://img.shields.io/badge/auto--changelog-%F0%9F%93%9D-blue)](https://github.com/CookPete/auto-changelog) | ||
5. [![styled-components](https://img.shields.io/badge/styled--components-%F0%9F%92%85%20-orange.svg?colorB=daa357&colorA=db748e)](https://github.com/styled-components/styled-components) | ||
|
||
## Available Scripts | ||
|
||
See `package.json` | ||
|
||
## Deploy Instructions | ||
|
||
``` | ||
yarn dist | ||
cd dist | ||
npm publish | ||
``` | ||
|
||
## Example | ||
|
||
```tsx | ||
import { Footer } from 'lrct/components/Footer' | ||
|
||
render(<Footer>Hello</Footer>) | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"name": "lrct", | ||
"version": "0.3.0", | ||
"homepage": "https://louisgv.ga/lrct", | ||
"repository": "louisgv/lrct", | ||
"license": "MIT", | ||
"scripts": { | ||
"predeploy": "yarn build", | ||
"deploy": "npx gh-pages -d build", | ||
"start": "start-storybook -c .storybook -s public -p 9009", | ||
"build": "build-storybook -o build -s public", | ||
"version": "npx auto-changelog -p && git add CHANGELOG.md", | ||
"dist": "yarn clean:dist && yarn dist:prod && yarn dist:type && yarn dist:copy", | ||
"dist:prod": "npx cross-env NODE_ENV=production npx babel src -d dist -s --extensions .tsx --ignore 'src/**/*.stories.tsx'", | ||
"dist:type": "tsc -p tsconfig.prod.json && npx cpy-cli src/typings dist/typings", | ||
"dist:copy": "npx cpy-cli README.md CHANGELOG.md LICENSE package.json dist/", | ||
"clean:build": "npx rimraf ./build", | ||
"clean:dist": "npx rimraf ./dist" | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.9.0", | ||
"react-dom": "^16.9.0", | ||
"styled-components": "^4.3.2", | ||
"styled-system": "^5.1.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.6.0", | ||
"@storybook/addon-a11y": "^5.1.11", | ||
"@storybook/addon-actions": "^5.1.11", | ||
"@storybook/addon-knobs": "^5.1.11", | ||
"@storybook/addon-links": "^5.1.11", | ||
"@storybook/addon-storysource": "^5.1.11", | ||
"@storybook/addons": "^5.1.11", | ||
"@storybook/react": "^5.1.11", | ||
"@types/jest": "24.0.18", | ||
"@types/node": "12.7.4", | ||
"@types/react": "16.9.2", | ||
"@types/react-dom": "16.9.0", | ||
"@types/storybook__react": "^4.0.2", | ||
"@types/styled-components": "^4.1.19", | ||
"babel-loader": "^8.0.6", | ||
"react": "^16.9.0", | ||
"react-docgen-typescript-loader": "^3.2.0", | ||
"react-docgen-typescript-webpack-plugin": "^1.1.0", | ||
"react-dom": "^16.9.0", | ||
"react-scripts": "^3.1.1", | ||
"storybook-styled-components": "^1.1.4", | ||
"styled-components": "^4.3.2", | ||
"styled-system": "^5.1.1", | ||
"typescript": "3.6.2" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"babelMacros": { | ||
"styledComponents": { | ||
"pure": true | ||
} | ||
} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.