add pre-commit hook

This commit is contained in:
Dmitriy Pleshevskiy 2024-07-25 16:59:34 +03:00
parent f852f2da41
commit f75ed3d2f6
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2
24 changed files with 109 additions and 95 deletions

View file

@ -14,3 +14,6 @@ dev:
deps:
pnpm install
init-git-hooks:
ln -sf $(PWD)/scripts/pre-commit $(PWD)/.git/hooks/pre-commit

12
dist/404.html vendored
View file

@ -31,13 +31,13 @@
document.documentElement.dataset.theme = 'dark'
}
</script>
<meta property="og:url" content="https://pleshevski.ru/404.html"><meta property="og:site_name" content="Дмитрий Плешевский"><meta property="og:description" content="404 Not Found"><meta property="og:type" content="website"><meta property="og:locale" content="ru-RU"><script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"","description":"404 Not Found"}</script><title>Дмитрий Плешевский</title><meta name="description" content="404 Not Found">
<link rel="preload" href="/assets/style-BnNdFOI8.css" as="style"><link rel="stylesheet" href="/assets/style-BnNdFOI8.css">
<link rel="modulepreload" href="/assets/app-CYZ52EDj.js"><link rel="modulepreload" href="/assets/404.html-hyU35sNZ.js">
<link rel="prefetch" href="/assets/index.html-DXVRt_Wz.js" as="script"><link rel="prefetch" href="/assets/works.html-Dh8HOvXG.js" as="script"><link rel="prefetch" href="/assets/index.html-Bbif8C5G.js" as="script"><link rel="prefetch" href="/assets/works.html-B352zyqn.js" as="script">
<meta property="og:url" content="https://pleshevski.ru/404.html"><meta property="og:site_name" content="Дмитрий Плешевский"><meta property="og:type" content="website"><meta property="og:locale" content="ru-RU"><script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":""}</script><title>Дмитрий Плешевский</title><meta name="description" content=" ">
<link rel="preload" href="/assets/style-LjaJbYtv.css" as="style"><link rel="stylesheet" href="/assets/style-LjaJbYtv.css">
<link rel="modulepreload" href="/assets/app-DVhfb_AK.js"><link rel="modulepreload" href="/assets/404.html-BY7PcDFN.js">
<link rel="prefetch" href="/assets/index.html-Dey18qa3.js" as="script"><link rel="prefetch" href="/assets/works.html-D_1XWu_F.js" as="script"><link rel="prefetch" href="/assets/index.html-CFkWDF7K.js" as="script"><link rel="prefetch" href="/assets/works.html-D_SQDS1j.js" as="script">
</head>
<body>
<div id="app"><!--[--><div class="vp-theme-container" data-v-99131a8e><main class="page" data-v-99131a8e><div class="theme-default-content" data-v-99131a8e><h1 data-v-99131a8e>404</h1><blockquote data-v-99131a8e>Мы потеряли страницу...</blockquote><a class="route-link" href="/" data-v-99131a8e>Вернуться на главную</a></div></main></div><!--[--><!----><!--]--><!--]--></div>
<script type="module" src="/assets/app-CYZ52EDj.js" defer></script>
<div id="app"><!--[--><div class="vp-theme-container" data-v-99131a8e><main class="page" data-v-99131a8e><div class="theme-default-content" data-v-99131a8e><h1 data-v-99131a8e>404</h1><blockquote data-v-99131a8e>Верните страницу!</blockquote><a class="route-link" href="/" data-v-99131a8e>Вернуться на главную</a></div></main></div><!--[--><!----><!--]--><!--]--></div>
<script type="module" src="/assets/app-DVhfb_AK.js" defer></script>
</body>
</html>

1
dist/assets/404.html-BY7PcDFN.js vendored Normal file
View file

@ -0,0 +1 @@
import{_ as t,c as e,o,a}from"./app-DVhfb_AK.js";const n={},r=a("p",null,"404 Not Found",-1),c=[r];function s(l,p){return o(),e("div",null,c)}const i=t(n,[["render",s],["__file","404.html.vue"]]),m=JSON.parse('{"path":"/404.html","title":"","lang":"ru-RU","frontmatter":{"layout":"NotFound","head":[["meta",{"property":"og:url","content":"https://pleshevski.ru/404.html"}],["meta",{"property":"og:site_name","content":"Дмитрий Плешевский"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"ru-RU"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"\\"}"]]},"headers":[],"git":{},"filePathRelative":null}');export{i as comp,m as data};

View file

@ -1 +0,0 @@
import{_ as t,c as e,o,a as n}from"./app-CYZ52EDj.js";const r={},a=n("p",null,"404 Not Found",-1),c=[a];function s(p,l){return o(),e("div",null,c)}const d=t(r,[["render",s],["__file","404.html.vue"]]),m=JSON.parse('{"path":"/404.html","title":"","lang":"ru-RU","frontmatter":{"layout":"NotFound","description":"404 Not Found","head":[["meta",{"property":"og:url","content":"https://pleshevski.ru/404.html"}],["meta",{"property":"og:site_name","content":"Дмитрий Плешевский"}],["meta",{"property":"og:description","content":"404 Not Found"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"ru-RU"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"\\",\\"description\\":\\"404 Not Found\\"}"]]},"headers":[],"git":{},"autoDesc":true,"filePathRelative":null}');export{d as comp,m as data};

File diff suppressed because one or more lines are too long

30
dist/assets/app-DVhfb_AK.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/assets/index.html-CFkWDF7K.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/assets/index.html-Dey18qa3.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/assets/style-LjaJbYtv.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

12
dist/eng/index.html vendored

File diff suppressed because one or more lines are too long

12
dist/eng/works.html vendored

File diff suppressed because one or more lines are too long

12
dist/index.html vendored

File diff suppressed because one or more lines are too long

2
dist/sitemap.xml vendored
View file

@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/sitemap.xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://pleshevski.ru/</loc><lastmod>2024-07-24T23:27:03.000Z</lastmod><changefreq>daily</changefreq><xhtml:link rel="alternate" hreflang="ru-RU" href="https://pleshevski.ru/"/><xhtml:link rel="alternate" hreflang="en-US" href="https://pleshevski.ru/eng/"/></url><url><loc>https://pleshevski.ru/works.html</loc><lastmod>2024-07-24T14:15:05.000Z</lastmod><changefreq>daily</changefreq><xhtml:link rel="alternate" hreflang="ru-RU" href="https://pleshevski.ru/works.html"/><xhtml:link rel="alternate" hreflang="en-US" href="https://pleshevski.ru/eng/works.html"/></url><url><loc>https://pleshevski.ru/eng/</loc><lastmod>2024-07-24T23:27:03.000Z</lastmod><changefreq>daily</changefreq><xhtml:link rel="alternate" hreflang="ru-RU" href="https://pleshevski.ru/"/><xhtml:link rel="alternate" hreflang="en-US" href="https://pleshevski.ru/eng/"/></url><url><loc>https://pleshevski.ru/eng/works.html</loc><lastmod>2024-07-24T14:15:05.000Z</lastmod><changefreq>daily</changefreq><xhtml:link rel="alternate" hreflang="ru-RU" href="https://pleshevski.ru/works.html"/><xhtml:link rel="alternate" hreflang="en-US" href="https://pleshevski.ru/eng/works.html"/></url></urlset>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://pleshevski.ru/</loc><lastmod>2024-07-25T12:12:09.000Z</lastmod><changefreq>monthly</changefreq><xhtml:link rel="alternate" hreflang="ru-RU" href="https://pleshevski.ru/"/><xhtml:link rel="alternate" hreflang="en-US" href="https://pleshevski.ru/eng/"/></url><url><loc>https://pleshevski.ru/works.html</loc><lastmod>2024-07-25T12:12:09.000Z</lastmod><changefreq>monthly</changefreq><xhtml:link rel="alternate" hreflang="ru-RU" href="https://pleshevski.ru/works.html"/><xhtml:link rel="alternate" hreflang="en-US" href="https://pleshevski.ru/eng/works.html"/></url><url><loc>https://pleshevski.ru/eng/</loc><lastmod>2024-07-25T12:12:09.000Z</lastmod><changefreq>monthly</changefreq><xhtml:link rel="alternate" hreflang="ru-RU" href="https://pleshevski.ru/"/><xhtml:link rel="alternate" hreflang="en-US" href="https://pleshevski.ru/eng/"/></url><url><loc>https://pleshevski.ru/eng/works.html</loc><lastmod>2024-07-25T12:12:09.000Z</lastmod><changefreq>monthly</changefreq><xhtml:link rel="alternate" hreflang="ru-RU" href="https://pleshevski.ru/works.html"/><xhtml:link rel="alternate" hreflang="en-US" href="https://pleshevski.ru/eng/works.html"/></url></urlset>

