Skip to content

Commit 22687bd

Browse files
committed
Stop caching stupid things and causing builds to die
1 parent c75f898 commit 22687bd

File tree

8 files changed

+91
-113
lines changed

8 files changed

+91
-113
lines changed

.babel-plugin-macrosrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module.exports = {
22
twin: {
33
preset: 'styled-components',
44
autoCssProp: true,
5-
config: './tailwind.config.js',
65
},
76
styledComponents: {
87
pure: true,

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"react-transition-group": "^4.4.1",
3636
"reaptcha": "^1.7.2",
3737
"sockette": "^2.0.6",
38-
"styled-components": "^5.1.1",
38+
"styled-components": "^5.2.1",
3939
"styled-components-breakpoint": "^3.0.0-preview.20",
4040
"swr": "^0.2.3",
4141
"tailwindcss": "^2.0.2",
@@ -75,14 +75,15 @@
7575
"@types/react-router": "^5.1.3",
7676
"@types/react-router-dom": "^5.1.3",
7777
"@types/react-transition-group": "^4.4.0",
78-
"@types/styled-components": "^5.1.0",
78+
"@types/styled-components": "^5.1.7",
7979
"@types/uuid": "^3.4.5",
8080
"@types/webpack-env": "^1.15.2",
8181
"@types/yup": "^0.29.3",
8282
"@typescript-eslint/eslint-plugin": "^3.5.0",
8383
"@typescript-eslint/parser": "^3.5.0",
84+
"autoprefixer": "^10.1.0",
8485
"babel-loader": "^8.0.6",
85-
"babel-plugin-styled-components": "^1.10.7",
86+
"babel-plugin-styled-components": "^1.12.0",
8687
"cross-env": "^7.0.2",
8788
"css-loader": "^3.2.1",
8889
"eslint": "^7.4.0",
@@ -94,6 +95,7 @@
9495
"eslint-plugin-react-hooks": "^4.0.5",
9596
"eslint-plugin-standard": "^4.0.1",
9697
"fork-ts-checker-webpack-plugin": "^5.0.6",
98+
"postcss": "^8.2.1",
9799
"redux-devtools-extension": "^2.13.8",
98100
"source-map-loader": "^1.0.1",
99101
"style-loader": "^1.2.1",
@@ -115,7 +117,7 @@
115117
"watch": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --watch --progress",
116118
"build": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --progress",
117119
"build:production": "yarn run clean && cross-env NODE_ENV=production ./node_modules/.bin/webpack --mode production",
118-
"serve": "yarn run clean && cross-env PUBLIC_PATH=https://pterodactyl.test:8080 NODE_ENV=development TSC_WATCHFILE=UseFsEventsWithFallbackDynamicPolling webpack-dev-server --host 0.0.0.0 --hot --https --key /etc/ssl/private/pterodactyl.test-key.pem --cert /etc/ssl/private/pterodactyl.test.pem"
120+
"serve": "yarn run clean && cross-env PUBLIC_PATH=https://pterodactyl.test:8080 NODE_ENV=development webpack-dev-server --host 0.0.0.0 --hot --https --key /etc/ssl/private/pterodactyl.test-key.pem --cert /etc/ssl/private/pterodactyl.test.pem"
119121
},
120122
"browserslist": [
121123
"> 0.5%",

resources/scripts/components/NavigationBar.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ import { faCogs, faLayerGroup, faSignOutAlt, faUserCircle } from '@fortawesome/f
55
import { useStoreState } from 'easy-peasy';
66
import { ApplicationStore } from '@/state';
77
import SearchContainer from '@/components/dashboard/search/SearchContainer';
8-
import tw from 'twin.macro';
8+
import tw, { theme } from 'twin.macro';
99
import styled from 'styled-components/macro';
10-
// @ts-ignore
11-
import * as config from '@/../../tailwind.config.js';
1210

1311
const Navigation = styled.div`
1412
${tw`w-full bg-neutral-900 shadow-md overflow-x-auto`};
@@ -37,7 +35,7 @@ const RightNavigation = styled.div`
3735
}
3836
3937
&:active, &:hover, &.active {
40-
box-shadow: inset 0 -2px ${config.theme.colors.cyan['700']};
38+
box-shadow: inset 0 -2px ${theme`colors.cyan.700`.toString()};
4139
}
4240
}
4341
`;

resources/scripts/components/elements/DropdownMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class DropdownMenu extends React.PureComponent<Props, State> {
9494
e.stopPropagation();
9595
this.setState({ visible: false });
9696
}}
97-
css={tw`absolute bg-white p-2 rounded border border-neutral-700 shadow-lg text-neutral-500 min-w-48 z-50`}
97+
css={tw`absolute bg-white p-2 rounded border border-neutral-700 shadow-lg text-neutral-500 z-50`}
9898
>
9999
{this.props.children}
100100
</div>

resources/scripts/components/elements/SubNavigation.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import styled from 'styled-components/macro';
2-
import tw from 'twin.macro';
3-
// @ts-ignore
4-
import config from '../../../../tailwind.config';
2+
import tw, { theme } from 'twin.macro';
53

64
const SubNavigation = styled.div`
75
${tw`w-full bg-neutral-700 shadow overflow-x-auto`};
@@ -23,7 +21,7 @@ const SubNavigation = styled.div`
2321
2422
&:active, &.active {
2523
${tw`text-neutral-100`};
26-
box-shadow: inset 0 -2px ${config.theme.colors.cyan['500']};
24+
box-shadow: inset 0 -2px ${theme`colors.cyan.700`.toString()};
2725
}
2826
}
2927
}

tailwind.config.js

Lines changed: 12 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const colors = require('tailwindcss/colors');
2+
13
module.exports = {
24
theme: {
35
fontFamily: {
@@ -8,79 +10,13 @@ module.exports = {
810
colors: {
911
transparent: 'transparent',
1012
black: 'hsl(210, 27%, 10%)',
11-
white: '#ffffff',
12-
primary: {
13-
50: 'hsl(202, 100%, 95%)', // lightest
14-
100: 'hsl(204, 100%, 86%)', // lighter
15-
200: 'hsl(206, 93%, 73%)',
16-
300: 'hsl(208, 88%, 62%)',
17-
400: 'hsl(210, 83%, 53%)', // light
18-
500: 'hsl(212, 92%, 43%)', // base
19-
600: 'hsl(214, 95%, 36%)', // dark
20-
700: 'hsl(215, 96%, 32%)',
21-
800: 'hsl(216, 98%, 25%)', // darker
22-
900: 'hsl(218, 100%, 17%)', // darkest
23-
},
24-
neutral: {
25-
50: 'hsl(216, 33%, 97%)',
26-
100: 'hsl(214, 15%, 91%)',
27-
200: 'hsl(210, 16%, 82%)',
28-
300: 'hsl(211, 13%, 65%)',
29-
400: 'hsl(211, 10%, 53%)',
30-
500: 'hsl(211, 12%, 43%)',
31-
600: 'hsl(209, 14%, 37%)',
32-
700: 'hsl(209, 18%, 30%)',
33-
800: 'hsl(209, 20%, 25%)',
34-
900: 'hsl(210, 24%, 16%)',
35-
},
36-
red: {
37-
50: 'hsl(360, 100%, 95%)',
38-
100: 'hsl(360, 100%, 87%)',
39-
200: 'hsl(360, 100%, 80%)',
40-
300: 'hsl(360, 91%, 69%)',
41-
400: 'hsl(360, 83%, 62%)',
42-
500: 'hsl(356, 75%, 53%)',
43-
600: 'hsl(354, 85%, 44%)',
44-
700: 'hsl(352, 90%, 35%)',
45-
800: 'hsl(350, 94%, 28%)',
46-
900: 'hsl(348, 94%, 20%)',
47-
},
48-
yellow: {
49-
50: 'hsl(49, 100%, 96%)',
50-
100: 'hsl(48, 100%, 88%)',
51-
200: 'hsl(48, 95%, 76%)',
52-
300: 'hsl(48, 94%, 68%)',
53-
400: 'hsl(44, 92%, 63%)',
54-
500: 'hsl(42, 87%, 55%)',
55-
600: 'hsl(36, 77%, 49%)',
56-
700: 'hsl(29, 80%, 44%)',
57-
800: 'hsl(22, 82%, 39%)',
58-
900: 'hsl(15, 86%, 30%)',
59-
},
60-
cyan: {
61-
50: 'hsl(171, 82%, 94%)',
62-
100: 'hsl(172, 97%, 88%)',
63-
200: 'hsl(174, 96%, 78%)',
64-
300: 'hsl(176, 87%, 67%)',
65-
400: 'hsl(178, 78%, 57%)',
66-
500: 'hsl(180, 77%, 47%)',
67-
600: 'hsl(182, 85%, 39%)',
68-
700: 'hsl(184, 90%, 34%)',
69-
800: 'hsl(186, 91%, 29%)',
70-
900: 'hsl(188, 91%, 23%)',
71-
},
72-
green: {
73-
50: 'hsl(125, 65%, 93%)',
74-
100: 'hsl(127, 65%, 85%)',
75-
200: 'hsl(124, 63%, 74%)',
76-
300: 'hsl(123, 53%, 55%)',
77-
400: 'hsl(123, 57%, 45%)',
78-
500: 'hsl(122, 73%, 35%)',
79-
600: 'hsl(122, 80%, 29%)',
80-
700: 'hsl(125, 79%, 26%)',
81-
800: 'hsl(125, 86%, 20%)',
82-
900: 'hsl(125, 97%, 14%)',
83-
},
13+
white: '#fff',
14+
primary: colors.blue,
15+
neutral: colors.coolGray,
16+
cyan: colors.cyan,
17+
green: colors.green,
18+
yellow: colors.amber,
19+
red: colors.red,
8420
},
8521
extend: {
8622
fontSize: {
@@ -94,4 +30,7 @@ module.exports = {
9430
}),
9531
},
9632
},
33+
plugins: [
34+
require('@tailwindcss/forms'),
35+
]
9736
};

webpack.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ module.exports = {
2828
test: /\.tsx?$/,
2929
exclude: /node_modules/,
3030
loader: 'babel-loader',
31-
options: {
32-
cacheDirectory: !isProduction,
33-
},
3431
},
3532
{
3633
test: /\.css$/,
@@ -92,7 +89,7 @@ module.exports = {
9289
minimize: isProduction,
9390
minimizer: [
9491
new TerserPlugin({
95-
cache: true,
92+
cache: isProduction,
9693
parallel: true,
9794
extractComments: false,
9895
terserOptions: {

0 commit comments

Comments
 (0)