rollup-plugin-solid-styled 0.7.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/LICENSE +7 -0
- package/README.md +42 -0
- package/dist/cjs/development/index.cjs +91 -0
- package/dist/cjs/development/index.cjs.map +7 -0
- package/dist/cjs/production/index.cjs +1 -0
- package/dist/esm/development/index.mjs +67 -0
- package/dist/esm/development/index.mjs.map +7 -0
- package/dist/esm/production/index.mjs +1 -0
- package/dist/types/index.d.ts +14 -0
- package/package.json +81 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
MIT License Copyright (c) 2022 <author>
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# rollup-plugin-solid-styled
|
|
2
|
+
|
|
3
|
+
> Rollup plugin for [`solid-styled`](https://github.com/lxsmnsyc/solid-styled)
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/rollup-plugin-solid-styled) [](https://github.com/airbnb/javascript)
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install --D rollup-plugin-solid-styled
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
yarn add -D rollup-plugin-solid-styled
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pnpm add -D rollup-plugin-solid-styled
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
import solidStyled from 'rollup-plugin-solid-styled';
|
|
25
|
+
|
|
26
|
+
///...
|
|
27
|
+
solidStyled({
|
|
28
|
+
verbose: true, // defaults to false
|
|
29
|
+
prefix: 'my-prefix', // optional
|
|
30
|
+
filter: {
|
|
31
|
+
include: 'src/**/*.ts',
|
|
32
|
+
exclude: 'node_modules/**/*.{ts,js}',
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
> **Note**
|
|
38
|
+
> When you are using a SolidJS Rollup plugin, make sure that solid-styled runs first.
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
MIT © [lxsmnsyc](https://github.com/lxsmnsyc)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __export = (target, all) => {
|
|
26
|
+
for (var name in all)
|
|
27
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
+
};
|
|
29
|
+
var __copyProps = (to, from, except, desc) => {
|
|
30
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
31
|
+
for (let key of __getOwnPropNames(from))
|
|
32
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
33
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
|
+
}
|
|
35
|
+
return to;
|
|
36
|
+
};
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
38
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
39
|
+
mod
|
|
40
|
+
));
|
|
41
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
|
+
|
|
43
|
+
// src/index.ts
|
|
44
|
+
var src_exports = {};
|
|
45
|
+
__export(src_exports, {
|
|
46
|
+
default: () => solidStyledPlugin
|
|
47
|
+
});
|
|
48
|
+
module.exports = __toCommonJS(src_exports);
|
|
49
|
+
var import_babel = __toESM(require("solid-styled/babel"), 1);
|
|
50
|
+
var import_pluginutils = require("@rollup/pluginutils");
|
|
51
|
+
var babel = __toESM(require("@babel/core"), 1);
|
|
52
|
+
var import_path = __toESM(require("path"), 1);
|
|
53
|
+
var import_preset_typescript = __toESM(require("@babel/preset-typescript"), 1);
|
|
54
|
+
function solidStyledPlugin(options = {}) {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
const filter = (0, import_pluginutils.createFilter)(
|
|
57
|
+
(_a = options.filter) == null ? void 0 : _a.include,
|
|
58
|
+
(_b = options.filter) == null ? void 0 : _b.exclude
|
|
59
|
+
);
|
|
60
|
+
return {
|
|
61
|
+
name: "solid-styled",
|
|
62
|
+
async transform(code, id) {
|
|
63
|
+
var _a2, _b2, _c, _d, _e;
|
|
64
|
+
if (filter(id)) {
|
|
65
|
+
const result = await babel.transformAsync(code, __spreadProps(__spreadValues({}, options.babel), {
|
|
66
|
+
presets: [
|
|
67
|
+
[import_preset_typescript.default],
|
|
68
|
+
...(_b2 = (_a2 = options.babel) == null ? void 0 : _a2.presets) != null ? _b2 : []
|
|
69
|
+
],
|
|
70
|
+
plugins: [
|
|
71
|
+
[import_babel.default, {
|
|
72
|
+
verbose: options.verbose,
|
|
73
|
+
prefix: options.prefix,
|
|
74
|
+
source: id
|
|
75
|
+
}],
|
|
76
|
+
...(_d = (_c = options.babel) == null ? void 0 : _c.plugins) != null ? _d : []
|
|
77
|
+
],
|
|
78
|
+
filename: import_path.default.basename(id)
|
|
79
|
+
}));
|
|
80
|
+
if (result) {
|
|
81
|
+
return {
|
|
82
|
+
code: (_e = result.code) != null ? _e : "",
|
|
83
|
+
map: result.map
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return void 0;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import solidStyledBabel from 'solid-styled/babel';\nimport { Plugin } from 'rollup';\nimport { createFilter, FilterPattern } from '@rollup/pluginutils';\nimport * as babel from '@babel/core';\nimport path from 'path';\nimport ts from '@babel/preset-typescript';\n\nexport interface SolidStyledPluginFilter {\n include?: FilterPattern;\n exclude?: FilterPattern;\n}\n\nexport interface SolidStyledPluginOptions {\n verbose?: boolean;\n prefix?: string;\n filter?: SolidStyledPluginFilter;\n babel?: babel.TransformOptions;\n}\n\nexport default function solidStyledPlugin(\n options: SolidStyledPluginOptions = {},\n): Plugin {\n const filter = createFilter(\n options.filter?.include,\n options.filter?.exclude,\n );\n return {\n name: 'solid-styled',\n async transform(code, id) {\n if (filter(id)) {\n const result = await babel.transformAsync(code, {\n ...options.babel,\n presets: [\n [ts],\n ...(options.babel?.presets ?? []),\n ],\n plugins: [\n [solidStyledBabel, {\n verbose: options.verbose,\n prefix: options.prefix,\n source: id,\n }],\n ...(options.babel?.plugins ?? []),\n ],\n filename: path.basename(id),\n });\n\n if (result) {\n return {\n code: result.code ?? '',\n map: result.map,\n };\n }\n }\n return undefined;\n },\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6B;AAE7B,yBAA4C;AAC5C,YAAuB;AACvB,kBAAiB;AACjB,+BAAe;AAcA,SAAR,kBACL,UAAoC,CAAC,GAC7B;AArBV;AAsBE,QAAM,aAAS;AAAA,KACb,aAAQ,WAAR,mBAAgB;AAAA,KAChB,aAAQ,WAAR,mBAAgB;AAAA,EAClB;AACA,SAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM,UAAU,MAAM,IAAI;AA5B9B,UAAAA,KAAAC,KAAA;AA6BM,UAAI,OAAO,EAAE,GAAG;AACd,cAAM,SAAS,MAAY,qBAAe,MAAM,iCAC3C,QAAQ,QADmC;AAAA,UAE9C,SAAS;AAAA,YACP,CAAC,yBAAAC,OAAE;AAAA,YACH,IAAID,OAAAD,MAAA,QAAQ,UAAR,gBAAAA,IAAe,YAAf,OAAAC,MAA0B,CAAC;AAAA,UACjC;AAAA,UACA,SAAS;AAAA,YACP,CAAC,aAAAE,SAAkB;AAAA,cACjB,SAAS,QAAQ;AAAA,cACjB,QAAQ,QAAQ;AAAA,cAChB,QAAQ;AAAA,YACV,CAAC;AAAA,YACD,IAAI,mBAAQ,UAAR,mBAAe,YAAf,YAA0B,CAAC;AAAA,UACjC;AAAA,UACA,UAAU,YAAAC,QAAK,SAAS,EAAE;AAAA,QAC5B,EAAC;AAED,YAAI,QAAQ;AACV,iBAAO;AAAA,YACL,OAAM,YAAO,SAAP,YAAe;AAAA,YACrB,KAAK,OAAO;AAAA,UACd;AAAA,QACF;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["_a", "_b", "ts", "solidStyledBabel", "path"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var A=Object.create;var n=Object.defineProperty,B=Object.defineProperties,T=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,q=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var c=(e,r,l)=>r in e?n(e,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[r]=l,P=(e,r)=>{for(var l in r||(r={}))g.call(r,l)&&c(e,l,r[l]);if(p)for(var l of p(r))z.call(r,l)&&c(e,l,r[l]);return e},S=(e,r)=>B(e,j(r));var C=(e,r)=>{for(var l in r)n(e,l,{get:r[l],enumerable:!0})},y=(e,r,l,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of k(r))!g.call(e,t)&&t!==l&&n(e,t,{get:()=>r[t],enumerable:!(i=T(r,t))||i.enumerable});return e};var a=(e,r,l)=>(l=e!=null?A(q(e)):{},y(r||!e||!e.__esModule?n(l,"default",{value:e,enumerable:!0}):l,e)),D=e=>y(n({},"__esModule",{value:!0}),e);var E={};C(E,{default:()=>w});module.exports=D(E);var x=a(require("solid-styled/babel"),1),F=require("@rollup/pluginutils"),v=a(require("@babel/core"),1),O=a(require("path"),1),h=a(require("@babel/preset-typescript"),1);function w(e={}){var l,i;let r=(0,F.createFilter)((l=e.filter)==null?void 0:l.include,(i=e.filter)==null?void 0:i.exclude);return{name:"solid-styled",async transform(t,o){var s,d,u,b,m;if(r(o)){let f=await v.transformAsync(t,S(P({},e.babel),{presets:[[h.default],...(d=(s=e.babel)==null?void 0:s.presets)!=null?d:[]],plugins:[[x.default,{verbose:e.verbose,prefix:e.prefix,source:o}],...(b=(u=e.babel)==null?void 0:u.plugins)!=null?b:[]],filename:O.default.basename(o)}));if(f)return{code:(m=f.code)!=null?m:"",map:f.map}}}}}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
import solidStyledBabel from "solid-styled/babel";
|
|
23
|
+
import { createFilter } from "@rollup/pluginutils";
|
|
24
|
+
import * as babel from "@babel/core";
|
|
25
|
+
import path from "path";
|
|
26
|
+
import ts from "@babel/preset-typescript";
|
|
27
|
+
function solidStyledPlugin(options = {}) {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
const filter = createFilter(
|
|
30
|
+
(_a = options.filter) == null ? void 0 : _a.include,
|
|
31
|
+
(_b = options.filter) == null ? void 0 : _b.exclude
|
|
32
|
+
);
|
|
33
|
+
return {
|
|
34
|
+
name: "solid-styled",
|
|
35
|
+
async transform(code, id) {
|
|
36
|
+
var _a2, _b2, _c, _d, _e;
|
|
37
|
+
if (filter(id)) {
|
|
38
|
+
const result = await babel.transformAsync(code, __spreadProps(__spreadValues({}, options.babel), {
|
|
39
|
+
presets: [
|
|
40
|
+
[ts],
|
|
41
|
+
...(_b2 = (_a2 = options.babel) == null ? void 0 : _a2.presets) != null ? _b2 : []
|
|
42
|
+
],
|
|
43
|
+
plugins: [
|
|
44
|
+
[solidStyledBabel, {
|
|
45
|
+
verbose: options.verbose,
|
|
46
|
+
prefix: options.prefix,
|
|
47
|
+
source: id
|
|
48
|
+
}],
|
|
49
|
+
...(_d = (_c = options.babel) == null ? void 0 : _c.plugins) != null ? _d : []
|
|
50
|
+
],
|
|
51
|
+
filename: path.basename(id)
|
|
52
|
+
}));
|
|
53
|
+
if (result) {
|
|
54
|
+
return {
|
|
55
|
+
code: (_e = result.code) != null ? _e : "",
|
|
56
|
+
map: result.map
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return void 0;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
solidStyledPlugin as default
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import solidStyledBabel from 'solid-styled/babel';\nimport { Plugin } from 'rollup';\nimport { createFilter, FilterPattern } from '@rollup/pluginutils';\nimport * as babel from '@babel/core';\nimport path from 'path';\nimport ts from '@babel/preset-typescript';\n\nexport interface SolidStyledPluginFilter {\n include?: FilterPattern;\n exclude?: FilterPattern;\n}\n\nexport interface SolidStyledPluginOptions {\n verbose?: boolean;\n prefix?: string;\n filter?: SolidStyledPluginFilter;\n babel?: babel.TransformOptions;\n}\n\nexport default function solidStyledPlugin(\n options: SolidStyledPluginOptions = {},\n): Plugin {\n const filter = createFilter(\n options.filter?.include,\n options.filter?.exclude,\n );\n return {\n name: 'solid-styled',\n async transform(code, id) {\n if (filter(id)) {\n const result = await babel.transformAsync(code, {\n ...options.babel,\n presets: [\n [ts],\n ...(options.babel?.presets ?? []),\n ],\n plugins: [\n [solidStyledBabel, {\n verbose: options.verbose,\n prefix: options.prefix,\n source: id,\n }],\n ...(options.babel?.plugins ?? []),\n ],\n filename: path.basename(id),\n });\n\n if (result) {\n return {\n code: result.code ?? '',\n map: result.map,\n };\n }\n }\n return undefined;\n },\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,sBAAsB;AAE7B,SAAS,oBAAmC;AAC5C,YAAY,WAAW;AACvB,OAAO,UAAU;AACjB,OAAO,QAAQ;AAcA,SAAR,kBACL,UAAoC,CAAC,GAC7B;AArBV;AAsBE,QAAM,SAAS;AAAA,KACb,aAAQ,WAAR,mBAAgB;AAAA,KAChB,aAAQ,WAAR,mBAAgB;AAAA,EAClB;AACA,SAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM,UAAU,MAAM,IAAI;AA5B9B,UAAAA,KAAAC,KAAA;AA6BM,UAAI,OAAO,EAAE,GAAG;AACd,cAAM,SAAS,MAAY,qBAAe,MAAM,iCAC3C,QAAQ,QADmC;AAAA,UAE9C,SAAS;AAAA,YACP,CAAC,EAAE;AAAA,YACH,IAAIA,OAAAD,MAAA,QAAQ,UAAR,gBAAAA,IAAe,YAAf,OAAAC,MAA0B,CAAC;AAAA,UACjC;AAAA,UACA,SAAS;AAAA,YACP,CAAC,kBAAkB;AAAA,cACjB,SAAS,QAAQ;AAAA,cACjB,QAAQ,QAAQ;AAAA,cAChB,QAAQ;AAAA,YACV,CAAC;AAAA,YACD,IAAI,mBAAQ,UAAR,mBAAe,YAAf,YAA0B,CAAC;AAAA,UACjC;AAAA,UACA,UAAU,KAAK,SAAS,EAAE;AAAA,QAC5B,EAAC;AAED,YAAI,QAAQ;AACV,iBAAO;AAAA,YACL,OAAM,YAAO,SAAP,YAAe;AAAA,YACrB,KAAK,OAAO;AAAA,UACd;AAAA,QACF;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["_a", "_b"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var P=Object.defineProperty,S=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var b=(e,r,l)=>r in e?P(e,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[r]=l,m=(e,r)=>{for(var l in r||(r={}))x.call(r,l)&&b(e,l,r[l]);if(u)for(var l of u(r))F.call(r,l)&&b(e,l,r[l]);return e},p=(e,r)=>S(e,y(r));import v from"solid-styled/babel";import{createFilter as O}from"@rollup/pluginutils";import*as c from"@babel/core";import h from"path";import w from"@babel/preset-typescript";function A(e={}){var l,n;let r=O((l=e.filter)==null?void 0:l.include,(n=e.filter)==null?void 0:n.exclude);return{name:"solid-styled",async transform(g,t){var a,o,f,s,d;if(r(t)){let i=await c.transformAsync(g,p(m({},e.babel),{presets:[[w],...(o=(a=e.babel)==null?void 0:a.presets)!=null?o:[]],plugins:[[v,{verbose:e.verbose,prefix:e.prefix,source:t}],...(s=(f=e.babel)==null?void 0:f.plugins)!=null?s:[]],filename:h.basename(t)}));if(i)return{code:(d=i.code)!=null?d:"",map:i.map}}}}}export{A as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Plugin } from 'rollup';
|
|
2
|
+
import { FilterPattern } from '@rollup/pluginutils';
|
|
3
|
+
import * as babel from '@babel/core';
|
|
4
|
+
export interface SolidStyledPluginFilter {
|
|
5
|
+
include?: FilterPattern;
|
|
6
|
+
exclude?: FilterPattern;
|
|
7
|
+
}
|
|
8
|
+
export interface SolidStyledPluginOptions {
|
|
9
|
+
verbose?: boolean;
|
|
10
|
+
prefix?: string;
|
|
11
|
+
filter?: SolidStyledPluginFilter;
|
|
12
|
+
babel?: babel.TransformOptions;
|
|
13
|
+
}
|
|
14
|
+
export default function solidStyledPlugin(options?: SolidStyledPluginOptions): Plugin;
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rollup-plugin-solid-styled",
|
|
3
|
+
"version": "0.7.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist",
|
|
7
|
+
"babel",
|
|
8
|
+
"core"
|
|
9
|
+
],
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=10"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"pridepack"
|
|
16
|
+
],
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/babel__core": "^7.1.19",
|
|
19
|
+
"@types/node": "^18.11.0",
|
|
20
|
+
"eslint": "^8.25.0",
|
|
21
|
+
"eslint-config-lxsmnsyc": "^0.4.8",
|
|
22
|
+
"pridepack": "2.3.0",
|
|
23
|
+
"rollup": "^3.2.3",
|
|
24
|
+
"solid-styled": "0.7.1",
|
|
25
|
+
"tslib": "^2.4.0",
|
|
26
|
+
"typescript": "^4.8.4",
|
|
27
|
+
"vitest": "^0.24.3"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@babel/core": "^7.19.3",
|
|
31
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
32
|
+
"@rollup/pluginutils": "^5.0.1"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"rollup": "^3",
|
|
36
|
+
"solid-styled": "^0.1"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"prepublishOnly": "pridepack clean && pridepack build",
|
|
40
|
+
"build": "pridepack build",
|
|
41
|
+
"type-check": "pridepack check",
|
|
42
|
+
"lint": "pridepack lint",
|
|
43
|
+
"clean": "pridepack clean",
|
|
44
|
+
"watch": "pridepack watch",
|
|
45
|
+
"start": "pridepack start",
|
|
46
|
+
"dev": "pridepack dev",
|
|
47
|
+
"test": "vitest"
|
|
48
|
+
},
|
|
49
|
+
"description": "Compile-time reactivity for JS",
|
|
50
|
+
"repository": {
|
|
51
|
+
"url": "https://github.com/lxsmnsyc/silmaril.git",
|
|
52
|
+
"type": "git"
|
|
53
|
+
},
|
|
54
|
+
"homepage": "https://github.com/lxsmnsyc/silmaril/packages/rollup",
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/lxsmnsyc/silmaril/issues"
|
|
57
|
+
},
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
},
|
|
61
|
+
"author": "Alexis Munsayac",
|
|
62
|
+
"private": false,
|
|
63
|
+
"types": "./dist/types/index.d.ts",
|
|
64
|
+
"main": "./dist/cjs/production/index.cjs",
|
|
65
|
+
"module": "./dist/esm/production/index.mjs",
|
|
66
|
+
"exports": {
|
|
67
|
+
".": {
|
|
68
|
+
"development": {
|
|
69
|
+
"require": "./dist/cjs/development/index.cjs",
|
|
70
|
+
"import": "./dist/esm/development/index.mjs"
|
|
71
|
+
},
|
|
72
|
+
"require": "./dist/cjs/production/index.cjs",
|
|
73
|
+
"import": "./dist/esm/production/index.mjs",
|
|
74
|
+
"types": "./dist/types/index.d.ts"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"typesVersions": {
|
|
78
|
+
"*": {}
|
|
79
|
+
},
|
|
80
|
+
"gitHead": "db3923b45801badfb3b40539ef4e470c46f99fb7"
|
|
81
|
+
}
|