Skip to content

Commit

Permalink
moved to poi, updated deps,
Browse files Browse the repository at this point in the history
  • Loading branch information
saanuregh committed May 9, 2020
1 parent d99912a commit 5fe3076
Show file tree
Hide file tree
Showing 9 changed files with 4,430 additions and 9,388 deletions.
4 changes: 4 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
presets: ["poi/babel"],
plugins: ["react-hot-loader/babel"],
};
13,771 changes: 4,407 additions & 9,364 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 8 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,19 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"@react-hook/window-size": "^1.0.13",
"@testing-library/jest-dom": "^5.5.0",
"@testing-library/react": "^10.0.2",
"@testing-library/user-event": "^10.0.2",
"@react-hook/window-size": "^2.0.5",
"axios": "^0.19.2",
"d3": "^5.15.1",
"d3-geo": "^1.11.9",
"d3": "^5.16.0",
"d3-geo": "^1.12.0",
"d3-svg-legend": "^2.25.6",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1",
"recharts": "^1.8.5",
"tailwindcss": "^1.2.0",
"topojson": "^3.0.2"
},
"scripts": {
"start": "npm run watch:css && react-scripts start",
"build": "NODE_ENV=production npm run build:css && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"build:css": "postcss src/styles/global.css -o src/styles/main.css",
"watch:css": "postcss src/styles/global.css -o src/styles/main.css"
"build": "poi --prod",
"dev": "poi --serve"
},
"eslintConfig": {
"extends": "react-app"
Expand All @@ -42,10 +33,11 @@
]
},
"devDependencies": {
"poi": "^12.8.0",
"react-hot-loader": "^4.12.21",
"tailwindcss": "^1.4.6",
"autoprefixer": "^9.7.6",
"postcss-cli": "^7.1.0",
"cssnano": "^4.1.10",
"@fullhuman/postcss-purgecss": "^2.1.2",
"tailwindcss-spinner": "^1.0.0",
"tailwindcss-border-gradients": "^2.0.3",
"tailwindcss-gradients": "^3.0.0"
Expand Down
6 changes: 6 additions & 0 deletions poi.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
entry: "src/index",
output: {
dir: "build",
},
};
5 changes: 0 additions & 5 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
const cssnano = require("cssnano");
const purgecss = require("@fullhuman/postcss-purgecss")({
content: ["./public/**/*.html", "./src/**/*.js"],
defaultExtractor: (content) => content.match(/[\w-/:]+(?<!:)/g) || [],
});
module.exports = {
plugins: [
require("tailwindcss"),
require("autoprefixer"),
cssnano({
preset: "default",
}),
...(process.env.NODE_ENV === "production" ? [purgecss] : []),
],
};
3 changes: 2 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Counter from "./components/counter";
import Charts from "./components/charts";
import axios from "axios";
import lang from "./components/lang";
import { hot } from "react-hot-loader";

function App() {
const [history, setHistory] = useState([]);
Expand Down Expand Up @@ -107,4 +108,4 @@ function App() {
);
}

export default App;
export default hot(module)(App);
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import ReactDOM from "react-dom";
import "./styles/main.css";
import "./styles/global.css";
import App from "./App";
import * as serviceWorker from "./serviceWorker";

Expand Down
1 change: 0 additions & 1 deletion src/styles/main.css

This file was deleted.

2 changes: 2 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
important: true,
purge: ["./public/**/*.html", "./src/**/*.jsx", "./src/**/*.js"],
theme: {
spinner: (theme) => ({
default: {
Expand Down

0 comments on commit 5fe3076

Please sign in to comment.