milk-lib 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # Svelte library
2
+
3
+ Everything you need to build a Svelte library, powered by [`sv`](https://npmjs.com/package/sv).
4
+
5
+ Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).
6
+
7
+ ## Creating a project
8
+
9
+ If you're seeing this, you've probably already done this step. Congrats!
10
+
11
+ ```sh
12
+ # create a new project in the current directory
13
+ npx sv create
14
+
15
+ # create a new project in my-app
16
+ npx sv create my-app
17
+ ```
18
+
19
+ ## Developing
20
+
21
+ Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
22
+
23
+ ```sh
24
+ npm run dev
25
+
26
+ # or start the server and open the app in a new browser tab
27
+ npm run dev -- --open
28
+ ```
29
+
30
+ Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
31
+
32
+ ## Building
33
+
34
+ To build your library:
35
+
36
+ ```sh
37
+ npm pack
38
+ ```
39
+
40
+ To create a production version of your showcase app:
41
+
42
+ ```sh
43
+ npm run build
44
+ ```
45
+
46
+ You can preview the production build with `npm run preview`.
47
+
48
+ > To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
49
+
50
+ ## Publishing
51
+
52
+ Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
53
+
54
+ To publish your library to [npm](https://www.npmjs.com):
55
+
56
+ ```sh
57
+ npm publish
58
+ ```
@@ -0,0 +1,13 @@
1
+ <script lang="ts">
2
+
3
+ </script>
4
+
5
+ <div class="TestComponent">
6
+ Test Component
7
+ </div>
8
+
9
+ <style>
10
+ .TestComponent {
11
+ position: relative;
12
+ }
13
+ </style>
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const TestComponent: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type TestComponent = InstanceType<typeof TestComponent>;
18
+ export default TestComponent;
@@ -0,0 +1 @@
1
+ export { default as TestComponent } from './TestComponent.svelte';
@@ -0,0 +1 @@
1
+ export { default as TestComponent } from './TestComponent.svelte';
@@ -0,0 +1 @@
1
+ export * from './TestComponent';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // Reexport your entry components here
2
+ export * from './TestComponent';
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "milk-lib",
3
+ "license": "MIT",
4
+ "version": "0.0.1",
5
+ "scripts": {
6
+ "dev": "vite dev",
7
+ "build": "vite build && npm run prepack",
8
+ "preview": "vite preview",
9
+ "prepare": "svelte-kit sync || echo ''",
10
+ "prepack": "svelte-kit sync && svelte-package && publint",
11
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
12
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
13
+ "format": "prettier --write .",
14
+ "lint": "prettier --check . && eslint .",
15
+ "test:unit": "vitest",
16
+ "test": "npm run test:unit -- --run"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "!dist/**/*.test.*",
21
+ "!dist/**/*.spec.*"
22
+ ],
23
+ "sideEffects": [
24
+ "**/*.css"
25
+ ],
26
+ "svelte": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "type": "module",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "svelte": "./dist/index.js"
33
+ }
34
+ },
35
+ "peerDependencies": {
36
+ "svelte": "^5.0.0"
37
+ },
38
+ "devDependencies": {
39
+ "@eslint/compat": "^1.4.0",
40
+ "@eslint/js": "^9.36.0",
41
+ "@sveltejs/adapter-auto": "^6.1.0",
42
+ "@sveltejs/adapter-node": "^5.4.0",
43
+ "@sveltejs/kit": "^2.43.2",
44
+ "@sveltejs/package": "^2.5.4",
45
+ "@sveltejs/vite-plugin-svelte": "^6.2.0",
46
+ "@types/node": "^20",
47
+ "@vitest/browser": "^3.2.4",
48
+ "eslint": "^9.36.0",
49
+ "eslint-config-prettier": "^10.1.8",
50
+ "eslint-plugin-svelte": "^3.12.4",
51
+ "globals": "^16.4.0",
52
+ "playwright": "^1.55.1",
53
+ "prettier": "^3.6.2",
54
+ "prettier-plugin-svelte": "^3.4.0",
55
+ "publint": "^0.3.13",
56
+ "svelte": "^5.39.5",
57
+ "svelte-check": "^4.3.2",
58
+ "typescript": "^5.9.2",
59
+ "typescript-eslint": "^8.44.1",
60
+ "vite": "^7.1.7",
61
+ "vitest": "^3.2.4",
62
+ "vitest-browser-svelte": "^1.1.0"
63
+ },
64
+ "keywords": [
65
+ "svelte"
66
+ ]
67
+ }