mirror of https://github.com/sveltejs/svelte
parent
7ef2e6684d
commit
f5a23ead99
@ -0,0 +1,24 @@
|
|||||||
|
/**
|
||||||
|
* devtools config
|
||||||
|
* @type {import('./public.d.ts').Config}
|
||||||
|
*/
|
||||||
|
const config = {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Partial<import('./public.d.ts').Config>} options
|
||||||
|
*/
|
||||||
|
export function configure(options){
|
||||||
|
// TODO deep merge?
|
||||||
|
for(const [key,value] of options){
|
||||||
|
config[key]=value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return {import('./public.d.ts').Config}
|
||||||
|
*/
|
||||||
|
export function getConfig(){
|
||||||
|
// TODO clone to avoid direct manipulation
|
||||||
|
return config;
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
export {default as DevTool} from './DevTool.svelte'
|
export {default as DevTool} from './DevTool.svelte'
|
||||||
|
export * from './configure.js'
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
export * from './index.js'
|
||||||
|
|
||||||
|
export interface Config {
|
||||||
|
position: 'top'|'bottom'
|
||||||
|
}
|
Loading…
Reference in new issue