Skip to content

Commit

Permalink
feat: switched to sveltekit library template
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgeiler committed Apr 20, 2024
1 parent bab6c01 commit 5d41e61
Show file tree
Hide file tree
Showing 29 changed files with 2,878 additions and 186 deletions.
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type { import("eslint").Linter.Config } */
module.exports = {
root: true,
extends: ['eslint:recommended', 'plugin:svelte/recommended', 'prettier'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
}
};
22 changes: 0 additions & 22 deletions .eslintrc.json

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/main.yml

This file was deleted.

13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
.DS_Store
node_modules
package-lock.json
test/public/bundle.js
/build
/dist
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.idea
dist
pnpm-lock.yaml
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

# Ignore the license, since prettier breaks license detection
LICENSE.md
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
3 changes: 2 additions & 1 deletion LICENSE → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License
===========

Copyright (c) 2020 Skayo
Copyright (c) 2024 Jonas Geiler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 0 additions & 3 deletions babel.config.json

This file was deleted.

8 changes: 0 additions & 8 deletions jest.config.js

This file was deleted.

12 changes: 12 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
}
93 changes: 51 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,67 @@
{
"name": "svelte-tiny-virtual-list",
"version": "2.0.5",
"version": "3.0.0-alpha.0",
"description": "A tiny but mighty list virtualization component for svelte, with zero dependencies 💪",
"svelte": "src/index.js",
"main": "dist/svelte-tiny-virtual-list.js",
"module": "dist/svelte-tiny-virtual-list.mjs",
"types": "types/index.d.ts",
"homepage": "https://github.com/jonasgeiler/svelte-tiny-virtual-list#readme",
"bugs": "https://github.com/jonasgeiler/svelte-tiny-virtual-list/issues",
"license": "MIT",
"author": "Jonas Geiler <[email protected]> (https://jonasgeiler.com)",
"repository": "github:jonasgeiler/svelte-tiny-virtual-list",
"scripts": {
"build": "rollup -c",
"lint": "eslint src/** test/**",
"test": "jest test",
"test:watch": "npm run test -- --watch",
"prepublishOnly": "npm run build"
"dev": "vite dev",
"build": "vite build && npm run package",
"preview": "vite preview",
"package": "svelte-kit sync && svelte-package && publint",
"prepublishOnly": "npm run package",
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
"test": "npm run test:integration && npm run test:unit",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"test:integration": "playwright test",
"test:unit": "vitest"
},
"peerDependencies": {
"svelte": "^4.0.0"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.10",
"@rollup/plugin-node-resolve": "^11.0.0",
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/svelte": "^3.0.0",
"eslint": "^7.15.0",
"eslint-plugin-svelte3": "^2.7.3",
"jest": "^26.6.3",
"rollup": "^2.34.2",
"rollup-plugin-svelte": "^7.0.0",
"svelte": "^3.31.0",
"svelte-jester": "^1.3.0"
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/package": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^8.56.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"publint": "^0.1.9",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.11",
"vitest": "^1.2.0"
},
"files": [
"src",
"dist",
"types"
"!dist/**/*.test.*",
"!dist/**/*.spec.*"
],
"type": "module",
"svelte": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./types/index.d.ts",
"svelte": "./src/index.js",
"default": "./dist/svelte-tiny-virtual-list.js"
"types": "./dist/index.d.ts",
"svelte": "./dist/index.js"
}
},
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]+sha256.caa915eaae9d9aefccf50ee8aeda25a2f8684d8f9d5c6e367eaf176d97c1f89e",
"keywords": [
"svelte",
"virtual",
Expand All @@ -49,19 +72,5 @@
"component",
"plugin",
"svelte-components"
],
"author": {
"name": "Skayo",
"email": "[email protected]",
"url": "https://skayo.dev"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/Skayo/svelte-tiny-virtual-list.git"
},
"bugs": {
"url": "https://github.com/Skayo/svelte-tiny-virtual-list/issues"
},
"homepage": "https://github.com/Skayo/svelte-tiny-virtual-list"
]
}
11 changes: 11 additions & 0 deletions playwright.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
webServer: {
command: 'npm run build && npm run preview',
port: 4173
},
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/
};

export default config;
Loading

0 comments on commit 5d41e61

Please sign in to comment.