Skip to content

Commit 9531f9b

Browse files
committed
reduce bundle size
1 parent e48db03 commit 9531f9b

File tree

17 files changed

+1234
-90783
lines changed

17 files changed

+1234
-90783
lines changed

.babelrc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
{
2-
"presets": ["@babel/env", "@babel/react"]
2+
"presets": ["@babel/env", "@babel/react"],
3+
"plugins": [
4+
[
5+
"import",
6+
{
7+
"libraryName": "antd",
8+
"libraryDirectory": "lib",
9+
"camel2DashComponentName": true,
10+
"style": "css"
11+
}
12+
]
13+
]
314
}

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

config/template.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="utf-8"/>
4+
<meta charset="utf-8" />
55
<title><%= htmlWebpackPlugin.options.title %></title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
67
</head>
78
<body>
8-
<div id="root"></div>
9+
<div id="root"></div>
910
</body>
10-
</html>
11+
</html>

package-lock.json

Lines changed: 0 additions & 14455 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "blobs.app",
33
"version": "1.0.0",
4-
"description": "Generate blob shapes for Eeb and Fluttter",
4+
"description": "Generate blob shapes for Web and Fluttter",
55
"main": "index.js",
66
"scripts": {
7-
"build": "npm run build:css && webpack ---config ./config/webpack.prod.config.js",
7+
"build": "rm -rf build && NODE_ENV=production npm run build:css && webpack ---config ./config/webpack.prod.config.js",
88
"dev": "npm run watch:css && webpack-dev-server --config ./config/webpack.dev.config.js --open",
99
"lint": "./node_modules/.bin/eslint --ext .js,.jsx src/",
1010
"lint: fix": "./node_modules/.bin/eslint --ext .js,.jsx src/ --fix",
@@ -34,13 +34,15 @@
3434
"react": "^16.13.1",
3535
"react-dom": "^16.13.1",
3636
"react-syntax-highlighter": "^12.2.1",
37-
"tailwindcss": "^1.3.4",
37+
"tailwindcss": "^1.4.6",
3838
"webpack": "^4.42.1",
3939
"webpack-cli": "^3.3.11"
4040
},
4141
"devDependencies": {
42+
"@fullhuman/postcss-purgecss": "^2.2.0",
4243
"@testing-library/jest-dom": "^5.5.0",
4344
"@testing-library/react": "^10.0.2",
45+
"babel-plugin-import": "^1.13.0",
4446
"clean-webpack-plugin": "^3.0.0",
4547
"css-loader": "^3.5.2",
4648
"eslint": "^6.8.0",

postcss.config.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
const tailwindcss = require('tailwindcss');
1+
const tailwindcss = require("tailwindcss");
22
module.exports = {
3-
plugins: [
4-
tailwindcss('./tailwind.config.js'),
5-
require('autoprefixer'),
6-
],
3+
plugins: [tailwindcss("./tailwind.config.js"), require("autoprefixer")],
74
};

src/app.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { useEffect } from "react";
22
import { store, autoEffect } from "@risingstack/react-easy-state";
3-
import "antd/dist/antd.css";
43
import "assets/css/main.css";
54
import "./app.scss";
65
import Grid from "./components/layout/grid";

src/app.scss

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,54 @@
1-
.brand-bg {
2-
margin-top: -16px;
3-
transform: translate(-50%, 0);
4-
margin-left: 50%;
5-
}
1+
html body {
2+
.brand-bg {
3+
margin-top: -16px;
4+
transform: translate(-50%, 0);
5+
margin-left: 50%;
6+
}
67

7-
#blob {
8-
fill: #d1d8e0;
9-
}
8+
#blobSvg {
9+
max-width: 500px;
10+
}
1011

11-
.ant-slider-step {
12-
background: rgb(209, 216, 224);
13-
}
12+
#blob {
13+
fill: #d1d8e0;
14+
}
15+
16+
.ant-slider-step {
17+
background: rgb(209, 216, 224);
18+
}
1419

15-
.ant-slider-handle {
16-
border: solid 3px #4e566b;
17-
width: 24px;
18-
height: 24px;
19-
margin-top: -9px;
20-
&:focus,
21-
&.ant-tooltip-open {
20+
.ant-slider-handle {
21+
border: solid 3px #4e566b;
22+
width: 24px;
23+
height: 24px;
24+
margin-top: -9px;
25+
&:focus,
26+
&.ant-tooltip-open {
27+
border-color: #303749;
28+
}
29+
}
30+
.ant-slider:hover .ant-slider-handle:not(.ant-tooltip-open) {
2231
border-color: #303749;
2332
}
24-
}
25-
.ant-slider:hover .ant-slider-handle:not(.ant-tooltip-open) {
26-
border-color: #303749;
27-
}
2833

29-
.ant-modal-mask {
30-
background-color: rgba(182, 170, 176, 0.84);
31-
}
34+
.ant-modal-mask {
35+
background-color: rgba(182, 170, 176, 0.84);
36+
}
3237

33-
.ant-modal-content {
34-
border-radius: 11px;
35-
}
38+
.ant-modal-content {
39+
border-radius: 11px;
40+
}
3641

37-
.ant-tooltip-inner {
38-
border-radius: 4px;
39-
font-size: 11px;
40-
color: #ffffffd6;
41-
background: #2f3143;
42-
}
42+
.ant-tooltip-inner {
43+
border-radius: 4px;
44+
font-size: 11px;
45+
color: #ffffffd6;
46+
background: #2f3143;
47+
}
4348

44-
pre > code {
45-
overflow: auto;
46-
width: 100%;
47-
display: inline-block;
49+
pre > code {
50+
overflow: auto;
51+
width: 100%;
52+
display: inline-block;
53+
}
4854
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy