Skip to content

Commit

Permalink
Merge pull request #87 from shut56/dev
Browse files Browse the repository at this point in the history
Updating packages
  • Loading branch information
ovasylenko authored Dec 21, 2021
2 parents 19ede5f + 45f6b0b commit 397ba80
Show file tree
Hide file tree
Showing 17 changed files with 2,721 additions and 2,912 deletions.
10 changes: 9 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"root": true,
"extends": [
"airbnb",
Expand Down Expand Up @@ -32,6 +32,14 @@
"ENABLE_SOCKETS": true
},
"rules": {
"react/no-unstable-nested-components": [
"warn",
{ "allowAsProps": true }
],
"react/function-component-definition": [2, {
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}],
"prettier/prettier": ["warn"],
"space-before-function-paren": "off",
"react/prefer-stateless-function": "warn",
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn run lint && yarn test
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn run lint && yarn test
Binary file added client/assets/images/logo-new-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/assets/images/logo-new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 3 additions & 6 deletions client/assets/scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* purgecss start ignore */
@tailwind base;
@tailwind components;
/* purgecss end ignore */

@tailwind utilities;
@tailwind base;
@tailwind components;
@tailwind utilities;
59 changes: 6 additions & 53 deletions client/components/dummy-view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,15 @@ import React from 'react'
import Head from './head'

const Dummy = () => (
<div>
<>
<Head title="Hello" />
<div className="h-100 w-full flex items-center justify-center bg-teal-lightest font-sans">
<div className="bg-white rounded shadow p-6 m-4 w-full lg:w-3/4 lg:max-w-lg">
<div className="mb-4">
<h1 className="text-grey-darkest">Todo List</h1>
<div className="flex mt-4">
<input
className="shadow appearance-none border rounded w-full py-2 px-3 mr-4 text-grey-darker"
placeholder="Add Todo"
/>
<button
type="button"
className="flex-no-shrink p-2 border-2 rounded text-teal border-teal hover:text-white hover:bg-teal"
>
Add
</button>
</div>
</div>
<div>
<div className="flex mb-4 items-center">
<p className="w-full text-grey-darkest">Add another component to Tailwind Components</p>
<button
type="button"
className="flex-no-shrink p-2 ml-4 mr-2 border-2 rounded hover:text-white text-green border-green hover:bg-green"
>
Done
</button>
<button
type="button"
className="flex-no-shrink p-2 ml-2 border-2 rounded text-red border-red hover:text-white hover:bg-red"
>
Remove
</button>
</div>
<div className="flex mb-4 items-center">
<p className="w-full line-through text-green">
Submit Todo App Component to Tailwind Components
</p>
<button
type="button"
className="flex-no-shrink p-2 ml-4 mr-2 border-2 rounded hover:text-white text-grey border-grey hover:bg-grey"
>
Not Done
</button>
<button
type="button"
className="flex-no-shrink p-2 ml-2 border-2 rounded text-red border-red hover:text-white hover:bg-red"
>
Remove
</button>
</div>
</div>
<div className="flex justify-center items-center h-screen">
<div className="flex flex-col justify-center bg-neutral-900 p-10 rounded-xl select-none">
<img alt="wave" src="images/logo-new-text.png" />
<span className="text-white text-right font-semibold">Boilerplate</span>
</div>
</div>
</div>
</>
)

Dummy.propTypes = {}
Expand Down
2 changes: 1 addition & 1 deletion client/components/home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Home = () => {

return (
<div>
<Head title="Hello" />
<Head title="Dashboard" />
<img alt="wave" src="images/wave.jpg" />
<button type="button" onClick={() => setCounterNew(counter + 1)}>
updateCounter
Expand Down
1 change: 1 addition & 0 deletions client/html.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line
const Html = ({ body }) => {
return `
<!DOCTYPE html>
Expand Down
2 changes: 1 addition & 1 deletion client/redux/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const composedEnhancers = composeFunc(applyMiddleware(...middleware), ...enhance
const store = createStore(rootReducer(history), initialState, composedEnhancers)
let socket

if (typeof ENABLE_SOCKETS !== 'undefined' && ENABLE_SOCKETS) {
if (typeof ENABLE_SOCKETS !== 'undefined' && ENABLE_SOCKETS === 'true') {
const initSocket = () => {
socket = new SockJS(`${isBrowser ? window.location.origin : 'http://localhost'}/ws`)

Expand Down
2 changes: 1 addition & 1 deletion client/redux/reducers/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const initialState = {
name: ''
}
}

/* eslint-disable default-param-last */
export default (state = initialState, action) => {
switch (action.type) {
default:
Expand Down
147 changes: 71 additions & 76 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"start:dev": "webpack serve --mode development --config ./webpack.development.config.js --open",
"start": "cross-env NODE_ENV=production && node start.js",
"clean": "rimraf dist",
"lint": "eslint ./client/**/*.js ./server/**/*.js ",
"prettier": "prettier './client/**/*.js' './client/**/*.jsx' './server/**/*.js' --write ",
"lint": "eslint './server/**/*.js' './client/**/*.js' './client/**/*.jsx'",
"prettier": "prettier './client/**/*.js' './client/**/*.jsx' './server/**/*.js' --write",
"lint:server": "eslint ./server/**/**.js",
"test": "jest",
"test:watch": "jest --watch",
Expand All @@ -25,7 +25,8 @@
"build": "yarn run build:prod && yarn run build:ssr",
"heroku-postbuild": "yarn run build:prod && yarn run build:ssr",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
"build-storybook": "build-storybook",
"prepare": "husky install"
},
"author": "",
"license": "MIT",
Expand All @@ -48,118 +49,112 @@
}
},
"dependencies": {
"@babel/cli": "^7.14.8",
"@babel/core": "^7.15.0",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-decorators": "^7.14.5",
"@babel/plugin-proposal-export-default-from": "^7.14.5",
"@babel/plugin-proposal-export-namespace-from": "^7.14.5",
"@babel/plugin-proposal-function-sent": "^7.14.5",
"@babel/plugin-proposal-json-strings": "^7.14.5",
"@babel/plugin-proposal-numeric-separator": "^7.14.5",
"@babel/plugin-proposal-throw-expressions": "^7.14.5",
"@babel/cli": "^7.16.0",
"@babel/core": "^7.16.5",
"@babel/eslint-parser": "^7.16.5",
"@babel/plugin-proposal-class-properties": "^7.16.5",
"@babel/plugin-proposal-decorators": "^7.16.5",
"@babel/plugin-proposal-export-default-from": "^7.16.5",
"@babel/plugin-proposal-export-namespace-from": "^7.16.5",
"@babel/plugin-proposal-function-sent": "^7.16.5",
"@babel/plugin-proposal-json-strings": "^7.16.5",
"@babel/plugin-proposal-numeric-separator": "^7.16.5",
"@babel/plugin-proposal-throw-expressions": "^7.16.5",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@babel/preset-flow": "^7.14.5",
"@babel/preset-react": "^7.14.5",
"@babel/plugin-transform-runtime": "^7.16.5",
"@babel/preset-env": "^7.16.5",
"@babel/preset-flow": "^7.16.5",
"@babel/preset-react": "^7.16.5",
"@babel/preset-stage-3": "^7.8.3",
"@babel/preset-typescript": "^7.15.0",
"@babel/register": "^7.14.5",
"@babel/runtime": "^7.14.8",
"@emotion/babel-plugin": "^11.3.0",
"@babel/preset-typescript": "^7.16.5",
"@babel/register": "^7.16.5",
"@babel/runtime": "^7.16.5",
"@emotion/babel-plugin": "^11.7.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.1.0",
"babel-jest": "^27.0.6",
"babel-loader": "^8.2.2",
"babel-jest": "^27.4.5",
"babel-loader": "^8.2.3",
"babel-plugin-css-modules-transform": "^1.6.2",
"babel-polyfill": "^6.26.0",
"classnames": "^2.3.1",
"colors": "^1.4.0",
"connected-react-router": "^6.9.1",
"cookie-parser": "^1.4.5",
"core-js": "^3.16.0",
"connected-react-router": "^6.9.2",
"cookie-parser": "^1.4.6",
"core-js": "^3.20.0",
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"express": "^4.17.2",
"history": "^4.10.1",
"prop-types": "^15.7.2",
"react": "17.0.1",
"react-dom": "17.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
"react-redux": "^7.2.4",
"react-refresh": "^0.10.0",
"react-router-dom": "^5.2.0",
"redux": "^4.1.1",
"react-redux": "^7.2.6",
"react-refresh": "^0.11.0",
"react-router-dom": "5.3.0",
"redux": "^4.1.2",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.3.0",
"sockjs": "^0.3.21",
"sockjs-client": "^1.5.1",
"redux-thunk": "^2.4.1",
"sockjs": "^0.3.24",
"sockjs-client": "^1.5.2",
"string-replace-webpack-plugin": "^0.1.3",
"uuid": "^8.3.2"
},
"devDependencies": {
"@hot-loader/react-dom": "^17.0.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
"autoprefixer": "^10.3.1",
"copy-webpack-plugin": "^9.0.1",
"css-loader": "6.2.0",
"css-minimizer-webpack-plugin": "^3.0.2",
"cssnano": "^5.0.7",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
"autoprefixer": "^10.4.0",
"copy-webpack-plugin": "^10.2.0",
"css-loader": "^6.5.1",
"css-minimizer-webpack-plugin": "^3.3.0",
"cssnano": "^5.0.14",
"emotion-theming": "^11.0.0",
"eslint": "^7.32.0",
"eslint-config-airbnb": "18.2.1",
"eslint": "^8.5.0",
"eslint-config-airbnb": "^19.0.2",
"eslint-config-prettier": "^8.3.0",
"eslint-loader": "4.0.2",
"eslint-plugin-import": "2.23.4",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-webpack-plugin": "^3.1.1",
"file-loader": "6.2.0",
"git-revision-webpack-plugin": "^5.0.0",
"glob": "^7.1.7",
"glob": "^7.2.0",
"hard-source-webpack-plugin": "^0.13.1",
"html-webpack-plugin": "5.3.2",
"husky": "7.0.1",
"image-webpack-loader": "^7.0.1",
"jest": "^27.0.6",
"jest-cli": "^27.0.6",
"mini-css-extract-plugin": "^2.2.0",
"node-hot-loader": "^1.21.4",
"husky": "^7.0.0",
"image-webpack-loader": "^8.0.1",
"jest": "^27.4.5",
"jest-cli": "^27.4.5",
"mini-css-extract-plugin": "^2.4.5",
"node-hot-loader": "^1.21.5",
"node-sass": "^6.0.1",
"nodemon": "^2.0.12",
"postcss": "^8.3.6",
"nodemon": "^2.0.15",
"postcss": "^8.4.5",
"postcss-import": "^14.0.2",
"postcss-loader": "^6.1.1",
"postcss-preset-env": "^6.7.0",
"prettier": "^2.3.2",
"postcss-loader": "^6.2.1",
"postcss-preset-env": "^7.0.2",
"prettier": "^2.5.1",
"raw-loader": "^4.0.2",
"regenerator-runtime": "^0.13.9",
"rimraf": "3.0.2",
"sass-loader": "12.1.0",
"style-loader": "3.2.1",
"tailwindcss": "^2.2.7",
"terser-webpack-plugin": "^5.1.4",
"sass-loader": "^12.4.0",
"style-loader": "^3.3.1",
"tailwindcss": "^3.0.7",
"terser-webpack-plugin": "^5.3.0",
"thread-loader": "^3.0.4",
"url-loader": "4.1.1",
"webpack": "^5.49.0",
"webpack-cli": "^4.7.2",
"webpack-dev-server": "^3.11.2",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "3.11.3",
"webpack-node-externals": "^3.0.0",
"webpack-shell-plugin": "^0.5.0"
},
"nodemonConfig": {
"ignore": [
"*.hot-update.json"
]
},
"husky": {
"hooks": {
"pre-commit": "cross-env yarn run lint && yarn test",
"pre-push": "cross-env yarn run lint && yarn test"
}
}
}
6 changes: 5 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
module.exports = {
purge: ['./client/**/*.html', './client/**/*.jsx', './client/**/*.js'],
content: [
'./client/**/*.html',
'./client/**/*.jsx',
'./client/**/*.js'
],
theme: {},
variants: {},
plugins: []
Expand Down
Loading

0 comments on commit 397ba80

Please sign in to comment.