Skip to content

Commit

Permalink
chore: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed Nov 7, 2024
1 parent 219657c commit 09e45b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
Expand All @@ -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()
}
}
Expand Down

0 comments on commit 09e45b7

Please sign in to comment.