diff --git a/package.json b/package.json index fa5aab1..9d96266 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "dev": "vite dev", "format": "prettier --plugin-search-dir . --write .", "lint": "prettier --check --plugin-search-dir . . && eslint .", - "package": "svelte-kit sync && svelte-package", + "package": "svelte-kit sync && svelte-package -o package", "preview": "vite preview", "test": "playwright test" }, @@ -31,7 +31,7 @@ "@playwright/test": "^1.22.2", "@sveltejs/adapter-node": "^1.2.1", "@sveltejs/kit": "^1.10.0", - "@sveltejs/package": "^2.0.2", + "@sveltejs/package": "^2.0.0", "@tailwindcss/typography": "^0.5.3", "@tricoteuses/assemblee": "^1.1.8", "@types/fs-extra": "^11.0.1", @@ -69,5 +69,267 @@ "typescript": "^4.7.4", "vite": "^4.0.4", "zx": "^7.1.1" + }, + "exports": { + "./package.json": "./package.json", + "./aggregates": { + "types": "./package/aggregates.d.ts", + "default": "./package/aggregates.js" + }, + "./auditors/dole": { + "types": "./package/auditors/dole.d.ts", + "default": "./package/auditors/dole.js" + }, + "./auditors/jorf/articles": { + "types": "./package/auditors/jorf/articles.d.ts", + "default": "./package/auditors/jorf/articles.js" + }, + "./auditors/jorf": { + "types": "./package/auditors/jorf/index.d.ts", + "svelte": "./package/auditors/jorf/index.js", + "default": "./package/auditors/jorf/index.js" + }, + "./auditors/jorf/jo": { + "types": "./package/auditors/jorf/jo.d.ts", + "default": "./package/auditors/jorf/jo.js" + }, + "./auditors/jorf/section_ta": { + "types": "./package/auditors/jorf/section_ta.d.ts", + "default": "./package/auditors/jorf/section_ta.js" + }, + "./auditors/jorf/texte_version": { + "types": "./package/auditors/jorf/texte_version.d.ts", + "default": "./package/auditors/jorf/texte_version.js" + }, + "./auditors/jorf/textelr": { + "types": "./package/auditors/jorf/textelr.d.ts", + "default": "./package/auditors/jorf/textelr.js" + }, + "./auditors/legal": { + "types": "./package/auditors/legal.d.ts", + "default": "./package/auditors/legal.js" + }, + "./auditors/legi/articles": { + "types": "./package/auditors/legi/articles.d.ts", + "default": "./package/auditors/legi/articles.js" + }, + "./auditors/legi": { + "types": "./package/auditors/legi/index.d.ts", + "svelte": "./package/auditors/legi/index.js", + "default": "./package/auditors/legi/index.js" + }, + "./auditors/legi/section_ta": { + "types": "./package/auditors/legi/section_ta.d.ts", + "default": "./package/auditors/legi/section_ta.js" + }, + "./auditors/legi/texte_version": { + "types": "./package/auditors/legi/texte_version.d.ts", + "default": "./package/auditors/legi/texte_version.js" + }, + "./auditors/legi/textelr": { + "types": "./package/auditors/legi/textelr.d.ts", + "default": "./package/auditors/legi/textelr.js" + }, + "./auditors/queries": { + "types": "./package/auditors/queries.d.ts", + "default": "./package/auditors/queries.js" + }, + "./components/ArticleView.svelte": { + "types": "./package/components/ArticleView.svelte.d.ts", + "svelte": "./package/components/ArticleView.svelte", + "default": "./package/components/ArticleView.svelte" + }, + "./components/IdPagesSwitcher.svelte": { + "types": "./package/components/IdPagesSwitcher.svelte.d.ts", + "svelte": "./package/components/IdPagesSwitcher.svelte", + "default": "./package/components/IdPagesSwitcher.svelte" + }, + "./components/LienView.svelte": { + "types": "./package/components/LienView.svelte.d.ts", + "svelte": "./package/components/LienView.svelte", + "default": "./package/components/LienView.svelte" + }, + "./components/Pagination.svelte": { + "types": "./package/components/Pagination.svelte.d.ts", + "svelte": "./package/components/Pagination.svelte", + "default": "./package/components/Pagination.svelte" + }, + "./components/SectionTaView.svelte": { + "types": "./package/components/SectionTaView.svelte.d.ts", + "svelte": "./package/components/SectionTaView.svelte", + "default": "./package/components/SectionTaView.svelte" + }, + "./components/TexteVersionView.svelte": { + "types": "./package/components/TexteVersionView.svelte.d.ts", + "svelte": "./package/components/TexteVersionView.svelte", + "default": "./package/components/TexteVersionView.svelte" + }, + "./components/TextelrView.svelte": { + "types": "./package/components/TextelrView.svelte.d.ts", + "svelte": "./package/components/TextelrView.svelte", + "default": "./package/components/TextelrView.svelte" + }, + "./components/errors/ErrorAlert.svelte": { + "types": "./package/components/errors/ErrorAlert.svelte.d.ts", + "svelte": "./package/components/errors/ErrorAlert.svelte", + "default": "./package/components/errors/ErrorAlert.svelte" + }, + "./components/errors/ErrorValue.svelte": { + "types": "./package/components/errors/ErrorValue.svelte.d.ts", + "svelte": "./package/components/errors/ErrorValue.svelte", + "default": "./package/components/errors/ErrorValue.svelte" + }, + "./components/errors/errors": { + "types": "./package/components/errors/errors.d.ts", + "default": "./package/components/errors/errors.js" + }, + ".": { + "types": "./package/index.d.ts", + "svelte": "./package/index.js", + "default": "./package/index.js" + }, + "./legal/dole": { + "types": "./package/legal/dole.d.ts", + "default": "./package/legal/dole.js" + }, + "./legal": { + "types": "./package/legal/index.d.ts", + "svelte": "./package/legal/index.js", + "default": "./package/legal/index.js" + }, + "./legal/jorf": { + "types": "./package/legal/jorf.d.ts", + "default": "./package/legal/jorf.js" + }, + "./legal/legi": { + "types": "./package/legal/legi.d.ts", + "default": "./package/legal/legi.js" + }, + "./legal/shared": { + "types": "./package/legal/shared.d.ts", + "default": "./package/legal/shared.js" + }, + "./queries": { + "types": "./package/queries.d.ts", + "default": "./package/queries.js" + }, + "./summaries": { + "types": "./package/summaries.d.ts", + "default": "./package/summaries.js" + }, + "./urls": { + "types": "./package/urls.d.ts", + "default": "./package/urls.js" + } + }, + "files": [ + "package" + ], + "svelte": "./package/index.js", + "typesVersions": { + ">4.0": { + "aggregates": [ + "./package/aggregates.d.ts" + ], + "auditors/dole": [ + "./package/auditors/dole.d.ts" + ], + "auditors/jorf/articles": [ + "./package/auditors/jorf/articles.d.ts" + ], + "auditors/jorf": [ + "./package/auditors/jorf/index.d.ts" + ], + "auditors/jorf/jo": [ + "./package/auditors/jorf/jo.d.ts" + ], + "auditors/jorf/section_ta": [ + "./package/auditors/jorf/section_ta.d.ts" + ], + "auditors/jorf/texte_version": [ + "./package/auditors/jorf/texte_version.d.ts" + ], + "auditors/jorf/textelr": [ + "./package/auditors/jorf/textelr.d.ts" + ], + "auditors/legal": [ + "./package/auditors/legal.d.ts" + ], + "auditors/legi/articles": [ + "./package/auditors/legi/articles.d.ts" + ], + "auditors/legi": [ + "./package/auditors/legi/index.d.ts" + ], + "auditors/legi/section_ta": [ + "./package/auditors/legi/section_ta.d.ts" + ], + "auditors/legi/texte_version": [ + "./package/auditors/legi/texte_version.d.ts" + ], + "auditors/legi/textelr": [ + "./package/auditors/legi/textelr.d.ts" + ], + "auditors/queries": [ + "./package/auditors/queries.d.ts" + ], + "components/ArticleView.svelte": [ + "./package/components/ArticleView.svelte.d.ts" + ], + "components/IdPagesSwitcher.svelte": [ + "./package/components/IdPagesSwitcher.svelte.d.ts" + ], + "components/LienView.svelte": [ + "./package/components/LienView.svelte.d.ts" + ], + "components/Pagination.svelte": [ + "./package/components/Pagination.svelte.d.ts" + ], + "components/SectionTaView.svelte": [ + "./package/components/SectionTaView.svelte.d.ts" + ], + "components/TexteVersionView.svelte": [ + "./package/components/TexteVersionView.svelte.d.ts" + ], + "components/TextelrView.svelte": [ + "./package/components/TextelrView.svelte.d.ts" + ], + "components/errors/ErrorAlert.svelte": [ + "./package/components/errors/ErrorAlert.svelte.d.ts" + ], + "components/errors/ErrorValue.svelte": [ + "./package/components/errors/ErrorValue.svelte.d.ts" + ], + "components/errors/errors": [ + "./package/components/errors/errors.d.ts" + ], + "index": [ + "./package/index.d.ts" + ], + "legal/dole": [ + "./package/legal/dole.d.ts" + ], + "legal": [ + "./package/legal/index.d.ts" + ], + "legal/jorf": [ + "./package/legal/jorf.d.ts" + ], + "legal/legi": [ + "./package/legal/legi.d.ts" + ], + "legal/shared": [ + "./package/legal/shared.d.ts" + ], + "queries": [ + "./package/queries.d.ts" + ], + "summaries": [ + "./package/summaries.d.ts" + ], + "urls": [ + "./package/urls.d.ts" + ] + } } -} +} \ No newline at end of file diff --git a/svelte.config.js b/svelte.config.js index bb5c5c4..785be69 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -9,15 +9,6 @@ const config = { }), }, - package: { - exports: (filePath) => { - return !filePath.startsWith("server/") - }, - files: (filePath) => { - return !filePath.startsWith("server/") - }, - }, - // Consult https://kit.svelte.dev/docs/integrations#preprocessors // for more information about preprocessors preprocess: vitePreprocess(),