diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 231de2097..03462f445 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,8 +93,8 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Update npm to latest (required for OIDC) run: npm install -g npm@latest - - name: Disable pre- and post-publish actions - run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json' + - name: Disable publish and install actions + run: 'sed -i -E "s/\"((pre|post)(publish|install))/\"ignore:\1/" package.json' - name: Publish to npm if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' run: npm publish --tag latest diff --git a/package-lock.json b/package-lock.json index e9d3e2859..1165e9ffb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "solid-ui", - "version": "3.1.3-1", + "version": "3.1.3-4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "solid-ui", - "version": "3.1.3-1", + "version": "3.1.3-4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 7a7212882..a8f3300d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "solid-ui", - "version": "3.1.3-1", + "version": "3.1.3-4", "description": "UI library for Solid applications", "main": "dist/index.cjs.js", "types": "dist/index.d.ts", @@ -21,25 +21,11 @@ "import": "./dist/components/*/index.esm.js", "require": "./dist/components/*/index.cjs.js" }, - "./components/actions/button": { - "types": "./dist/components/button/index.d.ts", - "import": "./dist/components/button/index.esm.js", - "require": "./dist/components/button/index.cjs.js" - }, - "./components/forms/select": { - "types": "./dist/components/select/index.d.ts", - "import": "./dist/components/select/index.esm.js", - "require": "./dist/components/select/index.cjs.js" - }, - "./components/forms/combobox": { - "types": "./dist/components/combobox/index.d.ts", - "import": "./dist/components/combobox/index.esm.js", - "require": "./dist/components/combobox/index.cjs.js" - }, - "./components/media/photo-capture": { - "types": "./dist/components/photo-capture/index.d.ts", - "import": "./dist/components/photo-capture/index.esm.js", - "require": "./dist/components/photo-capture/index.cjs.js" + "./theme.css": { + "style": "./dist/theme.css", + "types": "./dist/theme.css.d.ts", + "import": "./dist/theme.css", + "require": "./dist/theme.css" } }, "files": [ diff --git a/vite-config/styles.ts b/vite-config/styles.ts index dbe7bb949..382d2d061 100644 --- a/vite-config/styles.ts +++ b/vite-config/styles.ts @@ -1,9 +1,22 @@ -import { resolve } from 'node:path' +import { writeFileSync } from 'node:fs' +import { join, resolve } from 'node:path' import tailwindcss from '@tailwindcss/vite' -import type { UserConfig } from 'vite' +import type { Plugin, UserConfig } from 'vite' const projectRoot = resolve(import.meta.dirname, '..') +function styleDeclarations(): Plugin { + return { + name: 'style-declarations', + closeBundle() { + writeFileSync( + join(projectRoot, 'dist/theme.css.d.ts'), + 'export {}\n', + ) + }, + } +} + export function stylesConfig(): UserConfig { return { build: { @@ -17,6 +30,6 @@ export function stylesConfig(): UserConfig { }, }, }, - plugins: [tailwindcss()], + plugins: [tailwindcss(), styleDeclarations()], } }