From c7c78e7858aaa7537df13e7252ea59bee39d2615 Mon Sep 17 00:00:00 2001 From: Nik Date: Tue, 6 Sep 2022 11:46:11 +1000 Subject: [PATCH] Format pass --- package.json | 20 +-- src/app.postcss | 7 +- src/lib/Accordion/AccordionItem.svelte | 6 +- src/lib/Alert/Alert.svelte | 12 +- src/lib/AppBar/AppBar.svelte | 62 +++---- src/lib/AppBar/AppBar.test.ts | 14 +- src/lib/AppShell/AppShell.svelte | 88 +++++---- src/lib/AppShell/AppShell.test.ts | 2 +- src/lib/Avatar/Avatar.svelte | 4 +- src/lib/Avatar/Avatar.test.ts | 5 +- src/lib/Badge/Badge.test.ts | 2 +- src/lib/Breadcrumb/Breadcrumb.test.ts | 10 +- src/lib/Button/Button.test.ts | 4 +- src/lib/Card/Card.svelte | 2 +- src/lib/Card/Card.test.ts | 2 +- src/lib/CodeBlock/CodeBlock.svelte | 4 +- src/lib/CodeBlock/CodeBlock.test.ts | 2 +- src/lib/CodeBlock/stores.ts | 4 +- src/lib/Divider/Divider.svelte | 7 +- src/lib/Drawer/Drawer.svelte | 82 +++++---- src/lib/Drawer/Drawer.test.ts | 2 - .../GradientHeading/GradientHeading.test.ts | 2 +- src/lib/List/List.test.ts | 2 +- src/lib/List/ListItem.svelte | 4 +- src/lib/List/ListItem.test.ts | 15 +- src/lib/LogoCloud/Logo.test.ts | 2 +- src/lib/LogoCloud/LogoCloud.test.ts | 2 +- src/lib/Notifications/Dialog.svelte | 8 +- src/lib/Notifications/Dialog.test.ts | 32 ++-- src/lib/Notifications/Toats.test.ts | 19 +- src/lib/Paginator/Paginator.test.ts | 2 +- src/lib/Progress/ProgressRadial.svelte | 4 +- src/lib/Progress/ProgressRadial.test.ts | 14 +- src/lib/Radio/RadioGroup.test.ts | 4 +- src/lib/RangeSlider/RangeSlider.test.ts | 9 +- src/lib/SlideToggle/SlideToggle.test.ts | 2 +- src/lib/SvgIcon/SvgIcon.svelte | 1 + src/lib/SvgIcon/SvgIcon.test.ts | 20 +-- src/lib/SvgIcon/icons.ts | 9 +- src/lib/Tab/Tab.test.ts | 2 +- src/lib/Tab/TabGroup.test.ts | 2 +- src/lib/Table/DataTable.test.ts | 2 +- src/lib/Tooltip/Tooltip.svelte | 10 +- src/lib/Tooltip/Tooltip.test.ts | 2 +- src/lib/_documentation/README.md | 2 +- .../SkeletonAppBar/SkeletonAppBar.svelte | 114 ++++++------ .../SkeletonFooter/SkeletonFooter.svelte | 134 +++++++------- .../SkeletonNavigation/SkeletonDrawer.svelte | 10 +- .../SkeletonNavigation/SkeletonSidebar.svelte | 81 ++++----- .../SkeletonNavigation/links.ts | 122 ++++++------- .../ThemeGenerator/ThemeGenCustom.svelte | 2 +- src/lib/_documentation/stores.ts | 2 +- src/lib/index.ts | 2 +- src/lib/styles/core.css | 2 +- src/lib/styles/tailwind.css | 2 +- src/lib/styles/typography.css | 28 ++- src/routes/(inner)/+layout.svelte | 4 +- .../components/accordions/+page.svelte | 2 +- .../(inner)/components/app-bar/+page.svelte | 13 +- .../(inner)/components/app-shell/+page.svelte | 41 +++-- .../(inner)/components/avatars/+page.svelte | 2 +- .../(inner)/components/cards/+page.svelte | 15 +- .../(inner)/components/lists/+page.svelte | 2 +- .../(inner)/components/template/+page.svelte | 10 +- .../(inner)/components/tooltips/+page.svelte | 2 +- .../(inner)/docs/comparisons/+page.svelte | 57 ++++-- .../(inner)/docs/contributions/+page.svelte | 53 ++++-- src/routes/(inner)/guides/astro/+page.svelte | 5 +- src/routes/(inner)/guides/forms/+page.svelte | 19 +- .../(inner)/guides/install/+page.svelte | 170 +++++++++--------- .../(inner)/guides/styling/+page.svelte | 45 ++--- src/routes/(inner)/guides/themes/+page.svelte | 28 ++- .../(inner)/utilities/codeblocks/+page.svelte | 5 +- .../(inner)/utilities/drawers/+page.svelte | 65 +++++-- src/routes/+layout.svelte | 9 +- src/routes/+page.svelte | 23 ++- svelte.config.js | 2 +- tsconfig.json | 2 +- vite.config.js | 8 +- 79 files changed, 866 insertions(+), 727 deletions(-) diff --git a/package.json b/package.json index 807c3dbb..e1cd3c8b 100644 --- a/package.json +++ b/package.json @@ -19,15 +19,15 @@ }, "devDependencies": { "@bobthered/tailwindcss-palette-generator": "^3.0.0", - "@sveltejs/adapter-auto": "^1.0.0-next.64", - "@sveltejs/adapter-static": "^1.0.0-next.39", - "@sveltejs/kit": "^1.0.0-next.415", - "@sveltejs/package": "^1.0.0-next.1", - "@tailwindcss/forms": "^0.5.2", + "@sveltejs/adapter-auto": "^1.0.0-next.71", + "@sveltejs/adapter-static": "^1.0.0-next.42", + "@sveltejs/kit": "^1.0.0-next.471", + "@sveltejs/package": "^1.0.0-next.3", + "@tailwindcss/forms": "^0.5.3", "@testing-library/dom": "^8.17.1", "@testing-library/svelte": "^3.2.1", - "@typescript-eslint/eslint-plugin": "^5.35.1", - "@typescript-eslint/parser": "^5.35.1", + "@typescript-eslint/eslint-plugin": "^5.36.2", + "@typescript-eslint/parser": "^5.36.2", "autoprefixer": "^10.4.8", "c8": "^7.12.0", "eslint": "^7.32.0", @@ -39,14 +39,14 @@ "postcss-load-config": "^3.1.4", "prettier": "^2.7.1", "prettier-plugin-svelte": "^2.7.0", - "svelte": "^3.49.0", + "svelte": "^3.50.0", "svelte-check": "^2.9.0", "svelte-preprocess": "^4.10.7", - "svelte2tsx": "^0.5.15", + "svelte2tsx": "^0.5.16", "tailwindcss": "^3.1.8", "tslib": "^2.4.0", "typescript": "^4.8.2", - "vite": "^3.0.9", + "vite": "^3.1.0", "vitest": "^0.19.1" }, "type": "module", diff --git a/src/app.postcss b/src/app.postcss index 283fa9bd..0fc257fc 100644 --- a/src/app.postcss +++ b/src/app.postcss @@ -29,7 +29,10 @@ Otherwise, update the respective style packs (core, typography, forms) so everyo /* === NOTE: unique doc-only styles below: ==== */ -html, body { @apply h-screen overflow-hidden; } +html, +body { + @apply h-screen overflow-hidden; +} /* Gradient Background, via: https://csshero.org/mesher/ */ body { @@ -45,4 +48,4 @@ body { background-image: radial-gradient(at 35% 35%, hsla(160,84%,39%,0.16) 0px, transparent 50%), radial-gradient(at 61% 60%, hsla(238,83%,66%,0.16) 0px, transparent 50%); -} \ No newline at end of file +} diff --git a/src/lib/Accordion/AccordionItem.svelte b/src/lib/Accordion/AccordionItem.svelte index b62ee5b5..b7d24582 100644 --- a/src/lib/Accordion/AccordionItem.svelte +++ b/src/lib/Accordion/AccordionItem.svelte @@ -46,5 +46,7 @@ \ No newline at end of file + details summary::-webkit-details-marker { + display: none; + } + diff --git a/src/lib/Alert/Alert.svelte b/src/lib/Alert/Alert.svelte index 0eedd75f..e625afe3 100644 --- a/src/lib/Alert/Alert.svelte +++ b/src/lib/Alert/Alert.svelte @@ -6,7 +6,7 @@ export let duration: number = 200; // ms export let background: string = 'bg-accent-500/30'; export let border: string = 'border-l-accent-500'; - export let color: string|undefined = undefined; + export let color: string | undefined = undefined; export let radius: string = ''; // Base Classes @@ -23,24 +23,24 @@ - `.trim()} /> + `.trim()} + />

