Welcome, Prettier.

This commit is contained in:
2025-03-31 15:51:57 -07:00
parent bf419426cf
commit e7aba82655
5 changed files with 112 additions and 46 deletions

48
.prettierrc Normal file
View File

@ -0,0 +1,48 @@
{
"singleQuote": false,
"tabWidth": 2,
"useTabs": false,
"htmlWhitespaceSensitivity": "ignore",
"overrides": [
{
"files": "*.html",
"options": {
"tabWidth": 2,
"useTabs": false
}
},
{
"files": "*.scss",
"options": {
"tabWidth": 2,
"useTabs": false
}
},
{
"files": "*.json",
"options": {
"tabWidth": 2,
"useTabs": false
}
},
{
"files": "*.svelte",
"options": {
"tabWidth": 2,
"useTabs": false
}
},
{
"files": "*.js",
"options": {
"useTabs": true
}
},
{
"files": "*.ts",
"options": {
"useTabs": true
}
}
]
}

View File

@ -1,4 +1,5 @@
# Colormatic Website
[colormatic.org](https://colormatic.org)
This project uses SvelteKit along with TypeScript and Sass. It's configured for static site generation (SSG) and prerendering at compile time to create a simple static website for Nginx to serve, with very little client-side rendering (CSR).
@ -6,22 +7,37 @@ This project uses SvelteKit along with TypeScript and Sass. It's configured for
The Colormatic website is developed with accordance to modern web standards, however a legacy website will be available in the future for older/less capable browsers.
To download the project, run:
```
git clone git@git.colormatic.org:ColormaticStudios/Colormatic-Website.git
cd Colormatic-Website
npm install
```
You can run the project locally with:
```
npm run dev
```
Or you can build the project for release with:
```
npm run build
```
After the project has been built, you can preview the release build with:
```
npm run preview
```
Bootstrap Icons are licensed under the [MIT](https://opensource.org/license/MIT) license.
Before submitting a push or pull request, run:
```
npm run format
```
To format your code according to the project code format. Remember to never fight the formatter.
[Bootstrap Icons](https://icons.getbootstrap.com/) are licensed under the [MIT](https://opensource.org/license/MIT) license.

View File

@ -1,26 +1,28 @@
{
"name": "colormatic-website",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"sass": "^1.83.4",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^6.0.0"
},
"dependencies": {
"bootstrap-icons": "^1.11.3"
}
"name": "colormatic-website",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"format": "prettier -w .",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"prettier": "^3.5.3",
"sass": "^1.83.4",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^6.0.0"
},
"dependencies": {
"bootstrap-icons": "^1.11.3"
}
}

View File

@ -1,20 +1,20 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true
}
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true
}
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}

View File

@ -1,6 +1,6 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [sveltekit()]
plugins: [sveltekit()],
});