update dependencies
This commit is contained in:
parent
c8b06139d3
commit
ed7376b19a
4 changed files with 519 additions and 237 deletions
|
@ -1,7 +1,6 @@
|
|||
import ejs from "ejs"
|
||||
import { optimize, OptimizedSvg } from "svgo"
|
||||
import { optimize } from "svgo"
|
||||
import { readFileSync, writeFileSync } from "fs"
|
||||
import simpleIcon from "simple-icons"
|
||||
import tinycolor from "tinycolor2"
|
||||
|
||||
import { map, seriesMap } from "."
|
||||
|
@ -109,21 +108,21 @@ function generatePortfolioSVGs() {
|
|||
{ views: ["./generate/portfolio"] }
|
||||
)
|
||||
|
||||
const optimizedSVG = optimize(renderedSVG, { multipass: true })
|
||||
|
||||
if (optimizedSVG.error) {
|
||||
console.error("Failed to generate optimized skills.svg")
|
||||
return
|
||||
}
|
||||
|
||||
writeFileSync("./public/img/skills.svg", (optimizedSVG as OptimizedSvg).data)
|
||||
writeFileSync(
|
||||
"./public/img/skills.svg",
|
||||
optimize(renderedSVG, { multipass: true }).data
|
||||
)
|
||||
}
|
||||
|
||||
function parseBadge(badgeRaw: string): Badge {
|
||||
const isMultiWord = badgeRaw.includes(" ")
|
||||
const words = badgeRaw.split(" ")
|
||||
|
||||
const icon = isMultiWord ? simpleIcon.Get(words[0]) : simpleIcon.Get(badgeRaw)
|
||||
const icon = isMultiWord
|
||||
? // eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
require("simple-icons")[words[0]]
|
||||
: // eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
require("simple-icons")[badgeRaw]
|
||||
|
||||
const color = tinycolor(icon.hex).lighten(5).desaturate(5)
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import simpleIcons from "simple-icons"
|
||||
import tinycolor from "tinycolor2"
|
||||
|
||||
import { contentDirectoryPath, iconsDirectoryPath } from "../config"
|
||||
|
@ -35,7 +34,8 @@ export default function parsePortfolio(data: DataToPass): void {
|
|||
|
||||
portfolioData.skills.add(slug)
|
||||
|
||||
const icon = simpleIcons.Get(slug)
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const icon = require("simple-icons")[slug]
|
||||
|
||||
const color = tinycolor(icon.hex).lighten(5).desaturate(5)
|
||||
|
||||
|
|
49
package.json
49
package.json
|
@ -6,18 +6,15 @@
|
|||
"quick-start": "react-scripts start",
|
||||
"build": "npm run generate && react-scripts build"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/react": "18.0.20"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^6.2.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.2.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.2.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.2.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.2.1",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||
"@fortawesome/react-fontawesome": "^0.2.0",
|
||||
"elasticlunr": "^0.9.5",
|
||||
"highlight.js": "^11.6.0",
|
||||
"katex": "^0.16.2",
|
||||
"highlight.js": "^11.7.0",
|
||||
"katex": "^0.16.3",
|
||||
"local-storage-fallback": "^4.1.2",
|
||||
"react": "^18.2.0",
|
||||
"react-collapse": "^5.1.1",
|
||||
|
@ -27,36 +24,36 @@
|
|||
"react-dnd-html5-backend": "^16.0.1",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-helmet-async": "^1.3.0",
|
||||
"react-router-dom": "^6.4.0",
|
||||
"react-router-dom": "^6.4.4",
|
||||
"react-scripts": "^5.0.1",
|
||||
"react-select": "^5.4.0",
|
||||
"react-tooltip": "^4.2.21",
|
||||
"styled-components": "^5.3.5"
|
||||
"react-select": "^5.7.0",
|
||||
"react-tooltip": "^4.5.1",
|
||||
"styled-components": "^5.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ejs": "^3.1.1",
|
||||
"@types/elasticlunr": "^0.9.5",
|
||||
"@types/highlight.js": "^10.1.0",
|
||||
"@types/jsdom": "^20.0.0",
|
||||
"@types/jsdom": "^20.0.1",
|
||||
"@types/katex": "^0.14.0",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"@types/node": "^18.7.18",
|
||||
"@types/react": "^18.0.20",
|
||||
"@types/node": "^18.11.10",
|
||||
"@types/react": "^18.0.26",
|
||||
"@types/react-collapse": "^5.0.1",
|
||||
"@types/react-date-range": "^1.4.4",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@types/react-dom": "^18.0.9",
|
||||
"@types/react-select": "^5.0.1",
|
||||
"@types/styled-components": "^5.1.26",
|
||||
"@types/svgo": "^2.6.4",
|
||||
"@types/svgo": "^3.0.0",
|
||||
"@types/tinycolor2": "^1.4.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
||||
"@typescript-eslint/parser": "^5.37.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||
"@typescript-eslint/parser": "^5.45.0",
|
||||
"ejs": "^3.1.8",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-json": "^3.1.0",
|
||||
"eslint-plugin-react": "^7.31.8",
|
||||
"eslint-plugin-react": "^7.31.11",
|
||||
"gray-matter": "^4.0.3",
|
||||
"jsdom": "^20.0.0",
|
||||
"jsdom": "^20.0.3",
|
||||
"jspdf": "^2.5.1",
|
||||
"markdown-it": "^13.0.1",
|
||||
"markdown-it-anchor": "^8.6.5",
|
||||
|
@ -69,14 +66,14 @@
|
|||
"markdown-it-task-checkbox": "^1.0.6",
|
||||
"markdown-it-texmath": "^1.0.0",
|
||||
"markdown-toc": "^1.2.0",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier": "^2.8.0",
|
||||
"read-time-estimate": "^0.0.3",
|
||||
"simple-icons": "^7.11.0",
|
||||
"svgo": "^2.8.0",
|
||||
"simple-icons": "^7.21.0",
|
||||
"svgo": "^3.0.2",
|
||||
"tinycolor2": "^1.4.2",
|
||||
"ts-node": "^10.9.1",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "^4.8.3"
|
||||
"typescript": "^4.9.3"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue