Skip to content

Commit

Permalink
Feat/upgrade sveltekit (#57)
Browse files Browse the repository at this point in the history
* feat: migrate to svelte v4

* feat: bump node version for docker

* feat: set theme cookie path

* feat: migrate to sveltekit v2

* fix: run format

* feat: upgrade sveltekit superforms

* fix: tw purge plugin
  • Loading branch information
sohamjaiswal authored Jul 31, 2024
1 parent 1e393c6 commit 0642918
Show file tree
Hide file tree
Showing 80 changed files with 3,834 additions and 2,890 deletions.
18 changes: 10 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
11 changes: 10 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE/feature_pull_request.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
## Feature Description

Please provide a brief description of the new feature being implemented in this pull request.

## Problem Statement

Explain the problem or need that this feature aims to address.

## Proposed Solution

Describe the solution or approach taken to implement the new feature.

## Implementation Details

Provide additional details about the implementation, such as specific code changes, new components, or relevant architectural decisions.

## Screenshots (if applicable)

If the feature introduces changes to the UI, include screenshots or images showcasing the new functionality.

## Testing

Describe the steps taken to test the feature. Include relevant test cases or scenarios that were considered.

## Dependencies

List any dependencies or related issues/pull requests that need to be resolved for this feature to work correctly.

## Checklist

- [ ] I have tested this feature locally and it works as expected.
- [ ] I have updated the documentation, if necessary, to reflect the new feature.
- [ ] I have followed the project's coding standards and best practices.
- [ ] I have reviewed my code and ensured it is well-documented and maintainable.
- [ ] I have assigned the pull request to the appropriate reviewer(s).

## Related Issues

List any related issues or pull requests that are connected to this feature.

## Additional Notes
Add any additional information or context that might be helpful for reviewers.

Add any additional information or context that might be helpful for reviewers.
7 changes: 3 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "weekly"

interval: 'weekly'
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand All @@ -19,4 +18,4 @@ jobs:

- run: npm install
- run: npx prisma generate
- run: npm run build --if-present
- run: npm run build --if-present
31 changes: 15 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Deploy

# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
branches: [main]
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand All @@ -15,17 +15,16 @@ jobs:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Deploy using ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
cd ~/cardboard
git pull origin main
docker-compose -f prod.docker-compose.yml down --remove-orphans
docker-compose -f prod.docker-compose.yml up --build -d
steps:
- name: Deploy using ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
cd ~/cardboard
git pull origin main
docker-compose -f prod.docker-compose.yml down --remove-orphans
docker-compose -f prod.docker-compose.yml up --build -d
16 changes: 8 additions & 8 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
supportedArchitectures:
os:
- "current"
- "darwin"
- "linux"
- "win32"
cpu:
os:
- 'current'
- 'darwin'
- 'linux'
- 'win32'
cpu:
- current"
- "x64"
- "ia32"
- 'x64'
- 'ia32'
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ To begin contributing, please follow these steps:
8. Commit your changes with a descriptive commit message: git commit -m "Add feature: your feature name".
9. Push your changes to your forked repository: git push origin feature/your-feature-name.
10. Open a pull request from your forked repository to the main repository.

## Code Quality

Maintaining code quality is crucial for our project's success. We expect all contributors, regardless of their experience level, to follow the established coding standards and specifications. Here are some guidelines to keep in mind:
Expand All @@ -26,6 +27,7 @@ Maintaining code quality is crucial for our project's success. We expect all con
4. Follow the project's indentation and formatting conventions.
5. Avoid code duplication and strive for reusability.
6. Write unit tests whenever possible to ensure code correctness.

## Review Process

Once you have submitted a pull request, the project maintainers will review your changes. They will provide feedback, suggestions, and guidance to help you improve your contribution. Please be patient during the review process, as it may take some time.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 📄 [Cardboard.ink](https://Cardboard.ink)

<!-- Stats -->

![GitHub issues](https://img.shields.io/github/issues-raw/sohamjaiswal/cardboard?color=yellow&style=for-the-badge) ![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/sohamjaiswal/cardboard?color=yellow&style=for-the-badge) <!-- --> ![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/sohamjaiswal/cardboard?color=yellow&style=for-the-badge) ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/sohamjaiswal/cardboard?color=yellow&style=for-the-badge) <!-- --> ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/sohamjaiswal/cardboard?color=yellow&style=for-the-badge) <!-- --> ![GitHub contributors](https://img.shields.io/github/contributors/sohamjaiswal/cardboard?color=yellow&style=for-the-badge) <!-- --> ![GitHub last commit](https://img.shields.io/github/last-commit/sohamjaiswal/cardboard?color=yellow&style=for-the-badge) <!-- --> ![GitHub top language](https://img.shields.io/github/languages/top/sohamjaiswal/cardboard?color=yellow&style=for-the-badge)

## 🐛 How to contribute.
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Supported Versions

Cardboard is currently an alpha and development is rapid and swift, you can say that only the most recent commit is the supported version.
Cardboard is currently an alpha and development is rapid and swift, you can say that only the most recent commit is the supported version.

## Reporting a Vulnerability

Expand Down
2 changes: 1 addition & 1 deletion app.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine
FROM node:18-alpine

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion app.prod.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine
FROM node:18-alpine

WORKDIR /app

Expand Down
5 changes: 1 addition & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.3"

services:
cb-db:
container_name: cb-db
Expand All @@ -13,7 +11,7 @@ services:
- 5432:5432
cb-app:
container_name: cb-app
build:
build:
context: .
dockerfile: app.dockerfile
restart: always
Expand All @@ -26,4 +24,3 @@ services:
- ./:/app
environment:
- DATABASE_URL=postgresql://postgres:password@cb-db:5432/postgres

6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ const app = express();

// add a route that lives separately from the SvelteKit app
app.get('/healthcheck', (req, res) => {
res.end('ok');
res.end('ok');
});

// let SvelteKit handle everything else, including serving prerendered pages and static assets
app.use(handler);

app.listen(3000, () => {
console.log('🚀 listening on port 3000');
});
console.log('🚀 listening on port 3000');
});
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "my-skeleton-app",
"name": "cardboard",
"version": "0.0.1",
"private": true,
"author": {
Expand All @@ -21,43 +21,43 @@
"@iconify/svelte": "^3.1.6",
"@skeletonlabs/skeleton": "^2.4.0",
"@skeletonlabs/tw-plugin": "^0.2.4",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/kit": "^1.5.0",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-node": "^2.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.9",
"@types/node": "^20.9.0",
"@types/bcrypt": "^5.0.2",
"@types/node": "^20.9.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.62.0",
"autoprefixer": "^10.4.17",
"eslint": "^8.28.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.26.0",
"eslint-plugin-svelte": "^2.30.0",
"highlight.js": "^11.9.0",
"postcss": "^8.4.23",
"postcss-load-config": "^4.0.1",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"prettier-plugin-svelte": "^2.10.1",
"prisma": "^5.5.2",
"sass": "^1.62.1",
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"svelte": "^4.0.0",
"svelte-check": "^3.4.3",
"svelte-preprocess": "^5.1.3",
"sveltekit-superforms": "^0.8.7",
"sveltekit-superforms": "^2.16.1",
"tailwindcss": "^3.3.2",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.3.0",
"vite-plugin-tailwind-purgecss": "^0.1.3",
"zod": "^3.22.4"
"vite": "^5.0.0",
"vite-plugin-tailwind-purgecss": "^0.3.3"
},
"dependencies": {
"@asteasolutions/zod-to-openapi": "^6.2.0",
"@prisma/client": "^4.11.0",
"bcrypt": "^5.1.1",
"dotenv": "^16.3.2",
"express": "^4.18.2"
"express": "^4.18.2",
"zod": "^3.23.8"
},
"type": "module"
}
2 changes: 1 addition & 1 deletion postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
plugins: {
'postcss-import': {},
'tailwindcss/nesting': {},
'tailwindcss/nesting': {},
tailwindcss: {},
autoprefixer: {}
}
Expand Down
Loading

0 comments on commit 0642918

Please sign in to comment.