Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://EditorConfig.org

# top-most EditorConfig file
root = true

[*.{js,jsx,ts,tsx,json,astro}]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ check-sequential: clean-reports ## check each font file quality
lint: ## check code quality
$(VENV) ruff check $(SCRIPTS_DIR)/
$(VENV) pylint $(SCRIPTS_DIR)/
cd preview; pnpm eslint 'src/**/*.{svlete,ts}'
cd preview; pnpm astro-check

.PHONY: preview
preview: ## show CLI special symbols preview
Expand Down
11 changes: 0 additions & 11 deletions preview/.editorconfig

This file was deleted.

225 changes: 0 additions & 225 deletions preview/.eslintrc

This file was deleted.

42 changes: 21 additions & 21 deletions preview/.gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# Logs
logs
*.log
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local
.vite

public/*
!public/.gitkeep
# environment variables
.env
.env.production

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
# macOS-specific files
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# jetbrains setting folder
.idea/

# fonts
public/fonts

4 changes: 4 additions & 0 deletions preview/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions preview/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
14 changes: 14 additions & 0 deletions preview/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// @ts-check
import { defineConfig } from 'astro/config';
import { fileLinker } from './font-linker.mjs';

const FONTS_SOURCE = '../build/variable'
const FONTS_TARGET = './public/fonts'


// https://astro.build/config
export default defineConfig({
integrations: [
fileLinker(FONTS_SOURCE, FONTS_TARGET)
],
});
25 changes: 25 additions & 0 deletions preview/font-linker.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// @ts-check

import { execSync } from "node:child_process"

/**
*
* @param {string} sourceDir
* @param {string} targetDir
* @returns {import('astro').AstroIntegration}
*/
export function fileLinker(sourceDir, targetDir) {
const linkFiles = () => {
execSync(`rm -rf "${targetDir}"`)
execSync(`mkdir "${targetDir}"`)
execSync(`ln "${sourceDir}"/* "${targetDir}"`)
}

return {
name: 'fileLinker',
hooks: {
'astro:build:setup': linkFiles,
'astro:server:setup': linkFiles
}
}
}
12 changes: 0 additions & 12 deletions preview/index.html

This file was deleted.

Loading
Loading