From 6ef97ce78f3f79512c8351ad957a10ae7c93871f Mon Sep 17 00:00:00 2001 From: Thanh Pham Date: Fri, 10 Nov 2023 10:29:00 +0700 Subject: [PATCH] fix(theme): rename mochi to consolelabs (#116) * fix(theme): rename mochi to consolelabs * chore: missing update * chore: wrong replace --- .changeset/slimy-cameras-look.md | 5 +++++ apps/mochi-web/tailwind.config.js | 4 ++-- packages/core/README.md | 8 ++++---- packages/storybook/tailwind.config.js | 4 ++-- packages/tailwind-config/plugin.ts | 2 +- packages/theme/src/plugin.ts | 2 +- packages/ui/tailwind.config.ts | 4 ++-- 7 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 .changeset/slimy-cameras-look.md diff --git a/.changeset/slimy-cameras-look.md b/.changeset/slimy-cameras-look.md new file mode 100644 index 000000000..3628b81f3 --- /dev/null +++ b/.changeset/slimy-cameras-look.md @@ -0,0 +1,5 @@ +--- +'@consolelabs/theme': patch +--- + +Rename tailwind config export from "mochi" to "consolelabs" diff --git a/apps/mochi-web/tailwind.config.js b/apps/mochi-web/tailwind.config.js index 4ed181d6a..cc746941e 100644 --- a/apps/mochi-web/tailwind.config.js +++ b/apps/mochi-web/tailwind.config.js @@ -1,5 +1,5 @@ // eslint-disable-next-line import/no-import-module-exports -import { mochi } from 'tailwind-config/plugin' +import { consolelabs } from 'tailwind-config/plugin' module.exports = { content: [ @@ -153,5 +153,5 @@ module.exports = { }, }, }, - plugins: [mochi()], + plugins: [consolelabs()], } diff --git a/packages/core/README.md b/packages/core/README.md index e610b7d1f..948f95d91 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -41,7 +41,7 @@ Tailwind CSS. Then you need to add the following code to your ```js // tailwind.config.js -import { mochi } from '@consolelabs/theme' +import { consolelabs } from '@consolelabs/core' /** @type {import('tailwindcss').Config} */ module.exports = { @@ -49,7 +49,7 @@ module.exports = { // ... './node_modules/@consolelabs/theme/src/components/**/*.{js,jsx,ts,tsx}', ], - plugins: [mochi()], + plugins: [consolelabs()], } ``` @@ -89,7 +89,7 @@ to your `tailwind.config.js` file: ```js // tailwind.config.js -import { mochi } from '@consolelabs/theme' +import { consolelabs } from '@consolelabs/theme' /** @type {import('tailwindcss').Config} */ module.exports = { @@ -99,7 +99,7 @@ module.exports = { // or you can use a glob pattern (multiple component styles) './node_modules/@consolelabs/theme/dist/components/(button|snippet|code|input).js', ], - plugins: [mochi()], + plugins: [consolelabs()], } ``` diff --git a/packages/storybook/tailwind.config.js b/packages/storybook/tailwind.config.js index ffeeabe19..112469162 100644 --- a/packages/storybook/tailwind.config.js +++ b/packages/storybook/tailwind.config.js @@ -1,4 +1,4 @@ -import { mochi } from '@consolelabs/theme' +import { consolelabs } from '@consolelabs/theme' module.exports = { content: [ @@ -6,5 +6,5 @@ module.exports = { '../components/*/stories/**/*.stories.{js,jsx,ts,tsx}', '../theme/src/components/**/*.{js,jsx,ts,tsx}', ], - plugins: [mochi()], + plugins: [consolelabs()], } diff --git a/packages/tailwind-config/plugin.ts b/packages/tailwind-config/plugin.ts index 36600b9b0..ccd93b7e4 100644 --- a/packages/tailwind-config/plugin.ts +++ b/packages/tailwind-config/plugin.ts @@ -1,4 +1,4 @@ import plugin from 'tailwindcss/plugin.js' import config from './tailwind.config' -export const mochi = () => plugin(() => {}, config) +export const consolelabs = () => plugin(() => {}, config) diff --git a/packages/theme/src/plugin.ts b/packages/theme/src/plugin.ts index 7f85a68c2..57b9f7a1e 100644 --- a/packages/theme/src/plugin.ts +++ b/packages/theme/src/plugin.ts @@ -1,6 +1,6 @@ import plugin from 'tailwindcss/plugin.js' -export const mochi = () => +export const consolelabs = () => plugin(() => {}, { theme: { extend: { diff --git a/packages/ui/tailwind.config.ts b/packages/ui/tailwind.config.ts index 25d03685d..b54eea1cb 100644 --- a/packages/ui/tailwind.config.ts +++ b/packages/ui/tailwind.config.ts @@ -1,10 +1,10 @@ // tailwind config is required for editor support import type { Config } from 'tailwindcss' -import { mochi } from 'tailwind-config/plugin' +import { consolelabs } from 'tailwind-config/plugin' const config: Pick = { theme: {}, - plugins: [mochi()], + plugins: [consolelabs()], } export default config