Skip to content

Commit 3ca1d69

Browse files
authored
v.1.0.0
First stage. Git file upload.
0 parents  commit 3ca1d69

14 files changed

+18092
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Suspense/Lazy/Redux App
2+
3+
4+
# 0.0.1
5+
* App has created.

globals.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
global.__TEST__ = process.env.NODE_ENV === 'test';
2+
global.__DEV__ = process.env.NODE_ENV === 'development';
3+
global.__PROD__ = process.env.NODE_ENV === 'production';
4+
global.__NODE_ENV__ = process.env.NODE_ENV;
5+
global.__PORT__ = process.env.PORT;

jest.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
cacheDirectory: '<rootDir>/.tmp/jest',
3+
coverageDirectory: './.tmp/coverage',
4+
moduleNameMapper: {
5+
'^.+\\.(scss)$': 'identity-obj-proxy'
6+
},
7+
modulePaths: ['<rootDir>'],
8+
moduleFileExtensions: ['js', 'jsx', 'json'],
9+
globals: {
10+
NODE_ENV: 'test'
11+
},
12+
verbose: true,
13+
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$',
14+
testPathIgnorePatterns: ['/node_modules/', '/__tests__/mocks/.*'],
15+
transformIgnorePatterns: ['.*(node_modules)(?!.*torn.*).*$'],
16+
transform: {
17+
'^.+\\.js$': 'babel-jest'
18+
},
19+
setupFiles: ['<rootDir>/setupTests.js'],
20+
snapshotSerializers: ['enzyme-to-json/serializer']
21+
}
22+

lerna.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"lerna": "2.11.0",
3+
"npmClient": "yarn",
4+
"useWorkspaces": false,
5+
"hoist": true
6+
}

package.json

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
{
2+
"name": "webpack4react17StarterKit",
3+
"version": "1.0.0",
4+
"description": "test stend to show how easy we can make code-splitting by in-box features in React 16.7 - Suspense and lazy.",
5+
"main": "index.js",
6+
"author": "Sviat Kuzhelev",
7+
"license": "MIT",
8+
"husky": {
9+
"hooks": {
10+
"pre-commit": "lint-staged"
11+
}
12+
},
13+
"lint-staged": {
14+
"*.json": [
15+
"jsonlint --formatter=verbose",
16+
"git add"
17+
],
18+
"*.scss": [
19+
"stylelint --fix --syntax scss --formatter=verbose",
20+
"git add"
21+
],
22+
"*.@(js|jsx)": [
23+
"prettier --config prettier.config.js",
24+
"eslint --quiet",
25+
"git add",
26+
"jest --bail --findRelatedTests"
27+
]
28+
},
29+
"scripts": {
30+
"start:dev": "better-npm-run start:dev",
31+
"start:prod": "better-npm-run start:prod",
32+
"test": "better-npm-run test",
33+
"clean": "rimraf dist",
34+
"push": "npm run lint && git push",
35+
"compile": "better-npm-run compile",
36+
"lint": "prettier --single-quote --no-semi --print-width 120 --write '{src,tests}/**/*.js'",
37+
"eslint": "eslint --quiet ../../.eslintrc",
38+
"csslint": "stylelint **/*.scss --config ../../.stylelintrc"
39+
},
40+
"betterScripts": {
41+
"compile": {
42+
"command": "node server/compiler",
43+
"env": {
44+
"NODE_ENV": "production",
45+
"DEBUG": "app:*"
46+
}
47+
},
48+
"start:dev": {
49+
"command": "node server/server",
50+
"env": {
51+
"NODE_ENV": "development",
52+
"DEBUG": "app:*"
53+
}
54+
},
55+
"start:prod": {
56+
"command": "node server/server",
57+
"env": {
58+
"NODE_ENV": "production",
59+
"DEBUG": "app:*"
60+
}
61+
},
62+
"test": {
63+
"command": "node server/server",
64+
"env": {
65+
"NODE_ENV": "test",
66+
"DEBUG": "app:*"
67+
}
68+
}
69+
},
70+
"repository": {
71+
"type": "git"
72+
},
73+
"devDependencies": {
74+
"@types/classnames": "^2.2.6",
75+
"@types/enzyme": "^3.1.14",
76+
"@types/enzyme-adapter-react-16": "^1.0.3",
77+
"@types/jest": "^23.3.9",
78+
"@types/lodash": "^4.14.117",
79+
"@types/node": "^10.12.1",
80+
"@types/prop-types": "^15.5.6",
81+
"@types/react-dom": "^16.0.9",
82+
"@types/react-redux": "^6.0.9",
83+
"@types/webpack": "^4.4.17",
84+
"@types/webpack-dev-middleware": "^2.0.2",
85+
"@types/webpack-env": "^1.13.6",
86+
"@types/webpack-hot-middleware": "^2.16.4",
87+
"autoprefixer": "^9.3.1",
88+
"babel-eslint": "^10.0.1",
89+
"better-npm-run": "^0.1.1",
90+
"classnames": "^2.2.6",
91+
"css-loader": "^1.0.1",
92+
"cssnano": "^4.1.7",
93+
"eslint": "^5.8.0",
94+
"eslint-config-airbnb": "^17.1.0",
95+
"eslint-plugin-babel": "^5.0.0",
96+
"eslint-plugin-import": "^2.11.0",
97+
"eslint-plugin-jest": "^21.22.0",
98+
"eslint-plugin-jsx-a11y": "^6.1.1",
99+
"eslint-plugin-promise": "^3.4.0",
100+
"eslint-plugin-react": "^7.11.1",
101+
"eslint-plugin-react-hooks": "^0.0.0",
102+
"husky": "^1.1.2",
103+
"lerna": "^2.11.0",
104+
"lint-staged": "^8.0.3",
105+
"node-sass": "^4.9.4",
106+
"postcss-cssnext": "^3.1.0",
107+
"postcss-import": "^12.0.1",
108+
"postcss-loader": "^3.0.0",
109+
"postcss-preset-env": "^6.3.0",
110+
"postcss-scss": "^2.0.0",
111+
"precss": "^3.1.2",
112+
"redbox-react": "^1.6.0",
113+
"sass-loader": "^7.1.0",
114+
"style-loader": "^0.23.1",
115+
"stylelint": "^9.4.0",
116+
"stylelint-config-sass-guidelines": "^5.2.0",
117+
"stylelint-config-standard": "^18.2.0",
118+
"stylelint-no-unsupported-browser-features": "^3.0.1",
119+
"stylelint-order": "^1.0.0",
120+
"stylelint-scss": "^3.3.0",
121+
"url-loader": "^1.1.2",
122+
"webpack-bundle-analyzer": "^3.0.3"
123+
},
124+
"dependencies": {
125+
"@babel/preset-env": "^7.1.0",
126+
"@babel/preset-react": "^7.0.0",
127+
"@babel/preset-stage-3": "^7.0.0",
128+
"@babel/preset-typescript": "^7.1.0",
129+
"babel": "^6.23.0",
130+
"babel-loader": "^8.0.4",
131+
"browser-sync": "^2.26.3",
132+
"browser-sync-webpack-plugin": "^2.2.2",
133+
"clean-webpack-plugin": "^0.1.19",
134+
"debug": "^4.1.0",
135+
"express": "^4.16.4",
136+
"html-loader": "^0.5.5",
137+
"html-webpack-plugin": "^3.2.0",
138+
"mini-css-extract-plugin": "^0.4.1",
139+
"normalizr": "^3.2.4",
140+
"optimize-css-assets-webpack-plugin": "^5.0.1",
141+
"path": "^0.12.7",
142+
"prop-types": "^15.6.0",
143+
"react": "^16.7.0-alpha.0",
144+
"react-dom": "^16.7.0-alpha.0",
145+
"react-redux": "^5.1.0",
146+
"redux": "^4.0.1",
147+
"uglifyjs-webpack-plugin": "^1.2.7",
148+
"webpack": "^4.23.1",
149+
"webpack-cli": "^3.1.2",
150+
"webpack-dev-middleware": "^3.4.0",
151+
"webpack-dev-server": "^3.1.10",
152+
"webpack-hot-middleware": "^2.24.3"
153+
}
154+
}

