Initial client setup

This commit is contained in:
ireic
2019-12-03 20:39:54 +01:00
parent 84f0897c45
commit 6be3ac2e77
17 changed files with 17913 additions and 180 deletions

9
client/.babelrc Normal file
View File

@@ -0,0 +1,9 @@
{
"presets": ["@babel/preset-env", "@babel/react"],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-syntax-dynamic-import",
["@babel/plugin-proposal-class-properties", { "loose": true }],
]
}

38
client/.eslintrc.json Normal file
View File

@@ -0,0 +1,38 @@
{
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 8,
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"jest": true
},
"extends": ["airbnb", "prettier", "prettier/react"],
"rules": {
"radix": 0,
"no-restricted-syntax": 0,
"no-await-in-loop": 0,
"no-console": 0,
"consistent-return": 0,
"no-param-reassign": [2, { "props": false }],
"no-return-assign": [2, "except-parens"],
"no-use-before-define": 0,
"import/prefer-default-export": 0,
"import/no-cycle": 0,
"react/no-array-index-key": 0,
"react/forbid-prop-types": 0,
"jsx-a11y/click-events-have-key-events": 0
},
"settings": {
// Allows us to use absolute imports within codebase
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "src/"]
}
}
}
}

5
client/.prettierrc Normal file
View File

@@ -0,0 +1,5 @@
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all"
}

0
client/README.md Normal file
View File

9980
client/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

60
client/package.json Normal file
View File

@@ -0,0 +1,60 @@
{
"name": "jira_client",
"version": "1.0.0",
"author": "Ivor Reic",
"license": "MIT",
"scripts": {
"start": "webpack-dev-server",
"build": "rm -rf dist && webpack --config webpack.config.production.js --progress",
"pre-commit": "lint-staged"
},
"devDependencies": {
"@babel/core": "^7.7.4",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-decorators": "^7.7.4",
"@babel/plugin-proposal-export-namespace-from": "^7.7.4",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@babel/preset-react": "^7.7.4",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"eslint": "^6.1.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-react-hooks": "^1.7.0",
"file-loader": "^5.0.2",
"html-webpack-plugin": "^3.2.0",
"lint-staged": "^9.5.0",
"prettier": "^1.19.1",
"url-loader": "^3.0.0",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0"
},
"dependencies": {
"axios": "^0.19.0",
"color": "^3.1.2",
"history": "^4.10.1",
"jwt-decode": "^2.2.0",
"lodash": "^4.17.15",
"moment": "^2.24.0",
"prop-types": "^15.7.2",
"query-string": "^6.9.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-router-dom": "^5.1.2",
"react-textarea-autosize": "^7.1.2",
"styled-components": "^4.4.1",
"sweet-pubsub": "^1.1.2"
},
"lint-staged": {
"*.{js,jsx}": [
"eslint --fix",
"prettier --write",
"git add"
]
}
}

BIN
client/src/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

11
client/src/index.html Normal file
View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Jira Clone</title>
</head>
<body>
<div id="root"></div>
</body>
</html>

5
client/src/index.jsx Normal file
View File

@@ -0,0 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(<h1>YOOOOOOOOOO</h1>, document.getElementById('root'));

48
client/webpack.config.js Normal file
View File

@@ -0,0 +1,48 @@
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: 'development',
entry: path.join(__dirname, 'src/index.jsx'),
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dev'),
publicPath: '/',
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
{
test: /\.(jpe?g|png|gif|woff2?|eot|ttf|otf|svg)$/,
use: [
{
loader: 'url-loader',
options: { limit: 15000 },
},
],
},
],
},
resolve: {
modules: [path.join(__dirname, 'src'), 'node_modules'],
extensions: ['*', '.js', '.jsx'],
},
devtool: 'eval-source-map',
devServer: {
contentBase: path.join(__dirname, 'dev'),
historyApiFallback: true,
hot: true,
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'src/index.html'),
favicon: path.join(__dirname, 'src/favicon.png'),
}),
],
};

View File

@@ -0,0 +1,53 @@
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: 'production',
entry: {
main: path.join(__dirname, 'src/index.js'),
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name]-[hash].js',
publicPath: '/',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
{
test: /\.(jpe?g|png|gif|svg)$/,
use: [
{
loader: 'url-loader',
options: { name: '[name]-[hash].[ext]', limit: 15000 },
},
],
},
{
test: /\.(woff2?|eot|ttf|otf)$/,
use: [
{
loader: 'file-loader',
options: { name: '[name]-[hash].[ext]' },
},
],
},
],
},
resolve: {
modules: [path.join(__dirname, 'src'), 'node_modules'],
extensions: ['*', '.js', '.scss'],
},
plugins: [
new HtmlWebpackPlugin({
template: path.join(__dirname, 'src/index.html'),
favicon: path.join(__dirname, 'src/global/assets/favicon.png'),
}),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
],
};

7059
client/yarn.lock Normal file

File diff suppressed because it is too large Load Diff