Skip to content

Commit

Permalink
feat(vscode): default preset
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 4, 2022
1 parent 91b2f08 commit 1ea7dd7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/vscode/package.json
Expand Up @@ -53,6 +53,7 @@
"devDependencies": {
"@types/vscode": "^1.62.0",
"@unocss/nuxt": "workspace:*",
"@unocss/preset-uno": "workspace:*",
"esno": "^0.16.3",
"jiti": "^1.13.0",
"prettier": "^2.6.2",
Expand Down
8 changes: 7 additions & 1 deletion packages/vscode/src/index.ts
Expand Up @@ -2,6 +2,7 @@ import { relative, resolve } from 'path'
import type { ExtensionContext } from 'vscode'
import { StatusBarAlignment, window, workspace } from 'vscode'
import { sourceObjectFields, sourcePluginFactory } from 'unconfig/presets'
import presetUno from '@unocss/preset-uno'
import { version } from '../package.json'
import { resolveOptions as resolveNuxtOptions } from '../../nuxt/src/options'
import { createContext } from './integration'
Expand All @@ -21,7 +22,12 @@ export async function activate(ext: ExtensionContext) {
log.appendLine(`UnoCSS for VS Code v${version} ${process.cwd()}`)

const context = createContext(
cwd, {},
cwd,
{
presets: [
presetUno(),
],
},
[
sourcePluginFactory({
files: [
Expand Down
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1ea7dd7

Please sign in to comment.