Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasin UYSAL committed May 27, 2020
0 parents commit 305d015
Show file tree
Hide file tree
Showing 51 changed files with 9,422 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Dependencies
node_modules/

# Compiled output
build

# Runtime data
database.sqlite

# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editors and IDEs
.idea
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# Misc
.DS_Store

src/universal/components/**/*.css
#src/universal/assets.json
src/universal/loadable-stats.json
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Isomorphic React

## Paketleri yüklemek için
```
npm install
```

## Geliştirme yapmak için
```
npm run start
```

## Production için
```
npm run serve
```
49 changes: 49 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
module.exports = function (api) {
const env = api.env();

const basePlugins = [
'@babel/syntax-dynamic-import',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-runtime',
'@loadable/babel-plugin',
];

const basePresets = [];

let presets = [...basePresets];
let plugins = [...basePlugins];

if (env === 'production') {
plugins.push([
'transform-react-remove-prop-types',
{
'mode': 'remove',
'removeImport': true,
'additionalLibraries': [
'react-immutable-proptypes'
]
}
])
} else {
plugins.push('react-hot-loader/babel');
}

presets.push(
[
'@babel/preset-env',
{
'useBuiltIns': 'entry',
'modules': false,
}
]
);

presets.push(
'@babel/preset-react',
);

return {
presets,
plugins,
};
};
19 changes: 19 additions & 0 deletions babel.server.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = function () {
const basePlugins = [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-runtime'
];

const basePresets = [
'@babel/preset-react',
];

let presets = [...basePresets];
let plugins = [...basePlugins];


return {
presets,
plugins,
};
};
90 changes: 90 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"name": "react-isomorphic",
"version": "1.0.0",
"private": true,
"engines": {
"node": ">= 10.15.0 < 11",
"npm": ">=6.4"
},
"resolutions": {
"styled-components": "4.3.2"
},
"dependencies": {
"@babel/polyfill": "7.0.0",
"@loadable/component": "^5.12.0",
"@loadable/server": "^5.12.0",
"async": "3.1.0",
"axios": "0.19.0",
"body-parser": "1.18.3",
"classnames": "2.2.6",
"clean-webpack-plugin": "1.0.0",
"compose-middleware": "5.0.0",
"compression": "1.7.3",
"express": "4.16.4",
"history": "4.7.2",
"immutable": "4.0.0-rc.12",
"js-cookie": "2.2.0",
"jwt-decode": "2.2.0",
"lodash": "4.17.15",
"path-to-regexp": "1.7.0",
"prom-client": "11.1.1",
"prop-types": "15.6.2",
"query-string": "5.1.1",
"react": "16.12.0",
"react-dom": "16.12.0",
"react-helmet": "5.2.0",
"react-hot-loader": "4.8",
"react-router": "5.1.2",
"react-router-dom": "5.1.2",
"serialize-javascript": "1.5.0",
"uuid": "3.3.2",
"webpack-cli": "3.1.0"
},
"devDependencies": {
"@babel/core": "7.2.0",
"@babel/plugin-proposal-class-properties": "7.2.1",
"@babel/plugin-syntax-dynamic-import": "7.2.0",
"@babel/plugin-transform-runtime": "7.2.0",
"@babel/preset-env": "7.2.0",
"@babel/preset-react": "7.0.0",
"@babel/runtime": "7.2.0",
"@loadable/babel-plugin": "^5.12.0",
"@loadable/webpack-plugin": "^5.12.0",
"@types/express": "4.0.39",
"assets-webpack-plugin": "3.8.4",
"autoprefixer": "9.3.1",
"babel-core": "7.0.0-bridge.0",
"babel-loader": "8.0.4",
"babel-plugin-transform-react-remove-prop-types": "0.4.21",
"copy-webpack-plugin": "4.5.2",
"css-loader": "1.0.1",
"file-loader": "1.1.11",
"get-port": "4.0.0",
"identity-obj-proxy": "3.0.0",
"mini-css-extract-plugin": "0.4.4",
"node-sass": "4.11.0",
"optimize-css-assets-webpack-plugin": "5.0.1",
"pixrem": "4.0.1",
"pleeease-filters": "4.0.0",
"postcss": "7.0.5",
"postcss-loader": "3.0.0",
"rimraf": "2.6.2",
"sass-loader": "7.1.0",
"style-loader": "0.23.1",
"uglifyjs-webpack-plugin": "2.0.1",
"url-loader": "1.0.1",
"webpack": "4.25.1",
"webpack-dev-middleware": "3.4.0",
"webpack-hot-middleware": "2.24.3",
"webpack-hot-server-middleware": "0.5.0",
"webpack-merge": "4.1.3",
"webpack-node-externals": "1.7.2"
},
"scripts": {
"bundle": "node src/tools/run bundle --publish",
"bundle:client": "webpack-cli --config webpack.client.config.js --colors --bail",
"bundle:server": "webpack-cli --config webpack.server.config.js --colors --bail",
"serve": "yarn run bundle && node --max-http-header-size=20480 build/server/server.js",
"start": "node --inspect src/tools/run start "
}
}
13 changes: 13 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const autoprefixer = require('autoprefixer');
const postCssFilters = require('pleeease-filters');
const postCssPixrem = require('pixrem');

