changed prettier config

This commit is contained in:
Kim, Jimin 2022-01-11 17:25:15 +09:00
parent 5a3e0d2623
commit 1758571f4a
37 changed files with 236 additions and 311 deletions

View file

@ -1,59 +1,59 @@
name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- master
push:
branches:
- master
jobs:
build:
if: ${{ github.repository_owner == 'developomp' }}
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 16
cache: yarn
cache-dependency-path: source/yarn.lock
- name: Install dependencies and Build
run: cd source && yarn install && yarn build
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: build
path: source/build
build:
if: ${{ github.repository_owner == 'developomp' }}
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 16
cache: yarn
cache-dependency-path: source/yarn.lock
- name: Install dependencies and Build
run: cd source && yarn install && yarn build
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: build
path: source/build
deploy:
if: ${{ github.repository_owner == 'developomp' }}
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: build
path: source/build
- name: Set target
uses: w9jds/firebase-action@master
with:
args: use developomp-site
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
- name: Apply target
uses: w9jds/firebase-action@master
with:
args: target:apply hosting stable developomp-site
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:stable
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
deploy:
if: ${{ github.repository_owner == 'developomp' }}
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: build
path: source/build
- name: Set target
uses: w9jds/firebase-action@master
with:
args: use developomp-site
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
- name: Apply target
uses: w9jds/firebase-action@master
with:
args: target:apply hosting stable developomp-site
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:stable
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

View file

@ -1,5 +1,4 @@
{
"tabWidth": 4,
"useTabs": true,
"semi": false
}

View file

