Skip to content

Commit

Permalink
✨ Export default plugin without options and colorwind function with o…
Browse files Browse the repository at this point in the history
…ptions
  • Loading branch information
siguici committed Aug 9, 2024
1 parent b4fd136 commit ad0c20d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/colorwind/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
export * as config from './config';
import plug, {
type PluginAPI,
type PluginCreator,
type PluginCreatorWithOptions,
} from 'plugwind.js';
import colorwind, { type ColorwindOptions } from './plugin';
import plugin, { type ColorwindOptions } from './plugin';

const _colorwind: PluginCreatorWithOptions<ColorwindOptions> = plug.with(
(options?: ColorwindOptions) => (api: PluginAPI) => {
return colorwind(api, options);
export const colorwind: PluginCreatorWithOptions<ColorwindOptions> = plug.with(
(options) => (api: PluginAPI) => {
return plugin(api, options);
},
);

const _colorwind: PluginCreator = plug((api: PluginAPI) => {
return plugin(api);
});

export default _colorwind;

0 comments on commit ad0c20d

Please sign in to comment.