12
dist/works.html vendored

File diff suppressed because one or more lines are too long

View file

@ -32,6 +32,7 @@
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
pre-commit
nodejs_22
gnumake
pnpm

View file

@ -1,23 +1,6 @@
{
"name": "pleshevskiy",
"version": "0.0.1",
"description": "Dmitriy Pleshevskiy",
"license": "MIT",
"type": "module",
"scripts": {
"docs:build": "vuepress build docs",
"docs:clean-dev": "vuepress dev docs --clean-cache",
"docs:dev": "vuepress dev docs",
"docs:update-package": "pnpm dlx vp-update"
},
"devDependencies": {
"@vuepress/bundler-vite": "^2.0.0-rc.7",
"@vuepress/plugin-blog": "^2.0.0-rc.11",
"@vuepress/plugin-redirect": "2.0.0-rc.8",
"@vuepress/theme-default": "^2.0.0-rc.11",
"vue": "^3.4.0",
"vuepress": "^2.0.0-rc.7",
"@rushstack/eslint-patch": "^1.1.4",
"@types/node": "^20.14.2",
"@vitejs/plugin-vue": "^4.0.0",
@ -26,11 +9,27 @@
"@vue/language-server": "^2.0.19",
"@vue/tsconfig": "^0.5.1",
"@vue/typescript-plugin": "^2.0.19",
"@vuepress/bundler-vite": "^2.0.0-rc.7",
"@vuepress/plugin-blog": "^2.0.0-rc.11",
"@vuepress/plugin-redirect": "2.0.0-rc.8",
"@vuepress/theme-default": "^2.0.0-rc.11",
"eslint": "<9.0.0",
"eslint-plugin-cypress": "^3.3.0",
"eslint-plugin-vue": "^9.14.1",
"prettier": ">=3.0.0",
"typescript": "~5.4.5",
"vue-tsc": "^1.6.0"
}
"vue": "^3.4.0",
"vue-tsc": "^1.6.0",
"vuepress": "^2.0.0-rc.7"
},
"license": "MIT",
"name": "pleshevskiy",
"scripts": {
"docs:build": "vuepress build docs",
"docs:clean-dev": "vuepress dev docs --clean-cache",
"docs:dev": "vuepress dev docs",
"docs:update-package": "pnpm dlx vp-update"
},
"type": "module",
"version": "0.0.1"
}

13
scripts/pre-commit Executable file
View file

@ -0,0 +1,13 @@
#! /usr/bin/env bash
# Can be used as a pre-commit hook
# Just symlink this file to .git/hooks/pre-commit
set -xe
if [ ! -z $(git diff --cached --name-only | grep "^docs/") ]
then
make build
git add dist
fi

View file

@ -1,11 +1,11 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "docs/**/*", "docs/**/*.vue"],
"compilerOptions": {
"composite": true,
"baseUrl": ".",
"composite": true,
"paths": {
"@/*": ["./docs/*"]
}
}
},
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "docs/**/*", "docs/**/*.vue"]
}