Skip to content

Commit

Permalink
refactor: migrate sveltekit
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Aug 22, 2022
1 parent 34e6633 commit 58b4fb4
Show file tree
Hide file tree
Showing 22 changed files with 96 additions and 258 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ const config = {
],
plugins: ["svelte3", "@typescript-eslint", "simple-import-sort"],
overrides: [
{ files: ["*.svelte"], processor: "svelte3/svelte3" },
{
files: ["*.svelte"],
processor: "svelte3/svelte3",
},
{
files: ["*.cjs"],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/app.d.ts linguist-vendored=false
*.d.ts linguist-vendored=false
59 changes: 29 additions & 30 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]

jobs:
analyze:
Expand All @@ -30,41 +30,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
31 changes: 0 additions & 31 deletions .github/workflows/test.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

14 changes: 14 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// @ts-check

/** @type {import("prettier").Config} */
const config = {
bracketSpacing: true,
tabWidth: 2,
useTabs: false,
singleQuote: false,
semi: true,
trailingComma: "es5",
plugins: [require("prettier-plugin-tailwindcss")],
};

module.exports = config;
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All change except updating data will be noted here

## [1.5.160] - 2022-08-22

- Bump Dependencies, no new feature

## [1.4.156] - 2022-06-02

- Statistics is now implemented!
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,17 @@
"homepage": "https://github.com/Leomotors/anime-captcha",
"scripts": {
"pre-build": "pnpm lm-config && node prebuild.js",
"dev": "pnpm lm-inc && pnpm pre-build && vite dev -p 6912",
"dev": "pnpm lm-inc && pnpm pre-build && vite dev --port 6912",
"build": "pnpm pre-build && vite build",
"package": "svelte-kit package",
"preview": "vite preview",
"test": "playwright test",
"check": "svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check \"*.config.{cjs,js,ts}\" \"{src,tests}/**/*.{ts,svelte,html}\" && eslint src && eslint *.{cjs,js}",
"format": "prettier --write \"*.config.{cjs,js,ts}\" \"{src,tests}/**/*.{ts,svelte,html}\""
},
"devDependencies": {
"@leomotors/scripts": "^3.1.0",
"@playwright/test": "^1.25.0",
"@sveltejs/adapter-vercel": "1.0.0-next.67",
"@sveltejs/kit": "1.0.0-next.428",
"@types/eslint": "^8.4.6",
Expand All @@ -40,17 +38,14 @@
"eslint-plugin-svelte3": "^4.0.0",
"globby": "^13.1.2",
"postcss": "^8.4.16",
"postcss-load-config": "^4.0.1",
"prettier": "^2.7.1",
"prettier-plugin-svelte": "^2.7.0",
"prettier-plugin-tailwindcss": "^0.1.13",
"rimraf": "^3.0.2",
"sass": "^1.54.5",
"svelte": "^3.49.0",
"svelte-check": "^2.8.1",
"svelte-preprocess": "^4.10.7",
"tailwindcss": "^3.1.8",
"tslib": "^2.4.0",
"typescript": "^4.7.4",
"vite": "^3.0.9",
"vite-plugin-pwa": "^0.12.3"
Expand Down
9 changes: 0 additions & 9 deletions playwright.config.js

This file was deleted.

60 changes: 5 additions & 55 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion postcss.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ const tailwindcss = require("tailwindcss");
const autoprefixer = require("autoprefixer");

module.exports = {
plugins: [tailwindcss(), autoprefixer],
plugins: [tailwindcss(), autoprefixer()],
};
Loading

1 comment on commit 58b4fb4

@vercel
Copy link

@vercel vercel bot commented on 58b4fb4 Aug 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anime-captcha – ./

anime-captcha-leomotors.vercel.app
anime-captcha-git-main-leomotors.vercel.app
anime-captcha.vercel.app

Please sign in to comment.