Optionaly, we can use reactive classes to simply the dynamic classes example above.

- + `.trim()} + />

This prevents the need for the afterUpdate() method.

@@ -294,11 +316,13 @@ $: classesCard = \`\${cBase} \${classesOutlined}\`;

Update Site Navigation

- Open /src/lib/_documentation/SkeletonNavigation/links.ts and document the new links under the appropriate section. General rule of thumb is simple components go under Components, while Svelte actions and complicated features go under Utilities. + Open /src/lib/_documentation/SkeletonNavigation/links.ts and document the new links under the appropriate section. General rule of thumb is simple components go under + Components, while Svelte actions and complicated features go under Utilities.

Interactive vs Static Demos

- While interactive demos are preferred, static demos are welcome too. Just make sure to provide a variety of examples to illustrate potential use cases and showcase the feature set of the component. If require assistance in setting up an interactive demo, please contact any core contributor on the team. We're happy to help! + While interactive demos are preferred, static demos are welcome too. Just make sure to provide a variety of examples to illustrate potential use cases and showcase the feature set of the + component. If require assistance in setting up an interactive demo, please contact any core contributor on the team. We're happy to help!

@@ -319,7 +343,8 @@ $: classesCard = \`\${cBase} \${classesOutlined}\`;

Automated Tests

- Tests are handled via Vitest, which uses similar conventions and syntax to Jest. Please ensure you write and run tests before submitting a pull request. Bare minimum, these tests should test components with the minimum and maximum props. If you're unfamiliar with automated testing, contact a core contributor for help. + Tests are handled via Vitest, which uses similar conventions and syntax to Jest. Please ensure you write and run tests before submitting a pull + request. Bare minimum, these tests should test components with the minimum and maximum props. If you're unfamiliar with automated testing, contact a core contributor for help.

diff --git a/src/routes/(inner)/guides/astro/+page.svelte b/src/routes/(inner)/guides/astro/+page.svelte index 7626af5b..0ad6e0c5 100644 --- a/src/routes/(inner)/guides/astro/+page.svelte +++ b/src/routes/(inner)/guides/astro/+page.svelte @@ -24,7 +24,7 @@

Skeleton now officially supports the Astro web framework. This guide provides a walkthrough for scaffolding a simple Astro application.

- + @@ -130,7 +130,8 @@ import WrapperExample from '../components/WrapperExample.svelte';

Please note that dynamic components must be hydrated using Astro's Client Directives. We opted for - client:visible, which loads and hydrates the JavaScript component only when it enters the user’s viewport. If we did not do this, the component would be rendered as only HTML/CSS and the triggerMessage() method would not function. + client:visible, which loads and hydrates the JavaScript component only when it enters the user’s viewport. If we did not do this, the component would be rendered as only HTML/CSS + and the triggerMessage() method would not function.

diff --git a/src/routes/(inner)/guides/forms/+page.svelte b/src/routes/(inner)/guides/forms/+page.svelte index 089d6131..1f4b3395 100644 --- a/src/routes/(inner)/guides/forms/+page.svelte +++ b/src/routes/(inner)/guides/forms/+page.svelte @@ -20,9 +20,14 @@ impacting your ability to customize and style each input.

- However, given Skeleton's tight integration with Tailwind, an elegant solution is available via the official Tailwind Forms plugin. This provides a no-nonsense approach to applying clean and modern styling to most inputs. + However, given Skeleton's tight integration with Tailwind, an elegant solution is available via the official Tailwind Forms plugin. This provides a no-nonsense approach to applying clean and modern styling to most inputs. +

+

+ Tailwind provides an example page to preview the default styles here. These default styles can then be + tailored to adapt your theme styling use Skeleton's modular stylesheet add-on for forms.

-

Tailwind provides an example page to preview the default styles here. These default styles can then be tailored to adapt your theme styling use Skeleton's modular stylesheet add-on for forms.

@@ -69,11 +74,11 @@ module.exports = { {#if $storeFramework === 'sveltekit'}

Import form element styles before your global stylesheet in /src/routes/+layout.svelte.

- + {:else if $storeFramework === 'vite'}

Import form element styles before your global stylesheet in /src/main.js.

- + {:else if $storeFramework === 'astro'}

Import form element styles before your global stylesheet in /src/layouts/LayoutBasic.astro.

@@ -109,8 +114,10 @@ module.exports = {

Non-Supported Inputs

- While the Tailwind Forms plugin covers most common inputs, there are a few exceptions (see page bottom). However, Skeleton provides a robust Range Slider - alternative, as well as custom components for Slide Toggles and Radio Groups. Expect to see more of these in the future. + While the Tailwind Forms plugin covers most common inputs, there are a few exceptions (see page bottom). + However, Skeleton provides a robust Range Slider + alternative, as well as custom components for Slide Toggles and Radio Groups. Expect to see more of these in the + future.

diff --git a/src/routes/(inner)/guides/install/+page.svelte b/src/routes/(inner)/guides/install/+page.svelte index b0c4588a..606c4bf1 100644 --- a/src/routes/(inner)/guides/install/+page.svelte +++ b/src/routes/(inner)/guides/install/+page.svelte @@ -1,105 +1,113 @@
+ +
+

Install Skeleton

+

+ Select your app framework of choice, then follow steps below. During this process you'll scaffold a project, install the Skeleton package, install and configure Tailwind, as well as implement a + custom theme. Make sure to follow each guide carefully. +

- -
-

Install Skeleton

-

- Select your app framework of choice, then follow steps below. During this process you'll scaffold a project, install the Skeleton package, install and configure Tailwind, as well as implement a - custom theme. Make sure to follow each guide carefully. -

- - - SvelteKit - Vite (Svelte) - Astro - - - - {#if $storeFramework === 'sveltekit'} -

- View the official documentation. -

- + SvelteKit + Vite (Svelte) + Astro + + + + {#if $storeFramework === 'sveltekit'} +

+ View the official documentation. +

+ - - {:else if $storeFramework === 'vite'} -

- View the official documentation. -

- + + {:else if $storeFramework === 'vite'} +

+ View the official documentation. +

+ - - {:else if $storeFramework === 'astro'} -

- View the official documentation. Once setup of Skeleton is complete, please read the dedicated Usage with Astro guide. -

- + + {:else if $storeFramework === 'astro'} +

+ View the official documentation. Once setup of Skeleton is complete, please read the dedicated + Usage with Astro guide. +

+ - -

Install Svelte

-

- Add Svelte integration via @astrojs/svelte -

- - -

Install Tailwind

-

- Add Tailwind integration via @astrojs/tailwind -

- -

Add /src/styles/base.css to house global styles and define the following @tailwind directives:

- - {/if} -
- - - {#if ['sveltekit', 'vite'].includes($storeFramework)} -
-

Install Tailwind

-

- Svelte-Add makes installation a trivial process. -

- -
- {/if} - - -
-

Install Skeleton

-

- Install the core Skeleton package from NPM. -

- -
- - - - - -

Next, let's configure Tailwind to work with Skeleton.

- -
+ `.trim()} + /> + +

