Skip to content

Commit

Permalink
chore: update lqip module
Browse files Browse the repository at this point in the history
  • Loading branch information
lotusk08 committed Dec 10, 2024
1 parent 40bf128 commit cab192e
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 45 deletions.
119 changes: 76 additions & 43 deletions .obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,49 @@
"type": "split",
"children": [
{
"id": "3ebaccfbba588b81",
"id": "828a8dbe7a9ad5be",
"type": "tabs",
"children": [
{
"id": "33ac85e06a4e6e40",
"id": "b91a6593887c6c6b",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"type": "markdown",
"state": {
"file": "_drafts/2019-08-08-text-and-typography.md",
"mode": "source",
"source": true
},
"icon": "lucide-file",
"title": "2019-08-08-text-and-typography"
}
},
{
"id": "c29afa169bbdebdc",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "_tabs/productions.md",
"mode": "source",
"source": true
},
"icon": "lucide-file",
"title": "productions"
}
},
{
"id": "7439a9d77641f5a4",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "_drafts/2024-04-20-coffee.md",
"mode": "source",
"source": true
},
"icon": "lucide-file",
"title": "New tab"
"title": "2024-04-20-coffee"
}
}
],
Expand Down Expand Up @@ -142,9 +174,11 @@
"type": "leaf",
"state": {
"type": "file-properties",
"state": {},
"state": {
"file": "_drafts/2019-08-08-text-and-typography.md"
},
"icon": "lucide-info",
"title": "File properties"
"title": "File properties for 2019-08-08-text-and-typography"
}
},
{
Expand Down Expand Up @@ -185,19 +219,22 @@
"obsidian-git:Open Git source control": false
}
},
"active": "33ac85e06a4e6e40",
"active": "b91a6593887c6c6b",
"lastOpenFiles": [
"assets/js/dist/sw.min.js",
"assets/js/dist/app.min.js",
"assets/js/dist/misc.min.js",
"assets/js/dist/post.min.js",
"assets/js/dist/page.min.js",
"assets/js/dist/categories.min.js",
"assets/js/dist/home.min.js",
"assets/js/dist/commons.min.js",
"assets/js/dist",
"rollup.config-1731938618024.cjs",
"_site/gojek-datbike/index.html",
"_posts/2024-11-21-start-up.md",
"_posts/2019-08-09-getting-started.md",
"_posts/2019-08-08-write-a-new-post.md",
"_posts/2019-08-08-text-and-typography.md",
"_site/start-up/index.html",
"_site/start-up",
"_site/page5/index.html",
"_site/page5",
"_site/what-makes-you-happy/index.html",
"_site/what-makes-you-happy",
"_site/a-year-with-too/index.html",
"_site/a-year-with-too",
"_site/su-truong-thanh/index.html",
"_site/su-truong-thanh",
"_site/assets/img/site/tkt-website.webp",
"_site/assets/img/site/tks-teams.webp",
"_site/assets/img/site/tks-employee.webp",
Expand All @@ -208,30 +245,26 @@
"_site/assets/img/site/reading-book.webp",
"_site/assets/img/site/old-website.webp",
"_site/assets/img/site/medeze-stemcell.gif",
"_posts/2024-10-22-what-makes-you-happy.md",
"_posts/2024-10-20-a-year-with-too.md",
"_posts/2024-09-29-su-truong-thanh.md",
"_posts/2024-06-16-cv?.md",
"_posts/2024-06-08-goodbye-brad.md",
"_drafts/2019-08-08-text-and-typography.md",
"_posts/2023-12-31-2023-mot-nam-nhin-lai.md",
"_posts/2023-11-10-my-pet.md",
"_posts/2023-09-01-obsidian.md",
"_posts/2023-07-23-an-nam.md",
"_posts/2023-06-16-golf-vietnam.md",
"_posts/2023-05-26-gojek-datbike.md",
"_posts/2023-04-27-noi-so-AI.md",
"_posts/2023-04-01-ly-tri.md",
"_posts/2023-03-23-morning-coffee.md",
"_posts/2023-03-08-xanh-sm.md",
"_posts/2022-12-25-tu-su.md",
"_posts/2022-12-17-2022-mot-nam-nhin-lai.md",
"_posts/2022-11-10-hoai-niem.md",
"_posts/2022-08-29-Gen-Z.md",
"_posts/2022-08-23-quit-job.md",
"_posts/2022-08-08-talk-Vietnam.md",
"_posts/2022-04-30-goodbye-thai-khuong.md",
"_posts/2021-12-04-choi.md",
"_posts/2021-09-18-san-pham-cong-dong.md",
"_posts/2021-07-15-an.md"
"_tabs/productions.md",
"_drafts/2024-04-20-coffee.md",
"node_modules/@img/sharp-libvips-darwin-x64/README.md",
"node_modules/sharp/README.md",
"node_modules/sharp/node_modules/semver/README.md",
"node_modules/@emnapi/runtime/README.md",
"node_modules/p-map/readme.md",
"node_modules/detect-libc/README.md",
"node_modules/color/node_modules/color-convert/README.md",
"node_modules/lqip-modern/readme.md",
"node_modules/color/README.md",
"node_modules/simple-swizzle/node_modules/is-arrayish/README.md",
"node_modules/color/node_modules/color-name/README.md",
"node_modules/color-string/README.md",
"node_modules/@img/sharp-darwin-x64/README.md",
"node_modules/color/node_modules/color-convert/CHANGELOG.md",
"node_modules/simple-swizzle/README.md",
"_posts/2024-10-22-what-makes-you-happy.md",
"_posts/2024-10-20-a-year-with-too.md"
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
},
"dependencies": {
"@popperjs/core": "^2.11.8",
"bootstrap": "^5.3.3"
"bootstrap": "^5.3.3",
"lqip-modern": "^2.2.1"
},
"devDependencies": {
"@babel/core": "^7.26.0",
Expand Down
3 changes: 2 additions & 1 deletion tools/lqip/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const lqip = require('lqip-modern');
const fs = require('fs');
const path = require('path');

async function ls(dirPath) {
console.log('starting');
const lqip = (await import('lqip-modern')).default;

const dir = await fs.promises.opendir(dirPath);
for await (const file of dir) {
if (file.name.includes('.webp')) {
Expand Down

0 comments on commit cab192e

Please sign in to comment.