postcss.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
plugins: {
3+
'postcss-import': {},
4+
'postcss-cssnext': {},
5+
'postcss-preset-env': {},
6+
'cssnano': {}
7+
}
8+
};

prettier.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
useTabs: false,
3+
printWidth: 120,
4+
tabWidth: 2,
5+
singleQuote: true,
6+
trailingComma: 'none',
7+
jsxBracketSameLine: false,
8+
semi: false,
9+
write: true
10+
}

setupTests.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// TODO: Remove these polyfills once the below issue is sorted
2+
// https://github.com/facebookincubator/create-react-app/issues/3199#issuecomment-332842582
3+
global.requestAnimationFrame = cb => {
4+
setTimeout(cb, 0);
5+
};
6+
7+
global.matchMedia = window.matchMedia || function() {
8+
return {
9+
matches: false,
10+
addListener: () => {},
11+
removeListener: () => {}
12+
};
13+
};
14+
15+
import Enzyme from 'enzyme';
16+
import Adapter from 'enzyme-adapter-react-16';
17+
18+
Enzyme.configure({ adapter: new Adapter() });

tsconfig.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"compilerOptions": {
3+
"noUnusedLocals": true,
4+
"noUnusedParameters": true,
5+
"allowSyntheticDefaultImports": true,
6+
"esModuleInterop": true,
7+
"allowJs": true,
8+
"checkJs": false,
9+
"module": "esnext",
10+
"target": "es5",
11+
"jsx": "react",
12+
"moduleResolution": "node",
13+
"lib": ["es6", "dom"]
14+
},
15+
"typeAcquisition": {
16+
"enable": true
17+
},
18+
"typeRoots": [
19+
"./typings.d.ts",
20+
"./node_modules/@types"
21+
],
22+
"include": [
23+
".src/.ts",
24+
"src/**/*",
25+
"./typings.d.ts"
26+
],
27+
"exclude": [
28+
"node_modules",
29+
"**/*.test.ts",
30+
"server",
31+
"dist"
32+
]
33+
}

0 commit comments

Comments
 (0)