diff --git a/src/index.ts b/src/index.ts index b086c0b..1516810 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,17 +5,17 @@ export interface TransformerStarterOptions { } -export default function transformerAlias(options?: TransformerStarterOptions): SourceCodeTransformer { +export default function transformStarter(options?: TransformerStarterOptions): SourceCodeTransformer { return { name: 'unocss-transformer-starter', enforce: 'pre', async transform(code, _, { uno }) { - await transformStarter(code, uno, options) + await transformStarterMain(code, uno, options) }, } } -export async function transformStarter( +export async function transformStarterMain( code: MagicString, uno: UnoGenerator, // eslint-disable-next-line unused-imports/no-unused-vars diff --git a/test/index.test.ts b/test/index.test.ts index 1db97a8..057abc8 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -2,7 +2,7 @@ import type { UnoGenerator } from 'unocss' import MagicString from 'magic-string' import { createGenerator, presetUno } from 'unocss' import { expect, it } from 'vitest' -import { transformStarter } from '../src' +import { transformStarterMain } from '../src' const uno = createGenerator({ presets: [presetUno()], @@ -11,7 +11,7 @@ const uno = createGenerator({ function createTransformer() { return async (code: string, _uno: UnoGenerator = uno) => { const s = new MagicString(code) - await transformStarter(s, _uno, {}) + await transformStarterMain(s, _uno, {}) return s.toString() } }