Install Svelte

+

+ Add Svelte integration via @astrojs/svelte +

+ + +

Install Tailwind

+

+ Add Tailwind integration via @astrojs/tailwind +

+ +

Add /src/styles/base.css to house global styles and define the following @tailwind directives:

+ + {/if} +
-
\ No newline at end of file + + {#if ['sveltekit', 'vite'].includes($storeFramework)} +
+

Install Tailwind

+

+ Svelte-Add makes installation a trivial process. +

+ +
+ {/if} + + +
+

Install Skeleton

+

+ Install the core Skeleton package from NPM. +

+ +
+ + + + + +

Next, let's configure Tailwind to work with Skeleton.

+ +
+ diff --git a/src/routes/(inner)/guides/styling/+page.svelte b/src/routes/(inner)/guides/styling/+page.svelte index d1eb771b..ca1b783d 100644 --- a/src/routes/(inner)/guides/styling/+page.svelte +++ b/src/routes/(inner)/guides/styling/+page.svelte @@ -7,32 +7,22 @@ // Tables const ghLibPathMaster: string = 'https://github.com/Brain-Bones/skeleton/tree/master/src/lib'; // master branch const tableStyleAddons: any = { - headings: ['Stylesheet', 'Description', 'Plugin Required', 'Source', ], + headings: ['Stylesheet', 'Description', 'Plugin Required', 'Source'], source: [ [ 'tailwind.css', 'Should proceed all other add-ons. Includes only the four primary @tailwind directives.', '-', - `View`, - ], - [ - 'core.css', - 'General styles for for body elements, scrollbars, and more.', - '-', - `View`, - ], - [ - 'typography.css', - 'Styles headings, paragraph, anchors, pre, code, and more.', - '-', - `View`, + `View` ], + ['core.css', 'General styles for for body elements, scrollbars, and more.', '-', `View`], + ['typography.css', 'Styles headings, paragraph, anchors, pre, code, and more.', '-', `View`], [ 'forms.css', 'Should only be used with the Tailwind Forms plugin. See the Forms for details.', '✓', - `View`, - ], + `View` + ] ] }; @@ -52,10 +42,12 @@

Here's a few suggested best practices to follow when creating global styles:

  • - Ensure you wrap your core page elements within a main element. The App Shell component handles this for you. - + Ensure you wrap your core page elements within a main element. The + App Shell component handles this for you. +
  • - The ideal use case for Tailwind @apply is defining global styles. Please be leery of premature abstraction. + The ideal use case for Tailwind @apply is defining global styles. Please be leery of + premature abstraction.
  • Utilize the CSS :not pseudo-class to exclude and avoid conflicts with Skeleton component's inherit styles. @@ -95,7 +87,8 @@ - Ensure you import the tailwind.css add-on before all others. Remove the @tailwind directives from your global stylesheet if you choose to use these add-ons. Failure to do so will mean you have two instances of the directives in your project. + Ensure you import the tailwind.css add-on before all others. Remove the @tailwind directives from your global stylesheet if you choose to use these add-ons. Failure to do so will + mean you have two instances of the directives in your project. @@ -109,11 +102,11 @@

    Per Component Styles

    -

    - Skeleton components automatically inherit and utilize your theme colors. However, there may be cases where you want to overwrite or extend the styling on a single component. -

    +

    Skeleton components automatically inherit and utilize your theme colors. However, there may be cases where you want to overwrite or extend the styling on a single component.

    Special style properties are provided to customize each component. See each component's documentation for instruction.

    - Prop Customized `.trim()} /> @@ -129,8 +122,8 @@

    Big`} />

    - Keep in mind that components are a single line HTML element and represent a set of HTML elements within. This means you should be mindful of your target, as the class attribute - is only applied to the top-most parent element. In rare cases you may need to generate a chained class definition, though we advise using this technique sparingly. + Keep in mind that components are a single line HTML element and represent a set of HTML elements within. This means you should be mindful of your target, as the class attribute is only + applied to the top-most parent element. In rare cases you may need to generate a chained class definition, though we advise using this technique sparingly.

    ...`} /> diff --git a/src/routes/(inner)/guides/themes/+page.svelte b/src/routes/(inner)/guides/themes/+page.svelte index ae85095b..7e579699 100644 --- a/src/routes/(inner)/guides/themes/+page.svelte +++ b/src/routes/(inner)/guides/themes/+page.svelte @@ -38,7 +38,6 @@ toastStore.trigger(t); } ); - } // Tables @@ -59,12 +58,14 @@

    Themes

    - Skeleton themes integrate with Tailwind using CSS custom properties converted to RGB values. This enables the use of background opacity as well as support for dark mode. Components intelligently implement each color from the theme's palette. + Skeleton themes integrate with Tailwind using CSS custom properties converted to RGB values. + This enables the use of background opacity as well as support for + dark mode. Components intelligently implement each color from the theme's palette.

    - +

    Preset Themes

    @@ -91,7 +92,14 @@

    Tap any theme below to automatically copy the import statement to your clipboard.

    diff --git a/src/routes/(inner)/utilities/drawers/+page.svelte b/src/routes/(inner)/utilities/drawers/+page.svelte index cce94a86..79aa031e 100644 --- a/src/routes/(inner)/utilities/drawers/+page.svelte +++ b/src/routes/(inner)/utilities/drawers/+page.svelte @@ -9,7 +9,9 @@ let position: string = 'left'; function trigger(p: string): void { position = p; - setTimeout(() => { storeDrawer.set(true); }, 100) + setTimeout(() => { + storeDrawer.set(true); + }, 100); } const tableProps: any = { @@ -17,7 +19,7 @@ source: [ ['open', 'Writable(boolean)', 'writable(false)', 'boolean', '✓', 'Provide a store to manage visible state.'], ['position', 'string', 'left', 'left | right | top | bottom', '-', 'Set the anchor position.'], - ['duration', 'number', '150', 'milliseconds', '-', 'Define the Svelte transition animation duration.'], + ['duration', 'number', '150', 'milliseconds', '-', 'Define the Svelte transition animation duration.'] ] }; const tablePropsBackdrop: any = { @@ -25,7 +27,7 @@ source: [ ['bgBackdrop', 'string', 'bg-surface-400/70 dark:bg-surface-900/70', 'Provide classes to set the backdrop background color'], ['display', 'string', '-', 'Provide a class to set the display (ex: lg:hidden)'], - ['blur', 'string', 'backdrop-blur-sm', 'Provide a class to set the blur style.'], + ['blur', 'string', 'backdrop-blur-sm', 'Provide a class to set the blur style.'] ] }; const tablePropsDrawer: any = { @@ -36,20 +38,18 @@ ['rounded', 'string', '-', 'Provide a class to set border radius.'], ['width', 'string', '(based on position)', 'Provide a class to override the width.'], ['height', 'string', '(based on position)', 'Provide a class to override the height.'], - ['margin', 'string', '-', 'Provide classes to set margins.'], + ['margin', 'string', '-', 'Provide classes to set margins.'] ] }; const tableSlots: any = { headings: ['Name', 'Description'], - source: [ - ['default', 'Provide your Drawer content here.'], - ] + source: [['default', 'Provide your Drawer content here.']] }; const tableA11y: any = { headings: ['Prop', 'Type', 'Default', 'Description'], source: [ ['labelledby', 'string', '-', 'Provide an ID of the element labeling the drawer.'], - ['describedby', 'string', '-', 'Provide an ID of the element describing the drawer.'], + ['describedby', 'string', '-', 'Provide an ID of the element describing the drawer.'] ] }; @@ -75,10 +75,30 @@
    - - - - + + + +
    @@ -86,16 +106,22 @@

    Usage

    Create a Svelte writable store to manage the state of the drawer.

    - = writable(false); - `.trim()} /> + `.trim()} + />

    Implement the Drawer component, passing the store reference. For best results implement in your app's root layout for global scope.

    - (contents) - `.trim()} /> + `.trim()} + />

    Set the store value to true or false to open or close the Drawer.

    { storeDrawer.set(true) };`} /> { storeDrawer.set(false) };`} /> @@ -104,10 +130,13 @@ const storeDrawer: Writable = writable(false); Close`} />

    Pairing with App Shell

    Place the Drawer above and outside the App Shell in your root layout. This will prevent content shifting as the drawer opens.

    - - `.trim()} /> + `.trim()} + />
    diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 28f69672..048e10a8 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,5 +1,4 @@ -
    - 🚧 - - Skeleton is available as a public beta. Expect breaking changes prior to v1.0. If you encounter issues please report them on GitHub. + Skeleton is available as a public beta. Expect breaking changes prior to v1.0. If you encounter issues please report them on GitHub.
    -
    @@ -59,7 +60,10 @@
    Svelte Integration
    -

    Tightly coupled with Svelte, including full support for SvelteKit, Vite, and Astro.

    +

    + Tightly coupled with Svelte, including full support for SvelteKit, Vite, and + Astro. +

    @@ -121,14 +125,13 @@
    -

    Sponsors

    - Brain & Bones + Brain & Bones

    Brain & Bones

    @@ -158,10 +161,6 @@
    -
    -
    - -
    diff --git a/svelte.config.js b/svelte.config.js index d6e036de..07683463 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -24,7 +24,7 @@ const config = { package: { // strip test files from packaging files: (filepath) => { - return filepath.indexOf('test') == -1 ? true : false + return filepath.indexOf('test') == -1 ? true : false; } } }; diff --git a/tsconfig.json b/tsconfig.json index 9fa73210..2c1efc80 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -40,5 +40,5 @@ "@brainandbones/skeleton": ["src/lib/index.ts"] }, "outDir": "package" - }, + } } diff --git a/vite.config.js b/vite.config.js index a1357ba2..b274b7e7 100644 --- a/vite.config.js +++ b/vite.config.js @@ -11,11 +11,9 @@ const pkg = JSON.parse(json); /** @type {import('vite').UserConfig} */ const config = { - plugins: [ - sveltekit({ hot: !process.env.VITEST }), - ], + plugins: [sveltekit({ hot: !process.env.VITEST })], define: { - '__PACKAGE__': pkg + __PACKAGE__: pkg }, resolve: { alias: { @@ -26,7 +24,7 @@ const config = { globals: true, environment: 'jsdom', exclude: [...configDefaults.exclude, '**/package/**', '**/build/**'] - }, + } }; export default config;