Initial commit for CI pipeline test.

This commit is contained in:
2025-03-11 10:18:15 -05:00
commit 1dd8c8b623
19 changed files with 2663 additions and 0 deletions

23
.gitignore vendored Normal file
View File

@@ -0,0 +1,23 @@
node_modules
# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build
# OS
.DS_Store
Thumbs.db
# Env
.env
.env.*
!.env.example
!.env.test
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
engine-strict=true

43
.woodpecker.yml Normal file
View File

@@ -0,0 +1,43 @@
steps:
build-and-push:
image: woodpeckerci/plugin-docker-buildx
settings:
username:
from_secret: REGISTRY_USERNAME
password:
from_secret: REGISTRY_PASSWORD
registry: registry.binderlab.io
repo: registry.binderlab.io/harbormaster-client
tags: latest
file: docker/Dockerfile
context: .
push: true
when:
event: manual
deploy-static-site:
image: appleboy/drone-ssh
environment:
REGISTRY_USERNAME:
from_secret: REGISTRY_USERNAME
REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD
DEPLOY_PATH:
from_secret: DEPLOY_PATH
settings:
host: binderlab.io
username: binderb
envs:
- REGISTRY_USERNAME
- REGISTRY_PASSWORD
- DEPLOY_PATH
key:
from_secret: SSH_PRIVATE_KEY
script:
- echo "$REGISTRY_PASSWORD" | docker login registry.binderlab.io --username "$REGISTRY_USERNAME" --password-stdin
- docker pull registry.binderlab.io/harbormaster-client:latest
- docker create --name temp-harbormaster-client registry.binderlab.io/harbormaster-client:latest
- docker cp temp-harbormaster-client:/build /var/www/harbormaster-client
- docker rm temp-harbormaster-client
when:
event: manual

38
README.md Normal file
View File

@@ -0,0 +1,38 @@
# sv
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
## Creating a project
If you're seeing this, you've probably already done this step. Congrats!
```bash
# create a new project in the current directory
npx sv create
# create a new project in my-app
npx sv create my-app
```
## Developing
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
To create a production version of your app:
```bash
npm run build
```
You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.

23
docker/Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM node:18-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package.json and install dependencies
COPY package.json package-lock.json ./
RUN npm ci
# Copy the rest of the app and build
COPY . .
RUN npm run build
# Stage 2: Minimal image for exporting build artifacts
FROM alpine:latest
# Set working directory for output
WORKDIR /output
# Copy the built files from the builder stage
COPY --from=builder /app/build .
# No CMD because this image is just used to extract build files

36
eslint.config.js Normal file
View File

@@ -0,0 +1,36 @@
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';
const gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url));
export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
ignores: ["eslint.config.js", "svelte.config.js"],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);

41
package.json Normal file
View File

@@ -0,0 +1,41 @@
{
"name": "harbormaster-client",
"private": true,
"version": "0.0.1",
"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",
"lint": "eslint ."
},
"devDependencies": {
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.18.0",
"@sveltejs/adapter-auto": "^4.0.0",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"eslint": "^9.18.0",
"eslint-plugin-svelte": "^3.0.0",
"globals": "^16.0.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^6.0.0"
},
"pnpm": {
"onlyBuiltDependencies": [
"esbuild"
]
},
"dependencies": {
"@fontsource/noto-sans-symbols": "^5.2.5"
}
}

2348
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

23
src/app.css Normal file
View File

@@ -0,0 +1,23 @@
@import 'tailwindcss';
@import '@fontsource/noto-sans-symbols/400.css';
@import '@fontsource/noto-sans-symbols/700.css';
:root {
--seafoam: 131, 255, 205;
--skyblue: 136, 213, 254;
--green: 96, 179, 105;
}
@theme {
--color-seafoam: rgb(var(--seafoam));
--color-skyblue: rgb(var(--skyblue));
--color-green: rgb(var(--green));
--font-noto: 'Noto Sans Symbols', sans-serif;
}
body {
height: 100vh;
background-image: linear-gradient(to bottom, rgb(var(--skyblue)) 0px, rgb(var(--seafoam)) 800px);
}

13
src/app.d.ts vendored Normal file
View File

@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}
export {};

12
src/app.html Normal file
View File

@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

1
src/lib/index.ts Normal file
View File

@@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.

View File

@@ -0,0 +1,8 @@
<script lang="ts">
import '../app.css';
let { children } = $props();
</script>
<div class="p-4">
{@render children()}
</div>

1
src/routes/+layout.ts Normal file
View File

@@ -0,0 +1 @@
export const prerender = true;

5
src/routes/+page.svelte Normal file
View File

@@ -0,0 +1,5 @@
<main class="flex flex-col gap-2 p-4 w-full">
<div class="p-4 flex flex-col justify-center items-center bg-white/50 rounded-md">
<h1 class="text-green font-noto font-bold">Harbormaster Client</h1>
</div>
</main>

BIN
static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

21
svelte.config.js Normal file
View File

@@ -0,0 +1,21 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter(),
prerender: {
entries: ['*'],
}
}
};
export default config;

19
tsconfig.json Normal file
View File

@@ -0,0 +1,19 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// 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
}

7
vite.config.ts Normal file
View File

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