Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed Oct 18, 2024
1 parent 2179724 commit 5638372
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 24 deletions.
39 changes: 23 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ pnpm i -D unocss-preset-useful unocss

```ts
// unocss.config.ts
import { defineConfig } from 'unocss'
import { presetUseful } from 'unocss-preset-useful'
import { defineUsefulConfig } from 'unocss-preset-useful'

export default defineConfig({
presets: [
presetUseful(),
],
})
export default defineUsefulConfig()

// Custom options
export default defineUsefulConfig(
{
// Useful options
},
{
// Uno options
}
)
```

<details>
Expand Down Expand Up @@ -171,8 +176,9 @@ export interface UsefulOptions {
<details>
<summary>Expand it see more details</summary><br>

### autocomplete

Check failure on line 179 in README.md

View workflow job for this annotation

GitHub Actions / lint

More than 1 blank line not allowed
### autocomplete

Check failure on line 181 in README.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
```ts
export const autocomplete: UserConfig['autocomplete'] = {
shorthands: {
Expand All @@ -185,7 +191,7 @@ export const autocomplete: UserConfig['autocomplete'] = {
```

### extractors

Check failure on line 194 in README.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
```ts
// https://github.com/unocss/unocss/pull/2485
// Support extract base64 image.
Expand All @@ -201,7 +207,7 @@ export const extractors: Extractor[] = [
```

### postprocess

Check failure on line 210 in README.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
```ts
// https://github.com/unocss/unocss/discussions/2816
// Extract rgba color in css variable.
Expand Down Expand Up @@ -231,7 +237,7 @@ export function importantProcess(): Postprocessor {
```

### rules

Check failure on line 240 in README.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
```ts
// Use any css variable easily.
export const rules: Rule[] = [
Expand All @@ -250,7 +256,7 @@ export const rules: Rule[] = [
```

### shortcuts

Check failure on line 259 in README.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
```ts
// FYI. My own shortcuts.
const _shortcuts: CustomStaticShortcuts = [
Expand Down Expand Up @@ -279,16 +285,16 @@ const _shortcuts: CustomStaticShortcuts = [
['fbc', 'flex justify-between items-center'],
['fa', 'flex justify-around'],
['fac', 'flex justify-around items-center'],
['fw', 'flex justify-wrap'],
['fwr', 'flex justify-wrap-reverse'],
['fw', 'flex flex-wrap'],
['fwr', 'flex flex-wrap-reverse'],

// transition
['trans', 'transition-all-350 ease-linear'],
]
```

### index

Check failure on line 297 in README.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
```ts
// See index.test.ts `themeAnimate configuration` for usage.
export function nomarlizeTheme(theme: UsefulTheme, enableMagicAnimations: boolean): UsefulTheme {
Expand All @@ -303,7 +309,7 @@ export function nomarlizeTheme(theme: UsefulTheme, enableMagicAnimations: boolea
```

### magic-animate

Check failure on line 312 in README.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
```ts
export function magicAnimate(): Theme['animation'] {
const keyframesObj = getKeyframes(magicCSS)
Expand All @@ -325,6 +331,7 @@ export function magicAnimate(): Theme['animation'] {
}
```


Check failure on line 334 in README.md

View workflow job for this annotation

GitHub Actions / lint

More than 1 blank line not allowed
<br></details>

## License
Expand Down
21 changes: 13 additions & 8 deletions READMETEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ pnpm i -D unocss-preset-useful unocss

```ts
// unocss.config.ts
import { defineConfig } from 'unocss'
import { presetUseful } from 'unocss-preset-useful'

export default defineConfig({
presets: [
presetUseful(),
],
})
import { defineUsefulConfig } from 'unocss-preset-useful'

export default defineUsefulConfig()

// Custom options
export default defineUsefulConfig(
{
// Useful options
},
{
// Uno options
}
)
```

<details>
Expand Down

0 comments on commit 5638372

Please sign in to comment.