Skip to content

Commit df5de4b

Browse files
committed
Add styled-components, even if it is broken
1 parent b69ebb0 commit df5de4b

File tree

6 files changed

+224
-5
lines changed

6 files changed

+224
-5
lines changed

.yarnclean

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@types/react-native

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"react-transition-group": "^4.1.0",
2525
"socket.io-client": "^2.2.0",
2626
"sockette": "^2.0.6",
27+
"styled-components": "^4.3.2",
2728
"use-react-router": "^1.0.7",
2829
"ws-wrapper": "^2.0.0",
2930
"xterm": "^3.14.4",
@@ -46,11 +47,14 @@
4647
"@types/react-redux": "^7.1.1",
4748
"@types/react-router-dom": "^4.3.3",
4849
"@types/react-transition-group": "^2.9.2",
50+
"@types/styled-components": "^4.1.18",
4951
"@types/webpack-env": "^1.13.6",
5052
"@types/yup": "^0.26.17",
5153
"@typescript-eslint/eslint-plugin": "^1.10.1",
5254
"@typescript-eslint/parser": "^1.10.1",
5355
"babel-loader": "^8.0.5",
56+
"babel-plugin-styled-components": "^1.10.6",
57+
"babel-plugin-tailwind-components": "^0.5.10",
5458
"css-loader": "^2.1.0",
5559
"cssnano": "^4.0.3",
5660
"eslint": "^5.16.0",

resources/scripts/.eslintrc.yml

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ plugins:
1111
extends:
1212
- "standard"
1313
- "plugin:@typescript-eslint/recommended"
14+
globals:
15+
tw: "readonly"
1416
rules:
1517
semi:
1618
- error

resources/scripts/gloabl.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare function tw(a: TemplateStringsArray | string): any;

webpack.config.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,15 @@ module.exports = {
7171
loader: 'babel-loader',
7272
options: {
7373
cacheDirectory: !isProduction,
74-
presets: ['@babel/preset-env', '@babel/preset-react'],
75-
plugins: ['react-hot-loader/babel', '@babel/plugin-syntax-dynamic-import'],
74+
presets: ['@babel/env', '@babel/react'],
75+
plugins: [
76+
'react-hot-loader/babel',
77+
'@babel/plugin-syntax-dynamic-import',
78+
['styled-components', {
79+
displayName: true,
80+
}],
81+
'tailwind-components',
82+
],
7683
},
7784
},
7885
{

0 commit comments

Comments
 (0)