Skip to content

Commit cadf1d2

Browse files
authored
Merge pull request #482 from spences10/refactor/move-to-svelte-package-v2
2 parents 23c8328 + fedaf3a commit cadf1d2

38 files changed

+363
-513
lines changed

.eslintignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
10+
# Ignore files for PNPM, NPM and YARN
11+
pnpm-lock.yaml
12+
package-lock.json
13+
yarn.lock

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
.DS_Store
22
node_modules
33
/build
4+
/dist
45
/.svelte-kit
56
/package
67
.env
78
.env.*
89
!.env.example
10+
vite.config.js.timestamp-*
11+
vite.config.ts.timestamp-*
912
.vercel
10-
/dist

.npmrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
engine-strict=true
2-
strict-peer-dependencies=false

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ node_modules
33
/build
44
/.svelte-kit
55
/package
6+
/dist
67
.env
78
.env.*
89
!.env.example

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Scott Spence
3+
Copyright (c) 2023 Scott Spence
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ npm login
156156
npm version 0.0.8
157157
# package with sveltekit
158158
pnpm run package
159-
# publish from package directory
160-
cd package
161159
# publish
162160
npm publish
163161
# push tags to github

package.json

Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -18,67 +18,70 @@
1818
"license": "MIT",
1919
"scripts": {
2020
"dev": "vite dev",
21-
"build": "pnpm un sveltekit-embed && pnpm i -D sveltekit-embed && vite build",
22-
"package": "svelte-package",
21+
"build": "vite build && npm run package",
2322
"preview": "vite preview",
23+
"package": "svelte-kit sync && svelte-package && publint",
24+
"prepublishOnly": "npm run package",
2425
"test": "playwright test",
25-
"check": "svelte-check --tsconfig ./tsconfig.json",
26-
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
27-
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
26+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
27+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
28+
"lint": "prettier --plugin-search-dir . --check . && eslint .",
2829
"format": "prettier --plugin-search-dir . --write .",
29-
"package:local": "svelte-package && pnpm i -D ./package",
30-
"contributors:add": "all-contributors add",
31-
"contributors:generate": "all-contributors generate",
3230
"test:unit": "vitest",
3331
"test:ui": "vitest --ui",
3432
"test:ci": "vitest run",
35-
"cspell": "cspell '**/*.md' --config cspell.json --language-id en-gb --wordsOnly"
33+
"cspell": "cspell '**/*.md' --config cspell.json --language-id en-gb --wordsOnly",
34+
"contributors:add": "all-contributors add",
35+
"contributors:generate": "all-contributors generate"
36+
},
37+
"exports": {
38+
".": {
39+
"types": "./dist/index.d.ts",
40+
"svelte": "./dist/index.js"
41+
}
42+
},
43+
"files": [
44+
"dist"
45+
],
46+
"peerDependencies": {
47+
"svelte": "^3.54.0"
3648
},
3749
"devDependencies": {
38-
"@playwright/test": "1.31.2",
50+
"@playwright/test": "^1.31.2",
3951
"@sveltejs/adapter-auto": "^2.0.0",
4052
"@sveltejs/kit": "^1.11.0",
41-
"@sveltejs/package": "2.0.2",
42-
"@tailwindcss/typography": "0.5.9",
53+
"@sveltejs/package": "^2.0.2",
54+
"@tailwindcss/typography": "^0.5.3",
4355
"@testing-library/svelte": "^3.2.2",
44-
"@typescript-eslint/eslint-plugin": "5.54.1",
45-
"@typescript-eslint/parser": "5.54.1",
46-
"@vitest/ui": "^0.29.2",
47-
"all-contributors-cli": "6.24.0",
48-
"autoprefixer": "10.4.14",
56+
"@typescript-eslint/eslint-plugin": "^5.54.1",
57+
"@typescript-eslint/parser": "^5.54.1",
58+
"autoprefixer": "^10.4.7",
4959
"cspell": "^6.29.0",
50-
"daisyui": "2.51.3",
51-
"eslint": "8.36.0",
52-
"eslint-config-prettier": "8.7.0",
53-
"eslint-plugin-svelte3": "4.0.0",
60+
"daisyui": "^2.18.1",
61+
"eslint": "^8.36.0",
62+
"eslint-config-prettier": "^8.7.0",
63+
"eslint-plugin-svelte3": "^4.0.0",
5464
"fathom-client": "^3.5.0",
55-
"jsdom": "^21.1.0",
56-
"mdsvex": "0.10.6",
57-
"postcss": "8.4.21",
58-
"postcss-load-config": "4.0.1",
59-
"prettier": "2.8.4",
60-
"prettier-plugin-svelte": "2.9.0",
65+
"jsdom": "^21.1.1",
66+
"mdsvex": "^0.10.6",
67+
"postcss": "^8.4.14",
68+
"postcss-load-config": "^4.0.1",
69+
"prettier": "^2.8.4",
70+
"prettier-plugin-svelte": "^2.9.0",
71+
"publint": "^0.1.10",
6172
"rehype-autolink-headings": "^6.1.1",
6273
"rehype-slug": "^5.1.0",
63-
"svead": "0.0.4",
64-
"svelte": "3.56.0",
65-
"svelte-check": "3.1.2",
66-
"svelte-preprocess": "5.0.1",
67-
"svelte2tsx": "0.6.7",
68-
"sveltekit-embed": "^0.0.12",
69-
"tailwindcss": "3.2.7",
70-
"tslib": "2.5.0",
71-
"typescript": "4.9.5",
72-
"vite": "4.1.4",
74+
"svead": "^0.0.4",
75+
"svelte": "^3.56.0",
76+
"svelte-check": "^3.1.2",
77+
"svelte-preprocess": "^4.10.7",
78+
"tailwindcss": "^3.1.5",
79+
"tslib": "^2.5.0",
80+
"typescript": "^4.9.5",
81+
"vite": "^4.1.4",
7382
"vitest": "^0.29.2"
7483
},
75-
"type": "module",
76-
"repository": {
77-
"type": "git",
78-
"url": "git+https://github.com/spences10/sveltekit-embed.git"
79-
},
80-
"bugs": {
81-
"url": "https://github.com/spences10/sveltekit-embed/issues"
82-
},
83-
"homepage": "https://github.com/spences10/sveltekit-embed#readme"
84+
"svelte": "./dist/index.js",
85+
"types": "./dist/index.d.ts",
86+
"type": "module"
8487
}

playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const config: PlaywrightTestConfig = {
55
command: 'npm run build && npm run preview',
66
port: 4173,
77
},
8+
testDir: 'tests',
89
}
910

1011
export default config

0 commit comments

Comments
 (0)