-
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 6cffa95
Showing
16 changed files
with
6,943 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,12 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": false | ||
} | ||
], | ||
"@babel/preset-react" | ||
], | ||
"plugins": ["@babel/plugin-proposal-optional-chaining"] | ||
} |
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 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = LF | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
max_line_length = 80 |
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,19 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"plugins": ["react"], | ||
"rules": { | ||
"react/jsx-uses-vars": 2, | ||
"react/jsx-uses-react": 2, | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
"vars": "all", | ||
"args": "none", | ||
"ignoreRestSiblings": true | ||
} | ||
], | ||
"no-else-return": "error", | ||
"no-unreachable": "error", | ||
"prefer-const": "error" | ||
} | ||
} |
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 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# General | ||
.DS_Store | ||
|
||
# Build | ||
public |
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,5 @@ | ||
{ | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
} |
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,4 @@ | ||
{ | ||
"src/**/*.js": ["eslint --fix", "git add"], | ||
"src/**/*.{js,md,json}": ["prettier --write", "git add"] | ||
} |
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,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"semi": 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,34 @@ | ||
{ | ||
"name": "kerbs", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "node -r @babel/register node_modules/.bin/webpack --mode production --config webpack/webpack.config.js", | ||
"dev": "node -r @babel/register node_modules/.bin/webpack-dev-server --hot --config webpack/webpack.dev.js" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.4.4", | ||
"@babel/plugin-proposal-optional-chaining": "^7.2.0", | ||
"@babel/preset-env": "^7.4.4", | ||
"@babel/preset-react": "^7.0.0", | ||
"@babel/register": "^7.4.4", | ||
"@mdx-js/loader": "^1.0.19", | ||
"babel-eslint": "^10.0.1", | ||
"babel-loader": "^8.0.6", | ||
"eslint": "^5.16.0", | ||
"eslint-plugin-react": "^7.13.0", | ||
"html-webpack-plugin": "^3.2.0", | ||
"husky": "^2.3.0", | ||
"lint-staged": "^8.1.7", | ||
"prettier": "^1.17.1", | ||
"webpack": "^4.31.0", | ||
"webpack-cli": "^3.3.2", | ||
"webpack-dev-server": "^3.4.1", | ||
"webpack-merge": "^4.2.1" | ||
}, | ||
"dependencies": { | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6" | ||
} | ||
} |
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 React from 'react' | ||
import Doc from './doc.mdx' | ||
|
||
const Kerbs = () => <Doc /> | ||
|
||
export default Kerbs |
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 @@ | ||
# Overview | ||
|
||
Some project overview |
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,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>Kerbs</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
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,17 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import Kerbs from './Kerbs' | ||
|
||
const root = document.getElementById('root') | ||
|
||
const render = Component => { | ||
ReactDOM.render(<Component />, root) | ||
} | ||
|
||
render(Kerbs) | ||
|
||
if (module.hot) { | ||
module.hot.accept('./Kerbs', () => { | ||
render(Kerbs) | ||
}) | ||
} |
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": ["@babel/preset-env"] | ||
} |
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,46 @@ | ||
import HtmlWebpackPlugin from 'html-webpack-plugin' | ||
import path from 'path' | ||
|
||
const resolve = filePath => path.resolve(__dirname, '../', filePath) | ||
|
||
export default { | ||
entry: [resolve('src/index')], | ||
|
||
output: { | ||
path: resolve('public'), | ||
publicPath: '/', | ||
filename: 'static/[name].[hash].js', | ||
chunkFilename: 'static/[name].[hash].chunk.js' | ||
}, | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
include: [resolve('src')], | ||
loader: 'babel-loader' | ||
}, | ||
{ | ||
test: /\.mdx$/, | ||
use: ['babel-loader', '@mdx-js/loader'] | ||
} | ||
] | ||
}, | ||
|
||
resolve: { | ||
modules: ['node_modules', resolve('src')] | ||
}, | ||
|
||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: resolve('src/index.html'), | ||
chunksSortMode: 'none' | ||
}) | ||
], | ||
|
||
stats: { | ||
modules: false, | ||
children: false, | ||
colors: 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,17 @@ | ||
import merge from 'webpack-merge' | ||
import config from './webpack.config.js' | ||
|
||
export default merge.strategy({ entry: 'prepend' })(config, { | ||
mode: 'development', | ||
devtool: 'source-map', | ||
|
||
devServer: { | ||
compress: true, | ||
historyApiFallback: true, | ||
stats: { | ||
modules: false, | ||
children: false, | ||
colors: true | ||
} | ||
} | ||
}) |
Oops, something went wrong.