Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging migration cleanup #6020

Merged
merged 5 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gold-rocks-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

update `app.d.ts` for library skeleton template
8 changes: 4 additions & 4 deletions documentation/docs/15-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ const config = {
}
},

// options passed to svelte.preprocess (https://svelte.dev/docs#compile-time-svelte-preprocess)
preprocess: null,

// options passed to @sveltejs/package
package: {
source: 'value of kit.files.lib, if available, else src/lib',
Expand All @@ -83,7 +80,10 @@ const config = {
// excludes all .d.ts and files starting with _ as the name
exports: (filepath) => !/^_|\/_|\.d\.ts$/.test(filepath),
files: () => true
}
},

// options passed to svelte.preprocess (https://svelte.dev/docs#compile-time-svelte-preprocess)
preprocess: null
};

export default config;
Expand Down
4 changes: 2 additions & 2 deletions packages/create-svelte/templates/libskeleton/src/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
declare namespace App {
// interface Locals {}
// interface Platform {}
// interface Session {}
// interface Stuff {}
// interface PrivateEnv {}
// interface PublicEnv {}
}
2 changes: 1 addition & 1 deletion packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ export interface Config {
compilerOptions?: CompileOptions;
extensions?: string[];
kit?: KitConfig;
preprocess?: any;
package?: {
source?: string;
dir?: string;
emitTypes?: boolean;
exports?: (filepath: string) => boolean;
files?: (filepath: string) => boolean;
};
preprocess?: any;
[key: string]: any;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/package/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export type RecursiveRequired<T> = {
};

export interface ValidatedConfig {
preprocess?: any;
extensions: string[];
package: RecursiveRequired<PackageConfig>;
kit?: any;
package: RecursiveRequired<PackageConfig>;
preprocess?: any;
}

export type Validator<T = any> = (input: T, keypath: string) => T;
2 changes: 1 addition & 1 deletion packages/package/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ export interface Config {
compilerOptions?: CompileOptions;
extensions?: string[];
kit?: any;
preprocess?: any;
package?: PackageConfig;
preprocess?: any;
}