@ -8,8 +8,8 @@ Source code for my (developomp's) <a href="https://developomp.com" target="_blan
### Requirements
- [nodeJS](https://nodejs.org)
- [yarn](https://github.com/yarnpkg/yarn)
- [nodeJS](https://nodejs.org)
- [yarn](https://github.com/yarnpkg/yarn)
### Steps
@ -39,10 +39,10 @@ yarn start
## Special thanks
- My dear friend [Aditya Prakash](https://github.com/AdityaPrakash-26) for extensive testing and wonderful suggestions
- [Ruipeng Zhang](https://github.com/ppoffice) for design inspiration ([hexo-icarus-theme](https://github.com/ppoffice/hexo-theme-icarus))
- [Artem Golubin](https://github.com/rushter) for design inspiration ([his blog](https://rushter.com/blog))
- [discord](http://discord.com) for dark theme color palette (before the [rebranding of May 2021](https://blog.discord.com/how-were-making-discord-more-welcoming-for-everyone-ee152f198c60))
- My dear friend [Aditya Prakash](https://github.com/AdityaPrakash-26) for extensive testing and wonderful suggestions
- [Ruipeng Zhang](https://github.com/ppoffice) for design inspiration ([hexo-icarus-theme](https://github.com/ppoffice/hexo-theme-icarus))
- [Artem Golubin](https://github.com/rushter) for design inspiration ([his blog](https://rushter.com/blog))
- [discord](http://discord.com) for dark theme color palette (before the [rebranding of May 2021](https://blog.discord.com/how-were-making-discord-more-welcoming-for-everyone-ee152f198c60))
## License
@ -52,5 +52,5 @@ Font licenses:
[Open Font License (OFL)](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL#5667e9e4):
- [Source Code Pro](https://fonts.google.com/specimen/Source+Code+Pro?query=source+code+pro) (monospaced code font)
- [Noto Sans KR](https://fonts.google.com/specimen/Noto+Sans+KR) (Korean and English font)
- [Source Code Pro](https://fonts.google.com/specimen/Source+Code+Pro?query=source+code+pro) (monospaced code font)
- [Noto Sans KR](https://fonts.google.com/specimen/Noto+Sans+KR) (Korean and English font)

View file

@ -79,8 +79,7 @@ export function parseFrontMatter(
).data
if (mode != ParseMode.PORTFOLIO) {
if (!frontMatter.title)
throw Error(`Title is not defined in file: ${path}`)
if (!frontMatter.title) throw Error(`Title is not defined in file: ${path}`)
if (mode != ParseMode.UNSEARCHABLE && !frontMatter.date)
throw Error(`Date is not defined in file: ${path}`)

View file

@ -1,4 +1,5 @@
<div class="items-wrapper">
<% badges.forEach((badge) => { %> <%- include("badge.ejs", { badge }) %> <%
}) %>
<% badges.forEach((badge) => { %>
<%- include("badge.ejs", { badge }) %>
<% }) %>
</div>

View file

@ -44,9 +44,7 @@ function parseSeries() {
// series length and order
for (const seriesURL in seriesMap) {
map.series[seriesURL].length = seriesMap[seriesURL].length
map.series[seriesURL].order = seriesMap[seriesURL].map(
(item) => item.url
)
map.series[seriesURL].order = seriesMap[seriesURL].map((item) => item.url)
}
}
@ -68,13 +66,9 @@ function generatePortfolioSVGs() {
}
for (const skillCategory in skills) {
skills[skillCategory as keyof typeof skills].forEach(
(badge: string) => {
data[skillCategory as keyof typeof skills].push(
parseBadge(badge)
)
}
)
skills[skillCategory as keyof typeof skills].forEach((badge: string) => {
data[skillCategory as keyof typeof skills].push(parseBadge(badge))
})
}
const renderedSVG = ejs.render(
@ -92,9 +86,7 @@ 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 ? simpleIcon.Get(words[0]) : simpleIcon.Get(badgeRaw)
const color = tinycolor(icon.hex).lighten(5).desaturate(5)

View file

@ -7,13 +7,8 @@ import { map } from ".."
import { DataToPass } from "."
export default function parsePost(data: DataToPass): void {
const {
urlPath,
markdownRaw,
markdownData,
humanizedDuration,
totalWords,
} = data
const { urlPath, markdownRaw, markdownData, humanizedDuration, totalWords } =
data
const postData: PostData = {
title: markdownData.title as string,

View file

@ -114,8 +114,7 @@ export default function parseSeries(data: DataToPass): void {
)
)
if (isNaN(index))
throw Error(`Invalid series index at: ${path}`)
if (isNaN(index)) throw Error(`Invalid series index at: ${path}`)
const itemToPush = {
index: index,

View file

@ -21,8 +21,7 @@ export function path2URL(pathToConvert: string): string {
*/
export function path2FileOrFolderName(inputPath: string): string {
// remove trailing slash
if (inputPath[-1] == "/")
inputPath = inputPath.slice(0, inputPath.length - 1)
if (inputPath[-1] == "/") inputPath = inputPath.slice(0, inputPath.length - 1)
// get the last section
return inputPath.slice(inputPath.lastIndexOf("/") + 1)

View file

@ -4,14 +4,14 @@ overview: my website for blogging, portfolio, and resume.
image: /img/portfolio/developomp.com.png
repo: https://github.com/developomp/developomp-site
badges:
- typescript
- javascript
- nodedotjs
- firebase
- amazonaws
- react
- html5
- css3
- typescript
- javascript
- nodedotjs
- firebase
- amazonaws
- react
- html5
- css3
---
## Intro

View file

@ -4,7 +4,7 @@ overview: A setup script and dotfiles for my arch linux setup.
image: /img/portfolio/linux-setup-script.png
repo: https://github.com/developomp/setup
badges:
- linux
- gnubash
- vim
- linux
- gnubash
- vim
---

View file

@ -4,11 +4,11 @@ overview: A discord bot.
image: /img/portfolio/llama-bot.png
repo: https://github.com/llama-bot
badges:
- firebase
- nodedotjs
- javascript
- typescript
- react
- html5
- css3
- firebase
- nodedotjs
- javascript
- typescript
- react
- html5
- css3
---

View file

@ -4,13 +4,13 @@ overview: A cross-platform desktop download manager built with web technologies.
image: /img/portfolio/mocha-downloader.png
repo: https://github.com/Mocha-Downloader
badges:
- typescript
- javascript
- nodedotjs
- electron
- react
- html5
- css3
- typescript
- javascript
- nodedotjs
- electron
- react
- html5
- css3
---
Mocha Downloader is a cross-platform desktop download manager built with web technologies.

View file

@ -4,10 +4,12 @@ overview: A conky-like system monitor.
image: /img/portfolio/pomky.png
repo: https://github.com/developomp/pomky
badges:
- rust
# - gtk
# - cairo
- rust
# - gtk
# - cairo
---
## Intro
Pomky is a [conky](https://github.com/brndnmtthws/conky)-like system monitor written in rust.
It is built to teach myself the rust programming language and to write a more flexible, efficient, and tailored version of conky.

View file

@ -4,14 +4,14 @@ overview: A game mod for a unity game. Provides in-game UI and OBS overlays.
image: /img/portfolio/wbm.png
repo: https://github.com/War-Brokers-Mods
badges:
- csharp
- dotnet
- javascript
- html5
- css3
- svelte
- tailwindcss
- rust
- csharp
- dotnet
- javascript
- html5
- css3
- svelte
- tailwindcss
- rust
---
## Intro

View file

@ -2,7 +2,7 @@
title: Test post
date: 2021-07-26
tags:
- test
- test
---
<!-- comment -->
@ -32,23 +32,23 @@ A post have title, post date, tags, and content.
## List
- Unordered list item
- Unordered list item
- unordered list sub-item
- unordered list sub-item
- [ ] Unordered task list item (unchecked)
- [x] Unordered task list item (checked)
- [ ] unordered task list sub-item (unchecked)
- [x] unordered task list sub-item (checked)
- Unordered list item
- Unordered list item
- unordered list sub-item
- unordered list sub-item
- [ ] Unordered task list item (unchecked)
- [x] Unordered task list item (checked)
- [ ] unordered task list sub-item (unchecked)
- [x] unordered task list sub-item (checked)
1. Ordered list item
2. Ordered list item
1. ordered list sub item
2. ordered list sub item
1. ordered list sub item
2. ordered list sub item
3. [ ] Ordered list task item (unchecked)
4. [x] Ordered list task item (checked)
1. [ ] Ordered list task sub-item (unchecked)
2. [x] Ordered list task sub-item (checked)
1. [ ] Ordered list task sub-item (unchecked)
2. [x] Ordered list task sub-item (checked)
## Footnote

View file

@ -10,8 +10,8 @@ Year of Birth: 2002
## Links
- [Github](https://github.com/developomp)
- [goals](/goals)
- [Github](https://github.com/developomp)
- [goals](/goals)
## Contact

View file

@ -4,38 +4,38 @@ title: Goals
## Programming
- Get a total of X stars on github (not counting mine)
- [x] 10
- [ ] 100
- [ ] 500
- [ ] 1,000
- [ ] 10,000
- Create...
- [x] My own website ([Github](https://github.com/developomp/developomp-site))
- [x] My own linux setup script ([Github](https://github.com/developomp/setup))
- [ ] My own programming language ([Github](https://github.com/boy-lang))
- [ ] Push at least one commit every day for 365 days
- [ ] Get my code in the linux kernel
- Get a total of X stars on github (not counting mine)
- [x] 10
- [ ] 100
- [ ] 500
- [ ] 1,000
- [ ] 10,000
- Create...
- [x] My own website ([Github](https://github.com/developomp/developomp-site))
- [x] My own linux setup script ([Github](https://github.com/developomp/setup))
- [ ] My own programming language ([Github](https://github.com/boy-lang))
- [ ] Push at least one commit every day for 365 days
- [ ] Get my code in the linux kernel
## Lean how to
- Type at least X letters per minute (rules: count the number of correct keystrokes made in one minute. Use [10fastfingers.com](https://10fastfingers.com/typing-test) for testing. The typing speed must be consistent and could be replicated on-demand.)
- Korean
- [x] 100
- [x] 200
- [ ] 300
- English
- [x] 100
- [x] 200
- [ ] 300
- [ ] Type without looking at keyboard
- Speak basic Chinese
- [ ] Counting up to 15 digits
- [ ] Greetings
- Speak basic Japanese
- [ ] Counting up to 15 digits
- [ ] Greetings
- Type at least X letters per minute (rules: count the number of correct keystrokes made in one minute. Use [10fastfingers.com](https://10fastfingers.com/typing-test) for testing. The typing speed must be consistent and could be replicated on-demand.)
- Korean
- [x] 100
- [x] 200
- [ ] 300
- English
- [x] 100
- [x] 200
- [ ] 300
- [ ] Type without looking at keyboard
- Speak basic Chinese
- [ ] Counting up to 15 digits
- [ ] Greetings
- Speak basic Japanese
- [ ] Counting up to 15 digits
- [ ] Greetings
## Etc
- [ ] Make a high quality video that I'm proud of with at least 1M views on YouTube
- [ ] Make a high quality video that I'm proud of with at least 1M views on YouTube

View file

@ -91,10 +91,7 @@ const App = () => {
<Loading />
) : (
<Routes>
<Route
path="/"
element={<PostList howMany={5} title="Home" />}
/>
<Route path="/" element={<PostList howMany={5} title="Home" />} />
<Route path="/search" element={<Search />} />
<Route path="/portfolio" element={<Portfolio />} />
<Route path="/404" element={<NotFound />} />

View file

@ -27,9 +27,7 @@ const StyledSVG = styled.div<{ isDark: boolean }>`
svg {
height: 16px;
fill: ${(props) =>
props.isDark
? theming.dark.color1
: theming.light.color1} !important;
props.isDark ? theming.dark.color1 : theming.light.color1} !important;
}
`

View file

@ -87,9 +87,7 @@ const ReadProgress = () => {
const b = document.body
// https://stackoverflow.com/a/8028584/12979111
setScroll(
((h[st] || b[st]) / ((h[sh] || b[sh]) - h.clientHeight)) * 100
)
setScroll(((h[st] || b[st]) / ((h[sh] || b[sh]) - h.clientHeight)) * 100)
}
window.addEventListener("scroll", scrollHandler)
@ -107,9 +105,7 @@ const Navbar = () => {
<StyledNav>
<StyledContainer>
<Link to="/">
<StyledImg
src={process.env.PUBLIC_URL + "/icon/icon_circle.svg"}
/>
<StyledImg src={process.env.PUBLIC_URL + "/icon/icon_circle.svg"} />
</Link>
<StyledNavLinks>

View file

@ -58,9 +58,7 @@ const PostCard = (props: Props) => {
return (
<StyledPostCard
onClick={() =>
navigate(process.env.PUBLIC_URL + props.postData.url)
}
onClick={() => navigate(process.env.PUBLIC_URL + props.postData.url)}
>
<StyledTitle>{props.postData?.title || "No title"}</StyledTitle>
@ -70,12 +68,7 @@ const PostCard = (props: Props) => {
<TagList direction="left">
{props.postData.tags &&
props.postData.tags.map((tag) => {
return (
<Tag
key={props.postData.title + tag}
text={tag}
/>
)
return <Tag key={props.postData.title + tag} text={tag} />
})}
</TagList>
<hr />

View file

@ -89,10 +89,7 @@ const Sidebar = () => {
return (
<>
<StyledOverlay
isSidebarOpen={isSidebarOpen}
onClick={toggleSidebar}
/>
<StyledOverlay isSidebarOpen={isSidebarOpen} onClick={toggleSidebar} />
<StyledToggleSidebarButton
data-tip

View file

@ -25,16 +25,10 @@ const Navbar = () => {
data-tip
data-for="theme"
className="right"
onClick={() =>
setTheme(currentTheme === "dark" ? "light" : "dark")
}
onClick={() => setTheme(currentTheme === "dark" ? "light" : "dark")}
>
{currentTheme == "dark" && (
<FontAwesomeIcon icon={faMoon} />
)}
{currentTheme == "light" && (
<FontAwesomeIcon icon={faSun} />
)}
{currentTheme == "dark" && <FontAwesomeIcon icon={faMoon} />}
{currentTheme == "light" && <FontAwesomeIcon icon={faSun} />}
</StyledThemeButton>
{!isMobile && (
<ReactTooltip id="theme" type="dark" effect="solid">

View file

@ -48,9 +48,7 @@ const Toc = (props: { data?: string }) => {
>
<strong>
Table of Contents{" "}
<FontAwesomeIcon
icon={isTocOpened ? faCaretUp : faCaretDown}
/>
<FontAwesomeIcon icon={isTocOpened ? faCaretUp : faCaretDown} />
</strong>
</StyledTocToggleButton>
<StyledCollapseContainer>

View file

@ -95,8 +95,7 @@ const Page = () => {
}
case PageType.SERIES: {
if (!(url.slice(0, url.lastIndexOf("/")) in map.series))
show404 = true
if (!(url.slice(0, url.lastIndexOf("/")) in map.series)) show404 = true
break
}
@ -182,9 +181,7 @@ const Page = () => {
pageData.seriesHome = seriesURL
pageData.prev =
prev >= 0
? map.series[seriesURL].order[prev]
: undefined
prev >= 0 ? map.series[seriesURL].order[prev] : undefined
pageData.next =
next < map.series[seriesURL].order.length
? map.series[seriesURL].order[next]
@ -195,9 +192,7 @@ const Page = () => {
case PageType.PORTFOLIO_PROJECT: {
const data =
portfolio.projects[
url as keyof typeof portfolio.projects
]
portfolio.projects[url as keyof typeof portfolio.projects]
pageData.content = fetched_content.content
pageData.toc = fetched_content.toc
@ -246,10 +241,7 @@ const Page = () => {
<MainContent>
{/* next/previous series post buttons */}
{pageType == PageType.SERIES && (
<NextPrevButtons
prevURL={pageData.prev}
nextURL={pageData.next}
/>
<NextPrevButtons prevURL={pageData.prev} nextURL={pageData.next} />
)}
{pageType == PageType.PORTFOLIO_PROJECT && (
@ -262,9 +254,7 @@ const Page = () => {
</StyledTitle>
{pageType == PageType.PORTFOLIO_PROJECT &&
pageData.badges.map((badge) => (
<Badge key={badge} slug={badge} />
))}
pageData.badges.map((badge) => <Badge key={badge} slug={badge} />)}
<small>
{/* Post tags */}
@ -294,10 +284,7 @@ const Page = () => {
<Toc data={pageData.toc} />
{pageType == PageType.PORTFOLIO_PROJECT && (
<ProjectImage
src={pageData.image}
alt="project example image"
/>
<ProjectImage src={pageData.image} alt="project example image" />
)}
{/* page content */}

View file

@ -33,9 +33,7 @@ const ProjectCard = (props: ProjectCardProps) => {
const navigate = useNavigate()
useEffect(() => {
setBadges(
project.badges.map((badge) => <Badge key={badge} slug={badge} />)
)
setBadges(project.badges.map((badge) => <Badge key={badge} slug={badge} />))
}, [])
return (

View file

@ -52,10 +52,7 @@ const Portfolio = () => {
property="og:image"
content="http://developomp.com/icon/icon.svg"
/>
<meta
property="og:description"
content="developomp's Portfolio"
/>
<meta property="og:description" content="developomp's Portfolio" />
</Helmet>
<MainContent>

View file

@ -50,10 +50,7 @@ const PostList = (props: Props) => {
postCount++
const url: string = map.date[date][length - i - 1]
_postCards.push(
<PostCard
key={url}
postData={{ url: url, ...map.posts[url] }}
/>
<PostCard key={url} postData={{ url: url, ...map.posts[url] }} />
)
}
}

View file

@ -81,8 +81,7 @@ const TagSelect = (props: TagSelectProps) => {
":hover": {
backgroundColor: theming
.theme(currentTheme.currentTheme, {
light: theming.light
.backgroundColor0,
light: theming.light.backgroundColor0,
dark: theming.dark.backgroundColor0,
})
.toString(),
@ -96,13 +95,10 @@ const TagSelect = (props: TagSelectProps) => {
dark: theming.dark.backgroundColor1,
})
.toString(),
border: theming.theme(
currentTheme.currentTheme,
{
light: "1px solid #ccc",
dark: "1px solid #555",
}
),
border: theming.theme(currentTheme.currentTheme, {
light: "1px solid #ccc",
dark: "1px solid #555",
}),
}),
multiValue: (styles) => ({
...styles,

View file

@ -114,15 +114,11 @@ const Search = () => {
for (const [key, value] of URLSearchParams.entries()) {
switch (key) {
case "date_from":
setDateRange((prev) => [
{ ...prev[0], startDate: new Date(value) },
])
setDateRange((prev) => [{ ...prev[0], startDate: new Date(value) }])
break
case "date_to":
setDateRange((prev) => [
{ ...prev[0], endDate: new Date(value) },
])
setDateRange((prev) => [{ ...prev[0], endDate: new Date(value) }])
break
case "tags":
@ -258,17 +254,12 @@ const Search = () => {
value={searchInput}
autoComplete="off"
placeholder="Search"
onChange={(event) =>
setSearchInput(event.target.value)
}
onChange={(event) => setSearchInput(event.target.value)}
onKeyPress={(event) => {
event.key === "Enter" &&
searchInput &&
doSearch()
event.key === "Enter" && searchInput && doSearch()
}}
/>
{postCards.length}{" "}
{postCards.length > 1 ? "results" : "result"}
{postCards.length} {postCards.length > 1 ? "results" : "result"}
<TagSelect
defaultValue={selectedTags}
onChange={(newValue) => {