@torpor/unplugin 0.0.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.md +5 -0
- package/README.md +3 -0
- package/dist/astro.cjs +20 -0
- package/dist/astro.d.cts +10 -0
- package/dist/astro.d.ts +10 -0
- package/dist/astro.js +17 -0
- package/dist/chunk-IDROHKDP.cjs +76 -0
- package/dist/chunk-M2BRZK6I.js +11 -0
- package/dist/chunk-ORZH7UWL.cjs +11 -0
- package/dist/chunk-T77FPB2F.js +76 -0
- package/dist/chunk-YSSS7NR3.cjs +11 -0
- package/dist/chunk-ZILEQUAL.js +11 -0
- package/dist/esbuild.cjs +13 -0
- package/dist/esbuild.d.cts +6 -0
- package/dist/esbuild.d.ts +6 -0
- package/dist/esbuild.js +10 -0
- package/dist/index.cjs +11 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +10 -0
- package/dist/nuxt.cjs +30 -0
- package/dist/nuxt.d.cts +8 -0
- package/dist/nuxt.d.ts +8 -0
- package/dist/nuxt.js +27 -0
- package/dist/rollup.cjs +13 -0
- package/dist/rollup.d.cts +6 -0
- package/dist/rollup.d.ts +6 -0
- package/dist/rollup.js +10 -0
- package/dist/rspack.cjs +13 -0
- package/dist/rspack.d.cts +5 -0
- package/dist/rspack.d.ts +5 -0
- package/dist/rspack.js +10 -0
- package/dist/types.cjs +1 -0
- package/dist/types.d.cts +5 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.js +0 -0
- package/dist/vite.cjs +10 -0
- package/dist/vite.d.cts +6 -0
- package/dist/vite.d.ts +6 -0
- package/dist/vite.js +7 -0
- package/dist/webpack.cjs +10 -0
- package/dist/webpack.d.cts +6 -0
- package/dist/webpack.d.ts +6 -0
- package/dist/webpack.js +7 -0
- package/package.json +137 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Copyright 2024 <OWNER>
|
|
2
|
+
|
|
3
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
4
|
+
|
|
5
|
+
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
package/dist/astro.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkIDROHKDPcjs = require('./chunk-IDROHKDP.cjs');
|
|
4
|
+
|
|
5
|
+
// src/astro.ts
|
|
6
|
+
var astro_default = (options) => ({
|
|
7
|
+
name: "unplugin-torpor",
|
|
8
|
+
hooks: {
|
|
9
|
+
"astro:config:setup": async (astro) => {
|
|
10
|
+
astro.config.vite.plugins ||= [];
|
|
11
|
+
astro.config.vite.plugins.push(_chunkIDROHKDPcjs.src_default.vite(options));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
module.exports = astro_default;
|
|
18
|
+
|
|
19
|
+
module.exports = exports.default;
|
|
20
|
+
exports.default = module.exports;
|
package/dist/astro.d.cts
ADDED
package/dist/astro.d.ts
ADDED
package/dist/astro.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
src_default
|
|
3
|
+
} from "./chunk-T77FPB2F.js";
|
|
4
|
+
|
|
5
|
+
// src/astro.ts
|
|
6
|
+
var astro_default = (options) => ({
|
|
7
|
+
name: "unplugin-torpor",
|
|
8
|
+
hooks: {
|
|
9
|
+
"astro:config:setup": async (astro) => {
|
|
10
|
+
astro.config.vite.plugins ||= [];
|
|
11
|
+
astro.config.vite.plugins.push(src_default.vite(options));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
astro_default as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/index.ts
|
|
2
|
+
var _compile = require('@torpor/view/compile');
|
|
3
|
+
var _unplugin = require('unplugin');
|
|
4
|
+
var _vite = require('vite');
|
|
5
|
+
var styles = /* @__PURE__ */ new Map();
|
|
6
|
+
var unpluginFactory = (options) => ({
|
|
7
|
+
name: "unplugin-torpor",
|
|
8
|
+
resolveId(id) {
|
|
9
|
+
if (styles.has(id)) {
|
|
10
|
+
return id;
|
|
11
|
+
}
|
|
12
|
+
return void 0;
|
|
13
|
+
},
|
|
14
|
+
load(id) {
|
|
15
|
+
if (styles.has(id)) {
|
|
16
|
+
return styles.get(id);
|
|
17
|
+
}
|
|
18
|
+
return void 0;
|
|
19
|
+
},
|
|
20
|
+
transformInclude(id) {
|
|
21
|
+
return /\.torp\?*/.test(id);
|
|
22
|
+
},
|
|
23
|
+
transform(code, id) {
|
|
24
|
+
let parsed = _compile.parse.call(void 0, code);
|
|
25
|
+
if (parsed.ok && parsed.template) {
|
|
26
|
+
return transform(parsed.template, id, options);
|
|
27
|
+
} else {
|
|
28
|
+
let name = _optionalChain([id, 'access', _ => _.split, 'call', _2 => _2(/[\\\/]/), 'access', _3 => _3.at, 'call', _4 => _4(-1), 'optionalAccess', _5 => _5.replace, 'call', _6 => _6(/\.torp$/, "")]);
|
|
29
|
+
let errorMessages = parsed.errors.map((e) => `${e.line},${e.column}: ${e.message}`);
|
|
30
|
+
console.log(`
|
|
31
|
+
ERRORS
|
|
32
|
+
======
|
|
33
|
+
${errorMessages.join("\n")}`);
|
|
34
|
+
let errorCode = `
|
|
35
|
+
export default function Error() {
|
|
36
|
+
@render {
|
|
37
|
+
<div style="background-color: #222; color: #f44"; font-size: 15px; line-height: 1.5;">
|
|
38
|
+
<p style="margin: 0; padding: 0;">
|
|
39
|
+
<strong>Error${parsed.errors.length === 1 ? "" : "s"} in ${name}:</strong>
|
|
40
|
+
</p>
|
|
41
|
+
<ul style="margin: 0; padding: 0 20px">
|
|
42
|
+
${errorMessages.map((e) => `<li>${e}</li>`).join("\n")}
|
|
43
|
+
</ul>
|
|
44
|
+
</div>
|
|
45
|
+
}
|
|
46
|
+
}`;
|
|
47
|
+
let errorParsed = _compile.parse.call(void 0, errorCode);
|
|
48
|
+
if (errorParsed.ok && errorParsed.template) {
|
|
49
|
+
return transform(errorParsed.template, id, options);
|
|
50
|
+
}
|
|
51
|
+
throw new Error(`Parse failed for ${id}, ${errorMessages.join("\n")}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
function transform(template, id, options) {
|
|
56
|
+
const built = _compile.build.call(void 0, template, options);
|
|
57
|
+
let transformed = built.code;
|
|
58
|
+
if (built.styles) {
|
|
59
|
+
for (let style of built.styles) {
|
|
60
|
+
transformed = `import '${style.hash}.css';
|
|
61
|
+
` + transformed;
|
|
62
|
+
styles.set(style.hash + ".css", style.style);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return _vite.transformWithEsbuild.call(void 0, transformed, id, {
|
|
66
|
+
loader: "ts"
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
var unplugin = /* @__PURE__ */ _unplugin.createUnplugin.call(void 0, unpluginFactory);
|
|
70
|
+
var src_default = unplugin;
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
exports.unpluginFactory = unpluginFactory; exports.unplugin = unplugin; exports.src_default = src_default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkIDROHKDPcjs = require('./chunk-IDROHKDP.cjs');
|
|
4
|
+
|
|
5
|
+
// src/webpack.ts
|
|
6
|
+
var _unplugin = require('unplugin');
|
|
7
|
+
var webpack_default = _unplugin.createWebpackPlugin.call(void 0, _chunkIDROHKDPcjs.unpluginFactory);
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.webpack_default = webpack_default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { build, parse } from "@torpor/view/compile";
|
|
3
|
+
import { createUnplugin } from "unplugin";
|
|
4
|
+
import { transformWithEsbuild } from "vite";
|
|
5
|
+
var styles = /* @__PURE__ */ new Map();
|
|
6
|
+
var unpluginFactory = (options) => ({
|
|
7
|
+
name: "unplugin-torpor",
|
|
8
|
+
resolveId(id) {
|
|
9
|
+
if (styles.has(id)) {
|
|
10
|
+
return id;
|
|
11
|
+
}
|
|
12
|
+
return void 0;
|
|
13
|
+
},
|
|
14
|
+
load(id) {
|
|
15
|
+
if (styles.has(id)) {
|
|
16
|
+
return styles.get(id);
|
|
17
|
+
}
|
|
18
|
+
return void 0;
|
|
19
|
+
},
|
|
20
|
+
transformInclude(id) {
|
|
21
|
+
return /\.torp\?*/.test(id);
|
|
22
|
+
},
|
|
23
|
+
transform(code, id) {
|
|
24
|
+
let parsed = parse(code);
|
|
25
|
+
if (parsed.ok && parsed.template) {
|
|
26
|
+
return transform(parsed.template, id, options);
|
|
27
|
+
} else {
|
|
28
|
+
let name = id.split(/[\\\/]/).at(-1)?.replace(/\.torp$/, "");
|
|
29
|
+
let errorMessages = parsed.errors.map((e) => `${e.line},${e.column}: ${e.message}`);
|
|
30
|
+
console.log(`
|
|
31
|
+
ERRORS
|
|
32
|
+
======
|
|
33
|
+
${errorMessages.join("\n")}`);
|
|
34
|
+
let errorCode = `
|
|
35
|
+
export default function Error() {
|
|
36
|
+
@render {
|
|
37
|
+
<div style="background-color: #222; color: #f44"; font-size: 15px; line-height: 1.5;">
|
|
38
|
+
<p style="margin: 0; padding: 0;">
|
|
39
|
+
<strong>Error${parsed.errors.length === 1 ? "" : "s"} in ${name}:</strong>
|
|
40
|
+
</p>
|
|
41
|
+
<ul style="margin: 0; padding: 0 20px">
|
|
42
|
+
${errorMessages.map((e) => `<li>${e}</li>`).join("\n")}
|
|
43
|
+
</ul>
|
|
44
|
+
</div>
|
|
45
|
+
}
|
|
46
|
+
}`;
|
|
47
|
+
let errorParsed = parse(errorCode);
|
|
48
|
+
if (errorParsed.ok && errorParsed.template) {
|
|
49
|
+
return transform(errorParsed.template, id, options);
|
|
50
|
+
}
|
|
51
|
+
throw new Error(`Parse failed for ${id}, ${errorMessages.join("\n")}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
function transform(template, id, options) {
|
|
56
|
+
const built = build(template, options);
|
|
57
|
+
let transformed = built.code;
|
|
58
|
+
if (built.styles) {
|
|
59
|
+
for (let style of built.styles) {
|
|
60
|
+
transformed = `import '${style.hash}.css';
|
|
61
|
+
` + transformed;
|
|
62
|
+
styles.set(style.hash + ".css", style.style);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return transformWithEsbuild(transformed, id, {
|
|
66
|
+
loader: "ts"
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
var unplugin = /* @__PURE__ */ createUnplugin(unpluginFactory);
|
|
70
|
+
var src_default = unplugin;
|
|
71
|
+
|
|
72
|
+
export {
|
|
73
|
+
unpluginFactory,
|
|
74
|
+
unplugin,
|
|
75
|
+
src_default
|
|
76
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkIDROHKDPcjs = require('./chunk-IDROHKDP.cjs');
|
|
4
|
+
|
|
5
|
+
// src/vite.ts
|
|
6
|
+
var _unplugin = require('unplugin');
|
|
7
|
+
var vite_default = _unplugin.createVitePlugin.call(void 0, _chunkIDROHKDPcjs.unpluginFactory);
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.vite_default = vite_default;
|
package/dist/esbuild.cjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkIDROHKDPcjs = require('./chunk-IDROHKDP.cjs');
|
|
4
|
+
|
|
5
|
+
// src/esbuild.ts
|
|
6
|
+
var _unplugin = require('unplugin');
|
|
7
|
+
var esbuild_default = _unplugin.createEsbuildPlugin.call(void 0, _chunkIDROHKDPcjs.unpluginFactory);
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
module.exports = esbuild_default;
|
|
11
|
+
|
|
12
|
+
module.exports = exports.default;
|
|
13
|
+
exports.default = module.exports;
|
package/dist/esbuild.js
ADDED
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkIDROHKDPcjs = require('./chunk-IDROHKDP.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
module.exports = _chunkIDROHKDPcjs.src_default; exports.unplugin = _chunkIDROHKDPcjs.unplugin; exports.unpluginFactory = _chunkIDROHKDPcjs.unpluginFactory;
|
|
11
|
+
exports.default = module.exports;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as unplugin$1 from 'unplugin';
|
|
2
|
+
import { UnpluginFactory } from 'unplugin';
|
|
3
|
+
import { Options } from './types.cjs';
|
|
4
|
+
|
|
5
|
+
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
6
|
+
declare const unplugin: unplugin$1.UnpluginInstance<Options | undefined, boolean>;
|
|
7
|
+
|
|
8
|
+
export { unplugin as default, unplugin, unpluginFactory };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as unplugin$1 from 'unplugin';
|
|
2
|
+
import { UnpluginFactory } from 'unplugin';
|
|
3
|
+
import { Options } from './types.js';
|
|
4
|
+
|
|
5
|
+
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
6
|
+
declare const unplugin: unplugin$1.UnpluginInstance<Options | undefined, boolean>;
|
|
7
|
+
|
|
8
|
+
export { unplugin as default, unplugin, unpluginFactory };
|
package/dist/index.js
ADDED
package/dist/nuxt.cjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkORZH7UWLcjs = require('./chunk-ORZH7UWL.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkYSSS7NR3cjs = require('./chunk-YSSS7NR3.cjs');
|
|
7
|
+
require('./chunk-IDROHKDP.cjs');
|
|
8
|
+
|
|
9
|
+
// src/nuxt.ts
|
|
10
|
+
var _kit = require('@nuxt/kit');
|
|
11
|
+
require('@nuxt/schema');
|
|
12
|
+
var nuxt_default = _kit.defineNuxtModule.call(void 0, {
|
|
13
|
+
meta: {
|
|
14
|
+
name: "nuxt-unplugin-torpor",
|
|
15
|
+
configKey: "unpluginStarter"
|
|
16
|
+
},
|
|
17
|
+
defaults: {
|
|
18
|
+
// ...default options
|
|
19
|
+
},
|
|
20
|
+
setup(options, _nuxt) {
|
|
21
|
+
_kit.addVitePlugin.call(void 0, () => _chunkYSSS7NR3cjs.vite_default.call(void 0, options));
|
|
22
|
+
_kit.addWebpackPlugin.call(void 0, () => _chunkORZH7UWLcjs.webpack_default.call(void 0, options));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
module.exports = nuxt_default;
|
|
28
|
+
|
|
29
|
+
module.exports = exports.default;
|
|
30
|
+
exports.default = module.exports;
|
package/dist/nuxt.d.cts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
import { Options } from './types.cjs';
|
|
3
|
+
|
|
4
|
+
interface ModuleOptions extends Options {
|
|
5
|
+
}
|
|
6
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
|
+
|
|
8
|
+
export { type ModuleOptions, _default as default };
|
package/dist/nuxt.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
import { Options } from './types.js';
|
|
3
|
+
|
|
4
|
+
interface ModuleOptions extends Options {
|
|
5
|
+
}
|
|
6
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
|
+
|
|
8
|
+
export { type ModuleOptions, _default as default };
|
package/dist/nuxt.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
webpack_default
|
|
3
|
+
} from "./chunk-ZILEQUAL.js";
|
|
4
|
+
import {
|
|
5
|
+
vite_default
|
|
6
|
+
} from "./chunk-M2BRZK6I.js";
|
|
7
|
+
import "./chunk-T77FPB2F.js";
|
|
8
|
+
|
|
9
|
+
// src/nuxt.ts
|
|
10
|
+
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
11
|
+
import "@nuxt/schema";
|
|
12
|
+
var nuxt_default = defineNuxtModule({
|
|
13
|
+
meta: {
|
|
14
|
+
name: "nuxt-unplugin-torpor",
|
|
15
|
+
configKey: "unpluginStarter"
|
|
16
|
+
},
|
|
17
|
+
defaults: {
|
|
18
|
+
// ...default options
|
|
19
|
+
},
|
|
20
|
+
setup(options, _nuxt) {
|
|
21
|
+
addVitePlugin(() => vite_default(options));
|
|
22
|
+
addWebpackPlugin(() => webpack_default(options));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
nuxt_default as default
|
|
27
|
+
};
|
package/dist/rollup.cjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkIDROHKDPcjs = require('./chunk-IDROHKDP.cjs');
|
|
4
|
+
|
|
5
|
+
// src/rollup.ts
|
|
6
|
+
var _unplugin = require('unplugin');
|
|
7
|
+
var rollup_default = _unplugin.createRollupPlugin.call(void 0, _chunkIDROHKDPcjs.unpluginFactory);
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
module.exports = rollup_default;
|
|
11
|
+
|
|
12
|
+
module.exports = exports.default;
|
|
13
|
+
exports.default = module.exports;
|
package/dist/rollup.d.ts
ADDED
package/dist/rollup.js
ADDED
package/dist/rspack.cjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkIDROHKDPcjs = require('./chunk-IDROHKDP.cjs');
|
|
4
|
+
|
|
5
|
+
// src/rspack.ts
|
|
6
|
+
var _unplugin = require('unplugin');
|
|
7
|
+
var rspack_default = _unplugin.createRspackPlugin.call(void 0, _chunkIDROHKDPcjs.unpluginFactory);
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
module.exports = rspack_default;
|
|
11
|
+
|
|
12
|
+
module.exports = exports.default;
|
|
13
|
+
exports.default = module.exports;
|
package/dist/rspack.d.ts
ADDED
package/dist/rspack.js
ADDED
package/dist/types.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.default = module.exports;
|
package/dist/types.d.cts
ADDED
package/dist/types.d.ts
ADDED
package/dist/types.js
ADDED
|
File without changes
|
package/dist/vite.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkYSSS7NR3cjs = require('./chunk-YSSS7NR3.cjs');
|
|
4
|
+
require('./chunk-IDROHKDP.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module.exports = _chunkYSSS7NR3cjs.vite_default;
|
|
8
|
+
|
|
9
|
+
module.exports = exports.default;
|
|
10
|
+
exports.default = module.exports;
|
package/dist/vite.d.cts
ADDED
package/dist/vite.d.ts
ADDED
package/dist/vite.js
ADDED
package/dist/webpack.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkORZH7UWLcjs = require('./chunk-ORZH7UWL.cjs');
|
|
4
|
+
require('./chunk-IDROHKDP.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module.exports = _chunkORZH7UWLcjs.webpack_default;
|
|
8
|
+
|
|
9
|
+
module.exports = exports.default;
|
|
10
|
+
exports.default = module.exports;
|
package/dist/webpack.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@torpor/unplugin",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"description": "Unplugin package to compile Torpor components for Vite, Rollup, and other bundlers",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"torpor",
|
|
8
|
+
"unplugin"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
},
|
|
16
|
+
"./astro": {
|
|
17
|
+
"types": "./dist/astro.d.ts",
|
|
18
|
+
"import": "./dist/astro.js",
|
|
19
|
+
"require": "./dist/astro.cjs"
|
|
20
|
+
},
|
|
21
|
+
"./rspack": {
|
|
22
|
+
"types": "./dist/rspack.d.ts",
|
|
23
|
+
"import": "./dist/rspack.js",
|
|
24
|
+
"require": "./dist/rspack.cjs"
|
|
25
|
+
},
|
|
26
|
+
"./vite": {
|
|
27
|
+
"types": "./dist/vite.d.ts",
|
|
28
|
+
"import": "./dist/vite.js",
|
|
29
|
+
"require": "./dist/vite.cjs"
|
|
30
|
+
},
|
|
31
|
+
"./webpack": {
|
|
32
|
+
"types": "./dist/webpack.d.ts",
|
|
33
|
+
"import": "./dist/webpack.js",
|
|
34
|
+
"require": "./dist/webpack.cjs"
|
|
35
|
+
},
|
|
36
|
+
"./rollup": {
|
|
37
|
+
"types": "./dist/rollup.d.ts",
|
|
38
|
+
"import": "./dist/rollup.js",
|
|
39
|
+
"require": "./dist/rollup.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./esbuild": {
|
|
42
|
+
"types": "./dist/esbuild.d.ts",
|
|
43
|
+
"import": "./dist/esbuild.js",
|
|
44
|
+
"require": "./dist/esbuild.cjs"
|
|
45
|
+
},
|
|
46
|
+
"./nuxt": {
|
|
47
|
+
"types": "./dist/nuxt.d.ts",
|
|
48
|
+
"import": "./dist/nuxt.js",
|
|
49
|
+
"require": "./dist/nuxt.cjs"
|
|
50
|
+
},
|
|
51
|
+
"./types": {
|
|
52
|
+
"types": "./dist/types.d.ts",
|
|
53
|
+
"import": "./dist/types.js",
|
|
54
|
+
"require": "./dist/types.cjs"
|
|
55
|
+
},
|
|
56
|
+
"./*": "./*"
|
|
57
|
+
},
|
|
58
|
+
"main": "dist/index.cjs",
|
|
59
|
+
"module": "dist/index.js",
|
|
60
|
+
"types": "dist/index.d.ts",
|
|
61
|
+
"typesVersions": {
|
|
62
|
+
"*": {
|
|
63
|
+
"*": [
|
|
64
|
+
"./dist/*",
|
|
65
|
+
"./*"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"files": [
|
|
70
|
+
"dist"
|
|
71
|
+
],
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"access": "public"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"@nuxt/kit": "^3",
|
|
77
|
+
"@nuxt/schema": "^3",
|
|
78
|
+
"esbuild": "*",
|
|
79
|
+
"rollup": "^3",
|
|
80
|
+
"vite": ">=3",
|
|
81
|
+
"webpack": "^4 || ^5"
|
|
82
|
+
},
|
|
83
|
+
"peerDependenciesMeta": {
|
|
84
|
+
"webpack": {
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
"rollup": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"vite": {
|
|
91
|
+
"optional": true
|
|
92
|
+
},
|
|
93
|
+
"esbuild": {
|
|
94
|
+
"optional": true
|
|
95
|
+
},
|
|
96
|
+
"@nuxt/kit": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
99
|
+
"@nuxt/schema": {
|
|
100
|
+
"optional": true
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"dependencies": {
|
|
104
|
+
"unplugin": "^2.0.0",
|
|
105
|
+
"@torpor/view": "^0.0.1"
|
|
106
|
+
},
|
|
107
|
+
"devDependencies": {
|
|
108
|
+
"@antfu/eslint-config": "^3.11.2",
|
|
109
|
+
"@nuxt/kit": "^3.14.1592",
|
|
110
|
+
"@nuxt/schema": "^3.14.1592",
|
|
111
|
+
"@trivago/prettier-plugin-sort-imports": "^5.2.0",
|
|
112
|
+
"@types/node": "^22.10.1",
|
|
113
|
+
"bumpp": "^9.9.0",
|
|
114
|
+
"chalk": "^5.3.0",
|
|
115
|
+
"eslint": "^9.16.0",
|
|
116
|
+
"esno": "^4.8.0",
|
|
117
|
+
"fast-glob": "^3.3.2",
|
|
118
|
+
"nodemon": "^3.1.7",
|
|
119
|
+
"prettier": "^3.4.2",
|
|
120
|
+
"rimraf": "^6.0.1",
|
|
121
|
+
"rollup": "^4.28.1",
|
|
122
|
+
"tsup": "^8.3.5",
|
|
123
|
+
"typescript": "^5.7.2",
|
|
124
|
+
"vite": "^6.0.3",
|
|
125
|
+
"vitest": "^2.1.8",
|
|
126
|
+
"webpack": "^5.97.1"
|
|
127
|
+
},
|
|
128
|
+
"scripts": {
|
|
129
|
+
"build": "tsup",
|
|
130
|
+
"build:watch": "tsup --watch src",
|
|
131
|
+
"build:fix": "esno scripts/postbuild.ts",
|
|
132
|
+
"lint": "eslint .",
|
|
133
|
+
"play": "npm -C playground run dev",
|
|
134
|
+
"release": "bumpp && npm publish",
|
|
135
|
+
"start": "esno src/index.ts"
|
|
136
|
+
}
|
|
137
|
+
}
|