shared-integration
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

@unocss/shared-integration

Internal package for common logics of bundler integrations.

https://github.com/unocss/unocss/tree/main/packages/shared-integration

将 @unocss/shared-integration 打包并增加一些功能

import { transformedCode } from "shared-integration";

const css = await transformedCode('.a { @apply p-4 block .dark:c-red @dark:c-red; }');

变量 css 将转变为:

.a { display:block;padding:1rem; }

.dark .a{--un-text-opacity:1;color:rgba(248,113,113,var(--un-text-opacity));}

@media (prefers-color-scheme: dark){
  .a{--un-text-opacity:1;color:rgba(248,113,113,var(--un-text-opacity));}
}

Readme

Keywords

Package Sidebar

Install

npm i shared-integration

Weekly Downloads

6

Version

0.0.12

License

MIT

Unpacked Size

23.2 kB

Total Files

6

Last publish

Collaborators

  • fireloong