module.exports = {
plugins() {
return [
postCssPixrem(),
postCssFilters(),
autoprefixer
];
}
};
4 changes: 4 additions & 0 deletions src/assets/styles/application.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@import '/import.scss';
@import '/normalize.scss';
@import './grid.scss';
@import './global.scss';
13 changes: 13 additions & 0 deletions src/assets/styles/global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
body {
background: #FFF;
font-family: Arial, sans-serif;
font-size: 14px;
font-weight: 500;
color: #333333;
word-wrap: break-word;
overflow-x: hidden;
}

img {
max-width: 100%
}
125 changes: 125 additions & 0 deletions src/assets/styles/grid.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
:global {
.container {
width: $container-width;
max-width: 100%;
margin-right: auto;
margin-left: auto;
}

.containerFullWidth {
width: 100%;
}

.row {
display: flex;
flex-wrap: wrap;
flex-direction: row;
}

[class*=col-] {

}

.col {
width: 100%;
}

.col-12 {
width: 100%;
}

.col-11 {
width: 91.666667%;
}

.col-10 {
width: 83.333333%;
}

.col-9 {
width: 75%;
}

.col-8 {
width: 66.666667%;
}

.col-7 {
width: 58.333333%;
}

.col-6 {
width: 50%;
}

.col-5 {
width: 41.666667%;
}

.col-4 {
width: 33.333333%;
}

.col-3 {
width: 25%;
}

.col-2 {
width: 16.666667%;
}

.col-1 {
width: 8.333333%;
}


@media screen and (max-width: 640px) {
.col-xs-12 {
width: 100%;
}

.col-xs-11 {
width: 91.666667%;
}

.col-xs-10 {
width: 83.333333%;
}

.col-xs-9 {
width: 75%;
}

.col-xs-8 {
width: 66.666667%;
}

.col-xs-7 {
width: 58.333333%;
}

.col-xs-6 {
width: 50%;
}

.col-xs-5 {
width: 41.666667%;
}

.col-xs-4 {
width: 33.333333%;
}

.col-xs-3 {
width: 25%;
}

.col-xs-2 {
width: 16.666667%;
}

.col-xs-1 {
width: 8.333333%;
}
}
}
2 changes: 2 additions & 0 deletions src/assets/styles/import.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import './variable.scss';
@import './mixin.scss';
9 changes: 9 additions & 0 deletions src/assets/styles/mixin.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@mixin multiline-elipsis ($line) {
display: -webkit-box;
-webkit-line-clamp: $line;
line-clamp: $line;
-moz-line-clamp: $line;
box-orient: vertical;
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
}
Loading

0 comments on commit 305d015

Please sign in to comment.