Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated dependencies #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn.lock*
package-lock.json
_package-lock.json
/build/bundle.js
/build/index.html
/build*
Expand Down
9 changes: 6 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"name": "reactNativeCodeResue",
"slug": "codeResue",
"privacy": "public",
"sdkVersion": "30.0.0",
"platforms": [
"ios",
"android"
Expand All @@ -23,8 +22,12 @@
"**/*"
],
"ios": {
"supportsTablet": true
"supportsTablet": true,
"bundleIdentifier": "com.mmwebx.codeResue"
},
"android": {
"package": "com.mmwebx.codeResue"
}
},
"name": "reactNativeCodeResue"
}
}
6 changes: 3 additions & 3 deletions app/components/mainContent/mainBodyComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { connect } from "react-redux";
import { StyleSheet, Text, View } from 'react-native';
import { ThanosCaptionConatiner } from '../../../platform/thanosCaption/thanosCaptionConatinerComponent.js';
import { ThanosCaptionContainer } from '../../../platform/thanosCaption/thanosCaptionConatinerComponent.js';
import HitButtonContainer from "../../../platform/thanosHitButton/hitButtonContainerComponent.js";

const styles = StyleSheet.create({
Expand Down Expand Up @@ -34,7 +34,7 @@ class MainComponent extends React.Component {
render() {
return(
<View>
<ThanosCaptionConatiner></ThanosCaptionConatiner>
<ThanosCaptionContainer></ThanosCaptionContainer>
<View style={styles.hitButtonWrapper}>
<Text style={styles.articleTitle}>Then what are you waiting for? Go ahead and hit him</Text>
<HitButtonContainer></HitButtonContainer>
Expand All @@ -57,4 +57,4 @@ const mapDispatchToProps = (dispatch) => {
}
}};

export default connect(mapStateToProps,mapDispatchToProps)(MainComponent);
export default connect(mapStateToProps,mapDispatchToProps)(MainComponent);
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
164 changes: 82 additions & 82 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Resuing code for react and react native",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "cross-env NODE_ENV=development webpack-dev-server --open",
"start": "cross-env NODE_ENV=development webpack serve --mode development --env development",
"build": "cross-env NODE_ENV=production webpack",
"format": "prettier --write 'packages/**/*.js'",
"test": "jest --watchAll --coverage",
Expand Down Expand Up @@ -46,92 +46,92 @@
"license": "ISC",
"private": false,
"engines": {
"node": ">=8",
"npm": ">=3"
"node": ">=12",
"npm": ">=6"
},
"dependencies": {
"@babel/plugin-transform-react-constant-elements": "7.2.0",
"@babel/plugin-transform-react-inline-elements": "7.2.0",
"babel-plugin-transform-react-pure-class-to-function": "1.0.1",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"lodash": "4.17.11",
"prop-types": "15.7.2",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-hot-loader": "4.8.4",
"react-native": "^0.55.4",
"react-redux": "^5.1.0",
"redux": "^4.0.1"
"@babel/plugin-transform-react-constant-elements": "^7.12.1",
"@babel/plugin-transform-react-inline-elements": "^7.12.1",
"babel-plugin-transform-react-pure-class-to-function": "^1.0.1",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"lodash": "^4.17.20",
"prop-types": "^15.7.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-hot-loader": "^4.13.0",
"react-native": "0.63.3",
"react-redux": "^7.2.2",
"redux": "^4.0.5",
"expo": "^39.0.0"
},
"resolutions": {
"babel-core": "7.0.0-bridge.0"
"babel-core": "^7.0.0-bridge.0"
},
"devDependencies": {
"@babel/core": "7.4.3",
"@babel/plugin-proposal-class-properties": "7.4.0",
"@babel/plugin-proposal-decorators": "7.4.0",
"@babel/plugin-proposal-export-namespace-from": "7.2.0",
"@babel/plugin-proposal-function-sent": "7.2.0",
"@babel/plugin-proposal-json-strings": "7.2.0",
"@babel/plugin-proposal-numeric-separator": "7.2.0",
"@babel/plugin-proposal-throw-expressions": "7.2.0",
"@babel/plugin-syntax-dynamic-import": "7.2.0",
"@babel/plugin-syntax-import-meta": "7.2.0",
"@babel/plugin-transform-runtime": "7.4.3",
"@babel/polyfill": "7.4.3",
"@babel/preset-env": "7.4.3",
"@babel/preset-react": "7.0.0",
"@babel/register": "7.4.0",
"@babel/runtime": "7.4.3",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "24.7.1",
"babel-loader": "8.0.5",
"babel-plugin-lodash": "3.3.4",
"babel-preset-expo": "^5.0.0",
"babel-preset-react-optimize": "1.0.1",
"browserslist": "4.5.5",
"clean-webpack-plugin": "2.0.1",
"connect-history-api-fallback": "1.6.0",
"cross-env": "5.2.0",
"css-loader": "2.1.1",
"enzyme": "3.9.0",
"enzyme-adapter-react-16": "1.12.1",
"eslint": "5.16.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-prettier": "4.1.0",
"eslint-loader": "2.1.2",
"eslint-plugin-import": "2.17.2",
"eslint-plugin-jest": "22.4.1",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-react": "7.12.4",
"eslint-watch": "5.0.1",
"expo": "^32.0.0",
"file-loader": "3.0.1",
"html-webpack-plugin": "3.2.0",
"husky": "1.3.1",
"identity-obj-proxy": "3.0.0",
"jest": "24.7.1",
"jest-css-modules-transform": "2.1.1",
"jest-enzyme": "7.0.2",
"jest-fetch-mock": "2.1.2",
"jsdom": "14.1.0",
"koa-connect": "2.0.1",
"lint-staged": "8.1.5",
"mini-css-extract-plugin": "0.6.0",
"node-sass": "4.11.0",
"npm-check-updates": "3.1.8",
"optimize-css-assets-webpack-plugin": "5.0.1",
"prettier": "1.17.0",
"pretty-quick": "1.10.0",
"sass-loader": "7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"style-loader": "0.23.1",
"terser-webpack-plugin": "1.2.3",
"webpack": "4.30.0",
"webpack-cli": "3.3.0",
"webpack-dev-server": "3.3.1",
"webpack-merge": "4.2.1"
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.12.1",
"@babel/plugin-proposal-export-namespace-from": "^7.12.1",
"@babel/plugin-proposal-function-sent": "^7.12.1",
"@babel/plugin-proposal-json-strings": "^7.12.1",
"@babel/plugin-proposal-numeric-separator": "^7.12.1",
"@babel/plugin-proposal-throw-expressions": "^7.12.1",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.1",
"@babel/register": "^7.12.1",
"@babel/runtime": "^7.12.1",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.1",
"babel-loader": "^8.1.0",
"babel-plugin-lodash": "^3.3.4",
"babel-preset-expo": "^8.3.0",
"babel-preset-react-optimize": "^1.0.1",
"browserslist": "^4.14.5",
"clean-webpack-plugin": "^3.0.0",
"connect-history-api-fallback": "^1.6.0",
"cross-env": "^7.0.2",
"css-loader": "^5.0.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"eslint": "^7.12.1",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"eslint-watch": "^7.0.0",
"eslint-webpack-plugin": "^2.1.0",
"expo": "39.0.3",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^4.5.0",
"husky": "^4.3.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.1",
"jest-css-modules-transform": "^4.0.1",
"jest-enzyme": "^7.1.2",
"jest-fetch-mock": "^3.0.3",
"jsdom": "^16.4.0",
"koa-connect": "^2.1.0",
"lint-staged": "^10.5.0",
"mini-css-extract-plugin": "^1.2.1",
"node-sass": "^4.14.1",
"npm-check-updates": "^9.2.3",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"prettier": "^2.1.2",
"pretty-quick": "^3.1.0",
"sass-loader": "^10.0.4",
"script-ext-html-webpack-plugin": "^2.1.5",
"style-loader": "^2.0.0",
"terser-webpack-plugin": "^5.0.3",
"webpack": "^5.3.0",
"webpack-cli": "^4.1.0",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^5.2.0"
}
}
4 changes: 2 additions & 2 deletions platform/thanosCaption/thanosCaptionConatinerComponent.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { ThanosCaptionView } from './thanosCaptionView';

export const ThanosCaptionConatiner = () => {
export const ThanosCaptionContainer = () => {
const data = "Does this guy irritates you?"
return(
<ThanosCaptionView data={data}></ThanosCaptionView>
)
}
}
6 changes: 3 additions & 3 deletions web/components/mainContent/mainBodyComponent.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { connect } from "react-redux";
import { ThanosCaptionConatiner } from '../../../platform/thanosCaption/thanosCaptionConatinerComponent';
import { ThanosCaptionContainer } from '../../../platform/thanosCaption/thanosCaptionConatinerComponent';
import HitButtonContainer from "../../../platform/thanosHitButton/hitButtonContainerComponent";
import "./mainComponent.css"

Expand All @@ -12,7 +12,7 @@ class MainComponent extends React.Component {
render() {
return(
<section className="main-section">
<ThanosCaptionConatiner></ThanosCaptionConatiner>
<ThanosCaptionContainer></ThanosCaptionContainer>
<article className="hit-button-wrapper">
<p className="article-title">Then what are you waiting for? Go ahead and hit him</p>
<HitButtonContainer></HitButtonContainer>
Expand All @@ -28,4 +28,4 @@ const mapStateToProps = function(state){
count: state.hitButtonReducer.count
}};

export default connect(mapStateToProps,{})(MainComponent);
export default connect(mapStateToProps,{})(MainComponent);
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const webpackMerge = require('webpack-merge');
const { merge } = require('webpack-merge');
const common = require('./webpack/webpack.common');

const envs = {
Expand All @@ -8,4 +8,4 @@ const envs = {
/* eslint-disable global-require,import/no-dynamic-require */
const env = envs[process.env.NODE_ENV || 'development'];
const envConfig = require(`./webpack/webpack.${env}.js`);
module.exports = webpackMerge(common, envConfig);
module.exports = merge(common, envConfig);
20 changes: 10 additions & 10 deletions webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ module.exports = {
},
],
},
serve: {
add: app => {
app.use(convert(history()));
},
content: commonPaths.entryPath,
dev: {
publicPath: commonPaths.outputPath,
},
open: true,
},
// serve: {
// add: app => {
// app.use(convert(history()));
// },
// content: commonPaths.entryPath,
// dev: {
// publicPath: commonPaths.outputPath,
// },
// open: true,
// },
resolve: {
modules: ['src', 'node_modules'],
extensions: ['*', '.js', '.jsx', '.css', '.scss'],
Expand Down
39 changes: 19 additions & 20 deletions webpack/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");

const commonPaths = require('./paths');
const commonPaths = require("./paths");

const isDevelopment = process.env.NODE_ENV !== "production";

module.exports = {
mode: 'production',
mode: "production",
output: {
filename: `${commonPaths.jsFolder}/[name].[hash].js`,
path: commonPaths.outputPath,
Expand All @@ -18,9 +20,6 @@ module.exports = {
// Use multi-process parallel running to improve the build speed
// Default number of concurrent runs: os.cpus().length - 1
parallel: true,
// Enable file caching
cache: true,
sourceMap: true,
}),
new OptimizeCSSAssetsPlugin(),
],
Expand All @@ -31,13 +30,13 @@ module.exports = {
cacheGroups: {
vendors: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'initial',
name: "vendors",
chunks: "initial",
},
async: {
test: /[\\/]node_modules[\\/]/,
name: 'async',
chunks: 'async',
name: "async",
chunks: "async",
minChunks: 4,
},
},
Expand All @@ -54,15 +53,15 @@ module.exports = {
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
loader: "css-loader",
options: {
sourceMap: false,
modules: true,
camelCase: true,
localIdentName: '[local]___[hash:base64:5]',
modules: {
localIdentName: "[name]__[local]___[hash:base64:5]",
},
sourceMap: isDevelopment,
},
},
'sass-loader',
"sass-loader",
],
},
],
Expand All @@ -74,5 +73,5 @@ module.exports = {
chunkFilename: `${commonPaths.cssFolder}/[name].css`,
}),
],
devtool: 'source-map',
devtool: "source-map",
};