@empjs/plugin-tailwindcss 1.2.8-beta.3 → 4.0.0-alpha.1
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/dist/index.d.ts +4 -23
- package/dist/index.js +1 -1
- package/dist/rslib-runtime.js +1 -0
- package/dist/tailwindcss.d.ts +2 -1
- package/dist/tailwindcss.js +1 -1
- package/dist/types.d.ts +18 -0
- package/package.json +13 -23
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +0 -28
- package/dist/tailwindcss.cjs +0 -1
- package/dist/tailwindcss.d.cts +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,9 @@
|
|
|
1
|
-
import { GlobalStore } from '@empjs/cli';
|
|
1
|
+
import type { GlobalStore } from '@empjs/cli';
|
|
2
2
|
import autoprefixer from 'autoprefixer';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* postcss-pxtorem 配置选项
|
|
7
|
-
*/
|
|
8
|
-
interface PxToRemOptions {
|
|
9
|
-
rootValue?: number | ((input: Input) => number);
|
|
10
|
-
unitPrecision?: number;
|
|
11
|
-
propList?: string[];
|
|
12
|
-
selectorBlackList?: Array<string | RegExp>;
|
|
13
|
-
replace?: boolean;
|
|
14
|
-
mediaQuery?: boolean;
|
|
15
|
-
minPixelValue?: number;
|
|
16
|
-
exclude?: string | RegExp | ((file: string) => boolean);
|
|
17
|
-
unit?: string;
|
|
18
|
-
}
|
|
19
|
-
type TailwindcssOptions = {
|
|
20
|
-
pxToRemOptions?: PxToRemOptions;
|
|
21
|
-
};
|
|
22
|
-
|
|
3
|
+
import type { AcceptedPlugin } from 'postcss';
|
|
4
|
+
import { TailwindcssOptions } from './types.js';
|
|
23
5
|
declare const _default: (tailwindcssOptions?: TailwindcssOptions, autoprefixerOptions?: autoprefixer.Options, presetEnvFeature?: Record<string, boolean>, customPostcssPlugins?: AcceptedPlugin[]) => {
|
|
24
6
|
name: string;
|
|
25
7
|
rsConfig(store: GlobalStore): Promise<void>;
|
|
26
8
|
};
|
|
27
|
-
|
|
28
|
-
export { _default as default };
|
|
9
|
+
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import s from"node:module";let e=s.createRequire(import.meta.url);import o from"autoprefixer";import i from"path";import{__webpack_require__ as t}from"./rslib-runtime.js";import*as r from"postcss-import";t.add({"postcss-import"(s){s.exports=r}});export default((s,r,p,l)=>({name:"@empjs/plugin-tailwindcss",async rsConfig(a){let{chain:n}=a,m=e.resolve("tailwindcss/package.json"),c=i.dirname(m),u=i.join(c,"index.css"),d=[t("postcss-import")({resolve:s=>"tailwindcss"===s?u:s.startsWith("tailwindcss/")?i.join(c,s.replace("tailwindcss/","")):s}),[e.resolve("@tailwindcss/postcss"),{}]];a.empConfig.build.polyfill.browserslist&&a.empConfig.build.polyfill.browserslist.length>0&&d.push(["postcss-preset-env",{browsers:a.empConfig.build.polyfill.browserslist,stage:1,features:p}]),s?.pxToRemOptions&&d.push(["postcss-pxtorem",{rootValue:100,unitPrecision:3,propList:["*"],selectorBlackList:[],replace:!0,mediaQuery:!0,minPixelValue:0,...s.pxToRemOptions}]),d.push(o(r)),l&&l.length>0&&d.push(...l),n.module.rule(a.chainName.rule.css).set("type","css").use("postcss").loader(e.resolve("postcss-loader")).options({postcssOptions:{plugins:d}})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"node:module";var r={},e={};function o(t){var n=e[t];if(void 0!==n)return n.exports;var i=e[t]={exports:{}};return r[t](i,i.exports,o),i.exports}o.m=r,o.add=function(r){Object.assign(o.m,r)};export{o as __webpack_require__};
|
package/dist/tailwindcss.d.ts
CHANGED
package/dist/tailwindcss.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"tailwindcss";
|
|
1
|
+
import"node:module";export*from"tailwindcss";export{default as plugin}from"tailwindcss/plugin";
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Input } from 'postcss';
|
|
2
|
+
/**
|
|
3
|
+
* postcss-pxtorem 配置选项
|
|
4
|
+
*/
|
|
5
|
+
export interface PxToRemOptions {
|
|
6
|
+
rootValue?: number | ((input: Input) => number);
|
|
7
|
+
unitPrecision?: number;
|
|
8
|
+
propList?: string[];
|
|
9
|
+
selectorBlackList?: Array<string | RegExp>;
|
|
10
|
+
replace?: boolean;
|
|
11
|
+
mediaQuery?: boolean;
|
|
12
|
+
minPixelValue?: number;
|
|
13
|
+
exclude?: string | RegExp | ((file: string) => boolean);
|
|
14
|
+
unit?: string;
|
|
15
|
+
}
|
|
16
|
+
export type TailwindcssOptions = {
|
|
17
|
+
pxToRemOptions?: PxToRemOptions;
|
|
18
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empjs/plugin-tailwindcss",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.1",
|
|
4
4
|
"description": "base tailwind 4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -23,36 +23,26 @@
|
|
|
23
23
|
"vue",
|
|
24
24
|
"vue2"
|
|
25
25
|
],
|
|
26
|
-
"main": "dist/index.js",
|
|
27
|
-
"types": "dist/index.d.ts",
|
|
26
|
+
"main": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
"require": {
|
|
35
|
-
"types": "./dist/index.d.cts",
|
|
36
|
-
"default": "./dist/index.cjs"
|
|
37
|
-
}
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"import": "./dist/index.js",
|
|
32
|
+
"default": "./dist/index.js"
|
|
38
33
|
},
|
|
39
34
|
"./tailwindcss": {
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
"require": {
|
|
45
|
-
"types": "./dist/tailwindcss.d.cts",
|
|
46
|
-
"default": "./dist/tailwindcss.cjs"
|
|
47
|
-
}
|
|
35
|
+
"types": "./dist/tailwindcss.d.ts",
|
|
36
|
+
"import": "./dist/tailwindcss.js",
|
|
37
|
+
"default": "./dist/tailwindcss.js"
|
|
48
38
|
}
|
|
49
39
|
},
|
|
50
40
|
"engines": {
|
|
51
|
-
"node": "
|
|
41
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
52
42
|
},
|
|
53
43
|
"author": "Ken",
|
|
54
44
|
"devDependencies": {
|
|
55
|
-
"@empjs/cli": "
|
|
45
|
+
"@empjs/cli": "4.0.0-alpha.1"
|
|
56
46
|
},
|
|
57
47
|
"dependencies": {
|
|
58
48
|
"autoprefixer": "10.4.22",
|
|
@@ -65,7 +55,7 @@
|
|
|
65
55
|
"postcss-pxtorem": "^6.1.0"
|
|
66
56
|
},
|
|
67
57
|
"scripts": {
|
|
68
|
-
"build": "
|
|
69
|
-
"dev": "
|
|
58
|
+
"build": "rslib build --env-mode production",
|
|
59
|
+
"dev": "rslib build --watch --env-mode development"
|
|
70
60
|
}
|
|
71
61
|
}
|
package/dist/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var h=Object.create;var c=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var j=(e,s)=>{for(var r in s)c(e,r,{get:s[r],enumerable:!0})},a=(e,s,r,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of x(s))!y.call(e,i)&&i!==r&&c(e,i,{get:()=>s[i],enumerable:!(t=w(s,i))||t.enumerable});return e};var l=(e,s,r)=>(r=e!=null?h(b(e)):{},a(s||!e||!e.__esModule?c(r,"default",{value:e,enumerable:!0}):r,e)),v=e=>a(c({},"__esModule",{value:!0}),e);var q={};j(q,{default:()=>O});module.exports=v(q);var d=l(require("autoprefixer"),1),n=l(require("path"),1),O=(e,s,r,t)=>({name:"@empjs/plugin-tailwindcss",async rsConfig(i){let{chain:m}=i,f=require.resolve("tailwindcss/package.json"),u=n.default.dirname(f),g=n.default.join(u,"index.css"),o=[require("postcss-import")({resolve:p=>p==="tailwindcss"?g:p.startsWith("tailwindcss/")?n.default.join(u,p.replace("tailwindcss/","")):p}),[require.resolve("@tailwindcss/postcss"),{sources:{include:["./src/**/*.{js,jsx,ts,tsx,html,css}"],exclude:["**/*.md"]}}]];i.empConfig.build.polyfill.browserslist&&i.empConfig.build.polyfill.browserslist.length>0&&o.push(["postcss-preset-env",{browsers:i.empConfig.build.polyfill.browserslist,stage:1,features:r}]),e?.pxToRemOptions&&o.push(["postcss-pxtorem",{rootValue:100,unitPrecision:3,propList:["*"],selectorBlackList:[],replace:!0,mediaQuery:!0,minPixelValue:0,...e.pxToRemOptions}]),o.push((0,d.default)(s)),t&&t.length>0&&o.push(...t),m.module.rule(i.chainName.rule.css).include.add(n.default.join(process.cwd(),"src")).end().exclude.add(/\.md$/).end().set("type","css").use("postcss").loader(require.resolve("postcss-loader")).options({postcssOptions:{plugins:o}})}});
|
package/dist/index.d.cts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { GlobalStore } from '@empjs/cli';
|
|
2
|
-
import autoprefixer from 'autoprefixer';
|
|
3
|
-
import { Input, AcceptedPlugin } from 'postcss';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* postcss-pxtorem 配置选项
|
|
7
|
-
*/
|
|
8
|
-
interface PxToRemOptions {
|
|
9
|
-
rootValue?: number | ((input: Input) => number);
|
|
10
|
-
unitPrecision?: number;
|
|
11
|
-
propList?: string[];
|
|
12
|
-
selectorBlackList?: Array<string | RegExp>;
|
|
13
|
-
replace?: boolean;
|
|
14
|
-
mediaQuery?: boolean;
|
|
15
|
-
minPixelValue?: number;
|
|
16
|
-
exclude?: string | RegExp | ((file: string) => boolean);
|
|
17
|
-
unit?: string;
|
|
18
|
-
}
|
|
19
|
-
type TailwindcssOptions = {
|
|
20
|
-
pxToRemOptions?: PxToRemOptions;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
declare const _default: (tailwindcssOptions?: TailwindcssOptions, autoprefixerOptions?: autoprefixer.Options, presetEnvFeature?: Record<string, boolean>, customPostcssPlugins?: AcceptedPlugin[]) => {
|
|
24
|
-
name: string;
|
|
25
|
-
rsConfig(store: GlobalStore): Promise<void>;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { _default as default };
|
package/dist/tailwindcss.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var l=Object.create;var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var a=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var c=(o,r)=>{for(var p in r)i(o,p,{get:r[p],enumerable:!0})},f=(o,r,p,x)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of u(r))!b.call(o,t)&&t!==p&&i(o,t,{get:()=>r[t],enumerable:!(x=n(r,t))||x.enumerable});return o},e=(o,r,p)=>(f(o,r,"default"),p&&f(p,r,"default")),d=(o,r,p)=>(p=o!=null?l(a(o)):{},f(r||!o||!o.__esModule?i(p,"default",{value:o,enumerable:!0}):p,o)),h=o=>f(i({},"__esModule",{value:!0}),o);var m={};c(m,{plugin:()=>g.default});module.exports=h(m);e(m,require("tailwindcss"),module.exports);var g=d(require("tailwindcss/plugin"),1);0&&(module.exports={plugin,...require("tailwindcss")});
|
package/dist/tailwindcss.d.cts
DELETED