@unocss/transformer-directives 0.32.9 → 0.32.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.cjs +1 -3
- package/dist/index.mjs +2 -4
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -5,13 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const core = require('@unocss/core');
|
|
6
6
|
const cssTree = require('css-tree');
|
|
7
7
|
|
|
8
|
-
const regexCssId = /\.(css|postcss|sass|scss|less|stylus|styl)$/;
|
|
9
|
-
|
|
10
8
|
function transformerDirectives(options = {}) {
|
|
11
9
|
return {
|
|
12
10
|
name: "css-directive",
|
|
13
11
|
enforce: options?.enforce,
|
|
14
|
-
idFilter: (id) => !!id.match(
|
|
12
|
+
idFilter: (id) => !!id.match(core.cssIdRE),
|
|
15
13
|
transform: (code, id, ctx) => {
|
|
16
14
|
return transformDirectives(code, ctx.uno, options, id);
|
|
17
15
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { expandVariantGroup, notNull, regexScopePlaceholder } from '@unocss/core';
|
|
1
|
+
import { cssIdRE, expandVariantGroup, notNull, regexScopePlaceholder } from '@unocss/core';
|
|
2
2
|
import { parse, walk, generate, clone } from 'css-tree';
|
|
3
3
|
|
|
4
|
-
const regexCssId = /\.(css|postcss|sass|scss|less|stylus|styl)$/;
|
|
5
|
-
|
|
6
4
|
function transformerDirectives(options = {}) {
|
|
7
5
|
return {
|
|
8
6
|
name: "css-directive",
|
|
9
7
|
enforce: options?.enforce,
|
|
10
|
-
idFilter: (id) => !!id.match(
|
|
8
|
+
idFilter: (id) => !!id.match(cssIdRE),
|
|
11
9
|
transform: (code, id, ctx) => {
|
|
12
10
|
return transformDirectives(code, ctx.uno, options, id);
|
|
13
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/transformer-directives",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.13",
|
|
4
4
|
"description": "UnoCSS transformer for `@apply` directive",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@unocss/core": "0.32.
|
|
34
|
+
"@unocss/core": "0.32.13",
|
|
35
35
|
"css-tree": "^2.1.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|