mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
Bump deps (#515)
* chore: add nix flake for reproducible dev environment Signed-off-by: Sped0n <hi@sped0n.com> * refactor: migrate SCSS to modern Sass (@use/@forward) Update mixins to use Sass module functions (map.has-key/get). Configure Vite for modern Sass API. Introduce _foundation.scss for forwarding core modules. Signed-off-by: Sped0n <hi@sped0n.com> * fix: replace deprecated _build with build in frontmatter Signed-off-by: Sped0n <hi@sped0n.com> * chore: add vcache.sh script for vercel build cache management Signed-off-by: Sped0n <hi@sped0n.com> * refactor: migrate to ESLint v9 flat config Remove legacy .eslintrc.json, .eslintignore, and .prettierrc.json. Add eslint.config.mjs with love, prettier, solid, and import rules. Update devDependencies (eslint@9, @typescript-eslint@8, etc.) and scripts. Minor TS fixes: remove eslint-disable, add error logging, simplify conditional. Signed-off-by: Sped0n <hi@sped0n.com> * chore: replace vcache.sh with vercel.sh for Vercel build process Delete vcache.sh script. Add vercel.sh: install Dart Sass v1.93.3, copy generated assets between node_modules and project dirs, run vite:build + hugo build, then copy back. Signed-off-by: Sped0n <hi@sped0n.com> * chore: setup dart-sass and split build steps in GitHub workflow Signed-off-by: Sped0n <hi@sped0n.com> --------- Signed-off-by: Sped0n <hi@sped0n.com>
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
node_modules
|
|
||||||
static
|
|
||||||
exampleSite
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
{
|
|
||||||
"env": {
|
|
||||||
"browser": true,
|
|
||||||
"es2021": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"standard-with-typescript",
|
|
||||||
"prettier",
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:prettier/recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"plugin:solid/typescript"
|
|
||||||
],
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"plugins": ["prettier", "@typescript-eslint", "solid"],
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": "latest",
|
|
||||||
"project": "./tsconfig.json",
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"prettier/prettier": "error",
|
|
||||||
"arrow-body-style": "off",
|
|
||||||
"prefer-arrow-callback": "off",
|
|
||||||
"import/no-cycle": "error",
|
|
||||||
"sort-imports": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"ignoreCase": false,
|
|
||||||
"ignoreDeclarationSort": true,
|
|
||||||
"ignoreMemberSort": true,
|
|
||||||
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
|
|
||||||
"allowSeparatedGroups": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"import/no-unresolved": "error",
|
|
||||||
"import/order": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"groups": [
|
|
||||||
"builtin",
|
|
||||||
"external",
|
|
||||||
"internal",
|
|
||||||
"parent",
|
|
||||||
"sibling",
|
|
||||||
"index",
|
|
||||||
"unknown"
|
|
||||||
],
|
|
||||||
"newlines-between": "always",
|
|
||||||
"alphabetize": {
|
|
||||||
"order": "asc",
|
|
||||||
"caseInsensitive": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"settings": {
|
|
||||||
"import/resolver": {
|
|
||||||
"typescript": {
|
|
||||||
"project": "./tsconfig.json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -55,6 +55,9 @@ jobs:
|
|||||||
hugo-version: '0.114.0'
|
hugo-version: '0.114.0'
|
||||||
extended: true
|
extended: true
|
||||||
|
|
||||||
|
- name: Setup Dart Sass
|
||||||
|
run: sudo snap install dart-sass
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v3
|
uses: pnpm/action-setup@v3
|
||||||
with:
|
with:
|
||||||
@@ -82,7 +85,9 @@ jobs:
|
|||||||
run: pnpm install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm run build
|
run: |
|
||||||
|
pnpm run vite:build
|
||||||
|
hugo --logLevel info --source=exampleSite --gc --minify
|
||||||
|
|
||||||
- name: Push artifacts
|
- name: Push artifacts
|
||||||
if: ${{ (github.event_name == 'push' || github.event.pull_request.merged == true) && needs.filter.outputs.any_changed == 'true' }}
|
if: ${{ (github.event_name == 'push' || github.event.pull_request.merged == true) && needs.filter.outputs.any_changed == 'true' }}
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"useTabs": false,
|
|
||||||
"tabWidth": 2,
|
|
||||||
"printWidth": 88,
|
|
||||||
"singleQuote": true,
|
|
||||||
"trailingComma": "none",
|
|
||||||
"bracketSpacing": true,
|
|
||||||
"semi": false,
|
|
||||||
"plugins": ["prettier-plugin-go-template", "prettier-plugin-organize-imports"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.html"],
|
|
||||||
"options": {
|
|
||||||
"parser": "go-template"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
4
assets/scss/_core/_foundation.scss
Normal file
4
assets/scss/_core/_foundation.scss
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
@forward 'reset';
|
||||||
|
@forward 'font';
|
||||||
|
@forward 'typography';
|
||||||
|
@forward 'mixins';
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@use 'sass:map';
|
||||||
|
|
||||||
$breakpoints: (
|
$breakpoints: (
|
||||||
'mobile': 375px,
|
'mobile': 375px,
|
||||||
'tablet': 768px,
|
'tablet': 768px,
|
||||||
@@ -8,8 +10,8 @@ $breakpoints: (
|
|||||||
// Breakpoints
|
// Breakpoints
|
||||||
|
|
||||||
@mixin min-width($breakpoint) {
|
@mixin min-width($breakpoint) {
|
||||||
@if map-has-key($breakpoints, $breakpoint) {
|
@if map.has-key($breakpoints, $breakpoint) {
|
||||||
@media (min-width: map-get($breakpoints, $breakpoint)) {
|
@media (min-width: map.get($breakpoints, $breakpoint)) {
|
||||||
@content;
|
@content;
|
||||||
}
|
}
|
||||||
} @else {
|
} @else {
|
||||||
@@ -18,8 +20,8 @@ $breakpoints: (
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin max-width($breakpoint) {
|
@mixin max-width($breakpoint) {
|
||||||
@if map-has-key($breakpoints, $breakpoint) {
|
@if map.has-key($breakpoints, $breakpoint) {
|
||||||
@media (max-width: (map-get($breakpoints, $breakpoint) - 1px)) {
|
@media (max-width: (map.get($breakpoints, $breakpoint) - 1px)) {
|
||||||
@content;
|
@content;
|
||||||
}
|
}
|
||||||
} @else {
|
} @else {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@import 'mixins';
|
@use 'mixins' as *;
|
||||||
|
|
||||||
body {
|
body {
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
@use 'sass:map';
|
||||||
|
|
||||||
|
@use '_core/mixins' as *;
|
||||||
|
|
||||||
|
$tablet: map.get($breakpoints, 'tablet') - 1;
|
||||||
|
|
||||||
article {
|
article {
|
||||||
padding: var(--space-standard);
|
padding: var(--space-standard);
|
||||||
max-width: 25em;
|
max-width: 25em;
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
$tablet: map-get($breakpoints, 'tablet') - 1;
|
@use 'sass:map';
|
||||||
|
|
||||||
|
@use '_core/mixins' as *;
|
||||||
|
|
||||||
|
$tablet: map.get($breakpoints, 'tablet') - 1;
|
||||||
|
|
||||||
@media (max-width: $tablet), (hover: none) {
|
@media (max-width: $tablet), (hover: none) {
|
||||||
.container {
|
.container {
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
$tablet: map-get($breakpoints, 'tablet') - 1;
|
@use 'sass:map';
|
||||||
|
|
||||||
|
@use '_core/mixins' as *;
|
||||||
|
|
||||||
|
$tablet: map.get($breakpoints, 'tablet') - 1;
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
@import '_core/mixins';
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--window-height: 100vh;
|
--window-height: 100vh;
|
||||||
--nav-height: 2rem;
|
--nav-height: 2rem;
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
|
||||||
@import '_core/reset';
|
@use '_core/foundation';
|
||||||
@import '_core/font';
|
@use '_variables';
|
||||||
@import '_core/typography';
|
@use '_core/base';
|
||||||
@import '_core/mixins';
|
|
||||||
@import '_variables';
|
|
||||||
@import '_core/base';
|
|
||||||
|
|
||||||
@import '_partial/nav';
|
@use '_partial/nav';
|
||||||
@import '_partial/article';
|
@use '_partial/article';
|
||||||
@import '_partial/container';
|
@use '_partial/container';
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
|
||||||
@import '_partial/customCursor';
|
@use '_partial/customCursor';
|
||||||
@import '_partial/stage';
|
@use '_partial/stage';
|
||||||
@import '_partial/stageNav';
|
@use '_partial/stageNav';
|
||||||
|
@use '_partial/collection';
|
||||||
|
@use '_partial/gallery';
|
||||||
|
|
||||||
@import '_partial/collection';
|
@use '../../node_modules/swiper/swiper.css';
|
||||||
@import '_partial/gallery';
|
|
||||||
|
|
||||||
@import 'node_modules/swiper/swiper.scss';
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// eslint-disable-next-line sort-imports
|
|
||||||
import { Show, createMemo, createSignal, type JSX } from 'solid-js'
|
import { Show, createMemo, createSignal, type JSX } from 'solid-js'
|
||||||
|
|
||||||
import type { ImageJSON } from '../resources'
|
import type { ImageJSON } from '../resources'
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export default function Stage(props: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onClick: () => void = () => {
|
const onClick: () => void = () => {
|
||||||
!props.isAnimating() && props.setIsOpen(true)
|
if (!props.isAnimating()) props.setIsOpen(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
const setPosition: () => void = () => {
|
const setPosition: () => void = () => {
|
||||||
@@ -422,7 +422,6 @@ export default function Stage(props: {
|
|||||||
.catch(() => {
|
.catch(() => {
|
||||||
void 0
|
void 0
|
||||||
})
|
})
|
||||||
// eslint-disable-next-line solid/reactivity
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// abort controller for cleanup
|
// abort controller for cleanup
|
||||||
abortController?.abort()
|
abortController?.abort()
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ export async function getImageJSON(): Promise<ImageJSON[]> {
|
|||||||
}
|
}
|
||||||
return 1
|
return 1
|
||||||
})
|
})
|
||||||
} catch (_) {
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ menu:
|
|||||||
identifier: Erwitt
|
identifier: Erwitt
|
||||||
title: Erwitt
|
title: Erwitt
|
||||||
unifiedAlt: '© Elliott Erwitt'
|
unifiedAlt: '© Elliott Erwitt'
|
||||||
_build:
|
build:
|
||||||
publishResources: false
|
publishResources: false
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|||||||
80
eslint.config.mjs
Normal file
80
eslint.config.mjs
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
import { default as eslint, default as js } from '@eslint/js'
|
||||||
|
import tsParser from '@typescript-eslint/parser'
|
||||||
|
import love from 'eslint-config-love'
|
||||||
|
import importPlugin from 'eslint-plugin-import'
|
||||||
|
import prettier from 'eslint-plugin-prettier/recommended'
|
||||||
|
import solid from 'eslint-plugin-solid/configs/recommended'
|
||||||
|
import { defineConfig, globalIgnores } from 'eslint/config'
|
||||||
|
import tseslint from 'typescript-eslint'
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
js.configs.recommended,
|
||||||
|
eslint.configs.recommended,
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
importPlugin.flatConfigs.recommended,
|
||||||
|
solid,
|
||||||
|
globalIgnores(['**/node_modules', '**/static', '**/exampleSite', '*.mjs']),
|
||||||
|
{
|
||||||
|
...love,
|
||||||
|
...prettier,
|
||||||
|
|
||||||
|
languageOptions: {
|
||||||
|
parser: tsParser,
|
||||||
|
ecmaVersion: 'latest',
|
||||||
|
sourceType: 'module',
|
||||||
|
|
||||||
|
parserOptions: {
|
||||||
|
project: './tsconfig.json'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
settings: {
|
||||||
|
'import/resolver': {
|
||||||
|
typescript: {
|
||||||
|
project: './tsconfig.json'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
rules: {
|
||||||
|
'prettier/prettier': 'error',
|
||||||
|
'arrow-body-style': 'off',
|
||||||
|
'prefer-arrow-callback': 'off',
|
||||||
|
'import/no-cycle': 'error',
|
||||||
|
|
||||||
|
'sort-imports': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
ignoreCase: false,
|
||||||
|
ignoreDeclarationSort: true,
|
||||||
|
ignoreMemberSort: true,
|
||||||
|
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
||||||
|
allowSeparatedGroups: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
'import/no-unresolved': 'error',
|
||||||
|
|
||||||
|
'import/order': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
groups: [
|
||||||
|
'builtin',
|
||||||
|
'external',
|
||||||
|
'internal',
|
||||||
|
'parent',
|
||||||
|
'sibling',
|
||||||
|
'index',
|
||||||
|
'unknown'
|
||||||
|
],
|
||||||
|
'newlines-between': 'always',
|
||||||
|
|
||||||
|
alphabetize: {
|
||||||
|
order: 'asc',
|
||||||
|
caseInsensitive: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
@@ -8,6 +8,6 @@ menu:
|
|||||||
identifier: Erwitt
|
identifier: Erwitt
|
||||||
title: Erwitt
|
title: Erwitt
|
||||||
unifiedAlt: '© Elliott Erwitt'
|
unifiedAlt: '© Elliott Erwitt'
|
||||||
_build:
|
build:
|
||||||
publishResources: false
|
publishResources: false
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ menu:
|
|||||||
identifier: Gruyaert
|
identifier: Gruyaert
|
||||||
title: Gruyaert
|
title: Gruyaert
|
||||||
unifiedAlt: '© Harry Gruyaert'
|
unifiedAlt: '© Harry Gruyaert'
|
||||||
_build:
|
build:
|
||||||
publishResources: false
|
publishResources: false
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ menu:
|
|||||||
identifier: Info
|
identifier: Info
|
||||||
title: Info
|
title: Info
|
||||||
unifiedAlt: ''
|
unifiedAlt: ''
|
||||||
_build:
|
build:
|
||||||
publishResources: false
|
publishResources: false
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ menu:
|
|||||||
identifier: Webb
|
identifier: Webb
|
||||||
title: Webb
|
title: Webb
|
||||||
unifiedAlt: '© Alex Webb'
|
unifiedAlt: '© Alex Webb'
|
||||||
_build:
|
build:
|
||||||
publishResources: false
|
publishResources: false
|
||||||
---
|
---
|
||||||
|
|||||||
25
flake.lock
generated
Normal file
25
flake.lock
generated
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1762596750,
|
||||||
|
"narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=",
|
||||||
|
"rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e",
|
||||||
|
"revCount": 891611,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.891611%2Brev-b6a8526db03f735b89dd5ff348f53f752e7ddc8e/019a684c-ea63-75fd-99cc-3b869954e5f9/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
38
flake.nix
Normal file
38
flake.nix
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
description = "bridget";
|
||||||
|
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
|
||||||
|
outputs =
|
||||||
|
{ self, ... }@inputs:
|
||||||
|
let
|
||||||
|
supportedSystems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
forEachSupportedSystem =
|
||||||
|
f:
|
||||||
|
inputs.nixpkgs.lib.genAttrs supportedSystems (
|
||||||
|
system:
|
||||||
|
f {
|
||||||
|
pkgs = import inputs.nixpkgs { inherit system; };
|
||||||
|
}
|
||||||
|
);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells = forEachSupportedSystem (
|
||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
default = pkgs.mkShellNoCC {
|
||||||
|
packages = with pkgs; [
|
||||||
|
nodejs
|
||||||
|
nodePackages.pnpm
|
||||||
|
dart-sass
|
||||||
|
hugo
|
||||||
|
go
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{{/* critical style */}}
|
{{/* critical style */}}
|
||||||
{{- $style := dict "Source" "scss/critical.scss" "Fingerprint" $fingerprint -}}
|
{{- $style := dict "Source" "scss/critical.scss" "Fingerprint" $fingerprint -}}
|
||||||
{{- $options := dict "enableSourceMap" true "includePaths" (slice "node_modules") -}}
|
{{- $options := dict "enableSourceMap" true "includePaths" (slice "node_modules") "transpiler" "dartsass" -}}
|
||||||
{{- $style = dict "Context" . "ToCSS" $options "Inline" true | merge $style -}}
|
{{- $style = dict "Context" . "ToCSS" $options "Inline" true | merge $style -}}
|
||||||
{{- partial "plugin/style.html" $style -}}
|
{{- partial "plugin/style.html" $style -}}
|
||||||
|
|
||||||
|
|||||||
27
package.json
27
package.json
@@ -7,14 +7,14 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"vite": "vite build --no-watch",
|
"vite": "DISABLE_WATCH=1 vite build",
|
||||||
"lint": "eslint . --fix && prettier --write .",
|
"lint": "eslint . --fix && prettier --write .",
|
||||||
"lint:check": "eslint . && prettier . --check",
|
"lint:check": "eslint . && prettier . --check",
|
||||||
"dev": "run-p vite:dev hugo:dev",
|
"dev": "run-p vite:dev hugo:dev",
|
||||||
"build": "run-s vite:build hugo:build",
|
"build": "run-s vite:build hugo:build",
|
||||||
"server": "run-p vite:server hugo:server",
|
"server": "run-p vite:server hugo:server",
|
||||||
"vite:build": "vite build --no-watch --minify terser",
|
"vite:build": "DISABLE_WATCH=1 vite build",
|
||||||
"vite:server": "vite build --minify terser",
|
"vite:server": "vite build",
|
||||||
"vite:dev": "vite build --mode development --minify false",
|
"vite:dev": "vite build --mode development --minify false",
|
||||||
"hugo:build": "hugo --logLevel info --source=exampleSite --gc",
|
"hugo:build": "hugo --logLevel info --source=exampleSite --gc",
|
||||||
"hugo:preview": "hugo --logLevel info --source=exampleSite -D --gc",
|
"hugo:preview": "hugo --logLevel info --source=exampleSite -D --gc",
|
||||||
@@ -39,32 +39,29 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/Sped0n/bridget#readme",
|
"homepage": "https://github.com/Sped0n/bridget#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
"@types/node": "^24.10.0",
|
||||||
"@typescript-eslint/parser": "^6.21.0",
|
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
||||||
"eslint": "^8.57.0",
|
"@typescript-eslint/parser": "^8.46.4",
|
||||||
|
"eslint": "^9.39.1",
|
||||||
|
"eslint-config-love": "^133.0.0",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-config-standard": "^17.1.0",
|
|
||||||
"eslint-config-standard-with-typescript": "^43.0.1",
|
|
||||||
"eslint-import-resolver-typescript": "^4.4.4",
|
"eslint-import-resolver-typescript": "^4.4.4",
|
||||||
"eslint-plugin-import": "^2.32.0",
|
"eslint-plugin-import": "^2.32.0",
|
||||||
"eslint-plugin-n": "^16.6.2",
|
|
||||||
"eslint-plugin-prettier": "^5.5.4",
|
"eslint-plugin-prettier": "^5.5.4",
|
||||||
"eslint-plugin-promise": "^6.6.0",
|
|
||||||
"eslint-plugin-solid": "^0.14.5",
|
"eslint-plugin-solid": "^0.14.5",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"prettier": "3.6.2",
|
"prettier": "3.6.2",
|
||||||
"prettier-plugin-go-template": "^0.0.15",
|
"prettier-plugin-go-template": "^0.0.15",
|
||||||
"prettier-plugin-organize-imports": "^4.3.0",
|
"prettier-plugin-organize-imports": "^4.3.0",
|
||||||
"sass": "^1.83.1",
|
"sass": "^1.94.0",
|
||||||
"terser": "^5.44.0",
|
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"vite": "^5.4.21",
|
"vite": "^7.2.2",
|
||||||
"vite-plugin-solid": "^2.11.10"
|
"vite-plugin-solid": "^2.11.10"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"gsap": "^3.13.0",
|
"gsap": "^3.13.0",
|
||||||
"solid-js": "^1.9.9",
|
"solid-js": "^1.9.10",
|
||||||
"swiper": "^11.1.15",
|
"swiper": "^12.0.3",
|
||||||
"tiny-invariant": "^1.3.3"
|
"tiny-invariant": "^1.3.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1740
pnpm-lock.yaml
generated
1740
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
23
prettier.config.mjs
Normal file
23
prettier.config.mjs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* @see https://prettier.io/docs/configuration
|
||||||
|
* @type {import("prettier").Config}
|
||||||
|
*/
|
||||||
|
const config = {
|
||||||
|
useTabs: false,
|
||||||
|
tabWidth: 2,
|
||||||
|
printWidth: 88,
|
||||||
|
singleQuote: true,
|
||||||
|
trailingComma: 'none',
|
||||||
|
bracketSpacing: true,
|
||||||
|
semi: false,
|
||||||
|
plugins: ['prettier-plugin-go-template', 'prettier-plugin-organize-imports'],
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['*.html'],
|
||||||
|
options: {
|
||||||
|
parser: 'go-template'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
export default config
|
||||||
@@ -11,7 +11,8 @@
|
|||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"jsxImportSource": "solid-js"
|
"jsxImportSource": "solid-js",
|
||||||
|
"types": ["node"]
|
||||||
},
|
},
|
||||||
"$schema": "https://json.schemastore.org/tsconfig",
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
"display": "Recommended"
|
"display": "Recommended"
|
||||||
|
|||||||
50
vercel.sh
Executable file
50
vercel.sh
Executable file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
node_modules_generated_dir="./node_modules/exampleSite/resources/_gen"
|
||||||
|
project_generated_dir="./exampleSite/resources/_gen"
|
||||||
|
dart_sass_version="1.93.3"
|
||||||
|
dart_sass_install_dir="${HOME}/.local/dart-sass"
|
||||||
|
dart_sass_tarball="dart-sass-${dart_sass_version}-linux-x64.tar.gz"
|
||||||
|
dart_sass_download_url="https://github.com/sass/dart-sass/releases/download/${dart_sass_version}/${dart_sass_tarball}"
|
||||||
|
|
||||||
|
install_dart_sass() {
|
||||||
|
echo "Installing Dart Sass ${dart_sass_version}..."
|
||||||
|
mkdir -p "${HOME}/.local"
|
||||||
|
curl -sSLO "${dart_sass_download_url}"
|
||||||
|
rm -rf "${dart_sass_install_dir}"
|
||||||
|
tar -C "${HOME}/.local" -xf "${dart_sass_tarball}"
|
||||||
|
rm -f "${dart_sass_tarball}"
|
||||||
|
export PATH="${dart_sass_install_dir}:${PATH}"
|
||||||
|
}
|
||||||
|
|
||||||
|
copy_generated_assets_to_project() {
|
||||||
|
if [ -d "${node_modules_generated_dir}" ]; then
|
||||||
|
rm -rf "${project_generated_dir}"
|
||||||
|
mkdir -p "${project_generated_dir}"
|
||||||
|
cp -a "${node_modules_generated_dir}/." "${project_generated_dir}"
|
||||||
|
echo "Copied '${node_modules_generated_dir}' to '${project_generated_dir}'."
|
||||||
|
else
|
||||||
|
echo "Source '${node_modules_generated_dir}' not found, skipping copy to project."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
run_site_build() {
|
||||||
|
pnpm run vite:build && hugo --logLevel info --source=exampleSite --gc --minify
|
||||||
|
}
|
||||||
|
|
||||||
|
copy_generated_assets_to_node_modules() {
|
||||||
|
rm -rf "${node_modules_generated_dir}"
|
||||||
|
if [ -d "${project_generated_dir}" ]; then
|
||||||
|
mkdir -p "${node_modules_generated_dir}"
|
||||||
|
cp -a "${project_generated_dir}/." "${node_modules_generated_dir}"
|
||||||
|
echo "Copied '${project_generated_dir}' back to '${node_modules_generated_dir}'."
|
||||||
|
else
|
||||||
|
echo "Source '${project_generated_dir}' not found, skipping copy to node_modules."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install_dart_sass
|
||||||
|
copy_generated_assets_to_project
|
||||||
|
run_site_build
|
||||||
|
copy_generated_assets_to_node_modules
|
||||||
@@ -5,9 +5,11 @@ export default defineConfig({
|
|||||||
plugins: [solidPlugin()],
|
plugins: [solidPlugin()],
|
||||||
build: {
|
build: {
|
||||||
outDir: './static/bundled',
|
outDir: './static/bundled',
|
||||||
watch: {
|
watch: process.env.DISABLE_WATCH
|
||||||
include: 'assets/**'
|
? null
|
||||||
},
|
: {
|
||||||
|
include: 'assets/**'
|
||||||
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: './assets/ts/main.tsx',
|
input: './assets/ts/main.tsx',
|
||||||
output: {
|
output: {
|
||||||
@@ -17,13 +19,12 @@ export default defineConfig({
|
|||||||
assetFileNames: '[ext]/[name].[ext]',
|
assetFileNames: '[ext]/[name].[ext]',
|
||||||
compact: true
|
compact: true
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
terserOptions: {
|
},
|
||||||
compress: {
|
css: {
|
||||||
passes: 3
|
preprocessorOptions: {
|
||||||
},
|
scss: {
|
||||||
output: {
|
api: 'modern'
|
||||||
comments: false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user