@powerlines/unplugin 0.0.4
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 +201 -0
- package/README.md +305 -0
- package/dist/_virtual/_rolldown/runtime.cjs +45 -0
- package/dist/_virtual/_rolldown/runtime.mjs +36 -0
- package/dist/astro.cjs +37 -0
- package/dist/astro.d.cts +27 -0
- package/dist/astro.d.cts.map +1 -0
- package/dist/astro.d.mts +27 -0
- package/dist/astro.d.mts.map +1 -0
- package/dist/astro.mjs +36 -0
- package/dist/astro.mjs.map +1 -0
- package/dist/esbuild.cjs +155 -0
- package/dist/esbuild.d.cts +69 -0
- package/dist/esbuild.d.cts.map +1 -0
- package/dist/esbuild.d.mts +69 -0
- package/dist/esbuild.d.mts.map +1 -0
- package/dist/esbuild.mjs +149 -0
- package/dist/esbuild.mjs.map +1 -0
- package/dist/farm.cjs +56 -0
- package/dist/farm.d.cts +51 -0
- package/dist/farm.d.cts.map +1 -0
- package/dist/farm.d.mts +51 -0
- package/dist/farm.d.mts.map +1 -0
- package/dist/farm.mjs +54 -0
- package/dist/farm.mjs.map +1 -0
- package/dist/index.cjs +46 -0
- package/dist/index.d.cts +37 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +37 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +39 -0
- package/dist/index.mjs.map +1 -0
- package/dist/next.cjs +37 -0
- package/dist/next.d.cts +25 -0
- package/dist/next.d.cts.map +1 -0
- package/dist/next.d.mts +25 -0
- package/dist/next.d.mts.map +1 -0
- package/dist/next.mjs +36 -0
- package/dist/next.mjs.map +1 -0
- package/dist/nuxt.cjs +44 -0
- package/dist/nuxt.d.cts +28 -0
- package/dist/nuxt.d.cts.map +1 -0
- package/dist/nuxt.d.mts +29 -0
- package/dist/nuxt.d.mts.map +1 -0
- package/dist/nuxt.mjs +44 -0
- package/dist/nuxt.mjs.map +1 -0
- package/dist/package.cjs +18 -0
- package/dist/package.mjs +7 -0
- package/dist/package.mjs.map +1 -0
- package/dist/rolldown.cjs +161 -0
- package/dist/rolldown.d.cts +65 -0
- package/dist/rolldown.d.cts.map +1 -0
- package/dist/rolldown.d.mts +65 -0
- package/dist/rolldown.d.mts.map +1 -0
- package/dist/rolldown.mjs +153 -0
- package/dist/rolldown.mjs.map +1 -0
- package/dist/rollup.cjs +159 -0
- package/dist/rollup.d.cts +64 -0
- package/dist/rollup.d.cts.map +1 -0
- package/dist/rollup.d.mts +64 -0
- package/dist/rollup.d.mts.map +1 -0
- package/dist/rollup.mjs +149 -0
- package/dist/rollup.mjs.map +1 -0
- package/dist/rspack.cjs +95 -0
- package/dist/rspack.d.cts +58 -0
- package/dist/rspack.d.cts.map +1 -0
- package/dist/rspack.d.mts +58 -0
- package/dist/rspack.d.mts.map +1 -0
- package/dist/rspack.mjs +90 -0
- package/dist/rspack.mjs.map +1 -0
- package/dist/tsdown.cjs +217 -0
- package/dist/tsdown.d.cts +63 -0
- package/dist/tsdown.d.cts.map +1 -0
- package/dist/tsdown.d.mts +63 -0
- package/dist/tsdown.d.mts.map +1 -0
- package/dist/tsdown.mjs +209 -0
- package/dist/tsdown.mjs.map +1 -0
- package/dist/tsup.cjs +116 -0
- package/dist/tsup.d.cts +49 -0
- package/dist/tsup.d.cts.map +1 -0
- package/dist/tsup.d.mts +49 -0
- package/dist/tsup.d.mts.map +1 -0
- package/dist/tsup.mjs +110 -0
- package/dist/tsup.mjs.map +1 -0
- package/dist/types.cjs +0 -0
- package/dist/types.d.cts +12 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +12 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +1 -0
- package/dist/unloader.cjs +52 -0
- package/dist/unloader.d.cts +46 -0
- package/dist/unloader.d.cts.map +1 -0
- package/dist/unloader.d.mts +46 -0
- package/dist/unloader.d.mts.map +1 -0
- package/dist/unloader.mjs +49 -0
- package/dist/unloader.mjs.map +1 -0
- package/dist/unplugin.cjs +239 -0
- package/dist/unplugin.d.cts +60 -0
- package/dist/unplugin.d.cts.map +1 -0
- package/dist/unplugin.d.mts +60 -0
- package/dist/unplugin.d.mts.map +1 -0
- package/dist/unplugin.mjs +234 -0
- package/dist/unplugin.mjs.map +1 -0
- package/dist/vite.cjs +161 -0
- package/dist/vite.d.cts +59 -0
- package/dist/vite.d.cts.map +1 -0
- package/dist/vite.d.mts +59 -0
- package/dist/vite.d.mts.map +1 -0
- package/dist/vite.mjs +155 -0
- package/dist/vite.mjs.map +1 -0
- package/dist/webpack.cjs +94 -0
- package/dist/webpack.d.cts +58 -0
- package/dist/webpack.d.cts.map +1 -0
- package/dist/webpack.d.mts +58 -0
- package/dist/webpack.d.mts.map +1 -0
- package/dist/webpack.mjs +89 -0
- package/dist/webpack.mjs.map +1 -0
- package/package.json +163 -0
package/dist/farm.d.mts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { UnpluginExecutionOptions, UnpluginFactory } from "./types.mjs";
|
|
2
|
+
import { UnpluginFactoryDecorator, UnpluginFactoryOptions } from "./unplugin.mjs";
|
|
3
|
+
import * as _$_powerlines_core0 from "@powerlines/core";
|
|
4
|
+
import { ExecutionContext } from "@powerlines/core";
|
|
5
|
+
import * as _$_farmfe_core0 from "@farmfe/core";
|
|
6
|
+
|
|
7
|
+
//#region src/farm.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Creates a Farm plugin factory that generates a plugin instance.
|
|
10
|
+
*
|
|
11
|
+
* @see https://farmjs.dev/plugins/writing-plugins
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* // farm.config.ts
|
|
16
|
+
* import { createFarmFactory } from "@powerlines/unplugin/farm";
|
|
17
|
+
*
|
|
18
|
+
* const powerlinesPlugin = createFarmFactory({ name: "example-app", ... });
|
|
19
|
+
*
|
|
20
|
+
* export default defineConfig({
|
|
21
|
+
* plugins: [powerlinesPlugin()],
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @param options - The options to create the plugin factory with.
|
|
27
|
+
* @param decorate - A function to decorate the plugin options with additional properties or hooks. This can be used to add custom behavior to the plugin instance, such as additional hooks or configuration options. The function receives the generated plugin options and should return an object containing any additional properties or hooks to be merged into the final plugin options.
|
|
28
|
+
* @returns A function that generates a Farm plugin instance when called. The generated plugin will invoke the Powerlines API hooks during the build process, allowing you to integrate Powerlines into your Farm build.
|
|
29
|
+
*/
|
|
30
|
+
declare function createFarmFactory<TContext extends ExecutionContext>(options?: Omit<UnpluginFactoryOptions, "variant">, decorate?: UnpluginFactoryDecorator<TContext>): UnpluginFactory<ExecutionContext<_$_powerlines_core0.ResolvedConfig, unknown>>;
|
|
31
|
+
/**
|
|
32
|
+
* A Farm plugin that will invoke the Powerlines API hooks during the build process.
|
|
33
|
+
*
|
|
34
|
+
* @see https://farmjs.dev/plugins/writing-plugins
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* // farm.config.ts
|
|
39
|
+
* import powerlines from "@powerlines/unplugin/farm";
|
|
40
|
+
* import { defineConfig } from "@farmfe/core";
|
|
41
|
+
*
|
|
42
|
+
* export default defineConfig({
|
|
43
|
+
* plugins: [powerlines({ name: "example-app", ... })],
|
|
44
|
+
* });
|
|
45
|
+
*
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
declare const farm: (options?: UnpluginExecutionOptions | undefined) => _$_farmfe_core0.JsPlugin;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { createFarmFactory, farm as default };
|
|
51
|
+
//# sourceMappingURL=farm.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"farm.d.mts","names":[],"sources":["../src/farm.ts"],"mappings":";;;;;;;;;;;;AAgDA;;;;;;;;;;;;;;;;;iBAAgB,iBAAA,kBAAmC,gBAAA,CAAA,CACjD,OAAA,GAAS,IAAA,CAAK,sBAAA,cACd,QAAA,GAAU,wBAAA,CAAyB,QAAA,IAA8B,eAAA,CAAA,gBAAA,CAA/B,mBAAA,CAA+B,cAAA;;;;;;;;;AAKlE;;;;;;;;;cAmBK,IAAA,GAAI,OAAA,GAAwC,wBAAA,iBAAxC,eAAA,CAAA,QAAA"}
|
package/dist/farm.mjs
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { createUnpluginFactory } from "./unplugin.mjs";
|
|
2
|
+
import { createFarmPlugin } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/farm.ts
|
|
5
|
+
/**
|
|
6
|
+
* Creates a Farm plugin factory that generates a plugin instance.
|
|
7
|
+
*
|
|
8
|
+
* @see https://farmjs.dev/plugins/writing-plugins
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // farm.config.ts
|
|
13
|
+
* import { createFarmFactory } from "@powerlines/unplugin/farm";
|
|
14
|
+
*
|
|
15
|
+
* const powerlinesPlugin = createFarmFactory({ name: "example-app", ... });
|
|
16
|
+
*
|
|
17
|
+
* export default defineConfig({
|
|
18
|
+
* plugins: [powerlinesPlugin()],
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @param options - The options to create the plugin factory with.
|
|
24
|
+
* @param decorate - A function to decorate the plugin options with additional properties or hooks. This can be used to add custom behavior to the plugin instance, such as additional hooks or configuration options. The function receives the generated plugin options and should return an object containing any additional properties or hooks to be merged into the final plugin options.
|
|
25
|
+
* @returns A function that generates a Farm plugin instance when called. The generated plugin will invoke the Powerlines API hooks during the build process, allowing you to integrate Powerlines into your Farm build.
|
|
26
|
+
*/
|
|
27
|
+
function createFarmFactory(options = {}, decorate = (options) => options) {
|
|
28
|
+
return createUnpluginFactory({
|
|
29
|
+
...options,
|
|
30
|
+
variant: "farm"
|
|
31
|
+
}, (unplugin) => decorate(unplugin));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A Farm plugin that will invoke the Powerlines API hooks during the build process.
|
|
35
|
+
*
|
|
36
|
+
* @see https://farmjs.dev/plugins/writing-plugins
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* // farm.config.ts
|
|
41
|
+
* import powerlines from "@powerlines/unplugin/farm";
|
|
42
|
+
* import { defineConfig } from "@farmfe/core";
|
|
43
|
+
*
|
|
44
|
+
* export default defineConfig({
|
|
45
|
+
* plugins: [powerlines({ name: "example-app", ... })],
|
|
46
|
+
* });
|
|
47
|
+
*
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
const farm = createFarmPlugin(createFarmFactory());
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { createFarmFactory, farm as default };
|
|
54
|
+
//# sourceMappingURL=farm.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"farm.mjs","names":[],"sources":["../src/farm.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutionContext, UnpluginOptions } from \"@powerlines/core\";\nimport { createFarmPlugin } from \"unplugin\";\nimport {\n createUnpluginFactory,\n UnpluginFactoryDecorator,\n UnpluginFactoryOptions\n} from \"./unplugin\";\n\n/**\n * Creates a Farm plugin factory that generates a plugin instance.\n *\n * @see https://farmjs.dev/plugins/writing-plugins\n *\n * @example\n * ```ts\n * // farm.config.ts\n * import { createFarmFactory } from \"@powerlines/unplugin/farm\";\n *\n * const powerlinesPlugin = createFarmFactory({ name: \"example-app\", ... });\n *\n * export default defineConfig({\n * plugins: [powerlinesPlugin()],\n * });\n *\n * ```\n *\n * @param options - The options to create the plugin factory with.\n * @param decorate - A function to decorate the plugin options with additional properties or hooks. This can be used to add custom behavior to the plugin instance, such as additional hooks or configuration options. The function receives the generated plugin options and should return an object containing any additional properties or hooks to be merged into the final plugin options.\n * @returns A function that generates a Farm plugin instance when called. The generated plugin will invoke the Powerlines API hooks during the build process, allowing you to integrate Powerlines into your Farm build.\n */\nexport function createFarmFactory<TContext extends ExecutionContext>(\n options: Omit<UnpluginFactoryOptions, \"variant\"> = {},\n decorate: UnpluginFactoryDecorator<TContext> = options => options\n) {\n return createUnpluginFactory({ ...options, variant: \"farm\" }, unplugin =>\n decorate(unplugin as UnpluginOptions<TContext>)\n );\n}\n\n/**\n * A Farm plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://farmjs.dev/plugins/writing-plugins\n *\n * @example\n * ```ts\n * // farm.config.ts\n * import powerlines from \"@powerlines/unplugin/farm\";\n * import { defineConfig } from \"@farmfe/core\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * });\n *\n * ```\n */\nconst farm = createFarmPlugin(createFarmFactory());\n\nexport default farm;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,kBACd,UAAmD,EAAE,EACrD,YAA+C,YAAW,SAC1D;CACA,OAAO,sBAAsB;EAAE,GAAG;EAAS,SAAS;EAAQ,GAAE,aAC5D,SAAS,SAAsC,CAChD;;;;;;;;;;;;;;;;;;;AAoBH,MAAM,OAAO,iBAAiB,mBAAmB,CAAC"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_unplugin = require('./unplugin.cjs');
|
|
4
|
+
const require_rollup = require('./rollup.cjs');
|
|
5
|
+
const require_rolldown = require('./rolldown.cjs');
|
|
6
|
+
const require_vite = require('./vite.cjs');
|
|
7
|
+
const require_astro = require('./astro.cjs');
|
|
8
|
+
const require_farm = require('./farm.cjs');
|
|
9
|
+
const require_next = require('./next.cjs');
|
|
10
|
+
const require_nuxt = require('./nuxt.cjs');
|
|
11
|
+
const require_rspack = require('./rspack.cjs');
|
|
12
|
+
const require_tsdown = require('./tsdown.cjs');
|
|
13
|
+
const require_tsup = require('./tsup.cjs');
|
|
14
|
+
const require_unloader = require('./unloader.cjs');
|
|
15
|
+
|
|
16
|
+
//#region src/index.ts
|
|
17
|
+
var src_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
18
|
+
createUnpluginFactory: () => require_unplugin.createUnpluginFactory,
|
|
19
|
+
default: () => plugins,
|
|
20
|
+
plugins: () => plugins
|
|
21
|
+
});
|
|
22
|
+
const plugins = {
|
|
23
|
+
astro: require_astro.default,
|
|
24
|
+
farm: require_farm.default,
|
|
25
|
+
next: require_next.default,
|
|
26
|
+
nuxt: require_nuxt,
|
|
27
|
+
rolldown: require_rolldown.default,
|
|
28
|
+
rollup: require_rollup.default,
|
|
29
|
+
rspack: require_rspack.default,
|
|
30
|
+
tsdown: require_tsdown.default,
|
|
31
|
+
tsup: require_tsup.default,
|
|
32
|
+
unloader: require_unloader.default,
|
|
33
|
+
vite: require_vite.default
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
exports.createUnpluginFactory = require_unplugin.createUnpluginFactory;
|
|
38
|
+
exports.default = plugins;
|
|
39
|
+
exports.plugins = plugins;
|
|
40
|
+
var _powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
|
|
41
|
+
Object.keys(_powerlines_core_lib_unplugin).forEach(function (k) {
|
|
42
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () { return _powerlines_core_lib_unplugin[k]; }
|
|
45
|
+
});
|
|
46
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import withPlugin from "./astro.cjs";
|
|
2
|
+
import { UnpluginExecutionOptions, UnpluginExecutionOptionsBase, UnpluginFactory } from "./types.cjs";
|
|
3
|
+
import { UnpluginFactoryDecorator, UnpluginFactoryOptions, createUnpluginFactory } from "./unplugin.cjs";
|
|
4
|
+
import withPlugin$1 from "./next.cjs";
|
|
5
|
+
import plugin from "./tsdown.cjs";
|
|
6
|
+
import withPlugin$2 from "./tsup.cjs";
|
|
7
|
+
import * as _$_powerlines_core0 from "@powerlines/core";
|
|
8
|
+
import * as _$unplugin from "unplugin";
|
|
9
|
+
import * as _$_farmfe_core0 from "@farmfe/core";
|
|
10
|
+
import * as _$_nuxt_schema0 from "@nuxt/schema";
|
|
11
|
+
import * as _$rolldown from "rolldown";
|
|
12
|
+
import * as _$rollup from "rollup";
|
|
13
|
+
import * as _$unloader from "unloader";
|
|
14
|
+
import * as _$vite from "vite";
|
|
15
|
+
export * from "@powerlines/core/types/unplugin";
|
|
16
|
+
export * from "@powerlines/core/lib/unplugin";
|
|
17
|
+
|
|
18
|
+
//#region src/index.d.ts
|
|
19
|
+
declare namespace index_d_exports {
|
|
20
|
+
export { UnpluginExecutionOptions, UnpluginExecutionOptionsBase, UnpluginFactory, UnpluginFactoryDecorator, UnpluginFactoryOptions, createUnpluginFactory, plugins as default, plugins };
|
|
21
|
+
}
|
|
22
|
+
declare const plugins: {
|
|
23
|
+
astro: typeof withPlugin;
|
|
24
|
+
farm: (options?: UnpluginExecutionOptions | undefined) => _$_farmfe_core0.JsPlugin;
|
|
25
|
+
next: typeof withPlugin$1;
|
|
26
|
+
nuxt: _$_nuxt_schema0.NuxtModule<_$_powerlines_core0.UserConfig, _$_powerlines_core0.UserConfig, false>;
|
|
27
|
+
rolldown: (options?: UnpluginExecutionOptions | undefined) => _$rolldown.Plugin<any> | _$rolldown.Plugin<any>[];
|
|
28
|
+
rollup: (options?: UnpluginExecutionOptions | undefined) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
|
|
29
|
+
rspack: (options?: UnpluginExecutionOptions | undefined) => _$unplugin.RspackPluginInstance;
|
|
30
|
+
tsdown: typeof plugin;
|
|
31
|
+
tsup: typeof withPlugin$2;
|
|
32
|
+
unloader: (options?: UnpluginExecutionOptions | undefined) => _$unloader.Plugin | _$unloader.Plugin[];
|
|
33
|
+
vite: (options?: UnpluginExecutionOptions | undefined) => _$vite.Plugin<any> | _$vite.Plugin<any>[];
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { UnpluginExecutionOptions, UnpluginExecutionOptionsBase, UnpluginFactory, UnpluginFactoryDecorator, UnpluginFactoryOptions, createUnpluginFactory, plugins as default, plugins };
|
|
37
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;cAiCa,OAAA"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import withPlugin from "./astro.mjs";
|
|
2
|
+
import { UnpluginExecutionOptions, UnpluginExecutionOptionsBase, UnpluginFactory } from "./types.mjs";
|
|
3
|
+
import { UnpluginFactoryDecorator, UnpluginFactoryOptions, createUnpluginFactory } from "./unplugin.mjs";
|
|
4
|
+
import withPlugin$1 from "./next.mjs";
|
|
5
|
+
import plugin from "./tsdown.mjs";
|
|
6
|
+
import withPlugin$2 from "./tsup.mjs";
|
|
7
|
+
import * as _$unplugin from "unplugin";
|
|
8
|
+
import * as _$_powerlines_core0 from "@powerlines/core";
|
|
9
|
+
import * as _$_farmfe_core0 from "@farmfe/core";
|
|
10
|
+
import * as _$_nuxt_schema0 from "@nuxt/schema";
|
|
11
|
+
import * as _$rolldown from "rolldown";
|
|
12
|
+
import * as _$rollup from "rollup";
|
|
13
|
+
import * as _$unloader from "unloader";
|
|
14
|
+
import * as _$vite from "vite";
|
|
15
|
+
export * from "@powerlines/core/lib/unplugin";
|
|
16
|
+
export * from "@powerlines/core/types/unplugin";
|
|
17
|
+
|
|
18
|
+
//#region src/index.d.ts
|
|
19
|
+
declare namespace index_d_exports {
|
|
20
|
+
export { UnpluginExecutionOptions, UnpluginExecutionOptionsBase, UnpluginFactory, UnpluginFactoryDecorator, UnpluginFactoryOptions, createUnpluginFactory, plugins as default, plugins };
|
|
21
|
+
}
|
|
22
|
+
declare const plugins: {
|
|
23
|
+
astro: typeof withPlugin;
|
|
24
|
+
farm: (options?: UnpluginExecutionOptions | undefined) => _$_farmfe_core0.JsPlugin;
|
|
25
|
+
next: typeof withPlugin$1;
|
|
26
|
+
nuxt: _$_nuxt_schema0.NuxtModule<_$_powerlines_core0.UserConfig, _$_powerlines_core0.UserConfig, false>;
|
|
27
|
+
rolldown: (options?: UnpluginExecutionOptions | undefined) => _$rolldown.Plugin<any> | _$rolldown.Plugin<any>[];
|
|
28
|
+
rollup: (options?: UnpluginExecutionOptions | undefined) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
|
|
29
|
+
rspack: (options?: UnpluginExecutionOptions | undefined) => _$unplugin.RspackPluginInstance;
|
|
30
|
+
tsdown: typeof plugin;
|
|
31
|
+
tsup: typeof withPlugin$2;
|
|
32
|
+
unloader: (options?: UnpluginExecutionOptions | undefined) => _$unloader.Plugin | _$unloader.Plugin[];
|
|
33
|
+
vite: (options?: UnpluginExecutionOptions | undefined) => _$vite.Plugin<any> | _$vite.Plugin<any>[];
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { UnpluginExecutionOptions, UnpluginExecutionOptionsBase, UnpluginFactory, UnpluginFactoryDecorator, UnpluginFactoryOptions, createUnpluginFactory, plugins as default, plugins };
|
|
37
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;cAiCa,OAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __exportAll, __reExport } from "./_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { createUnpluginFactory } from "./unplugin.mjs";
|
|
3
|
+
import plugin from "./rollup.mjs";
|
|
4
|
+
import plugin$1 from "./rolldown.mjs";
|
|
5
|
+
import plugin$2 from "./vite.mjs";
|
|
6
|
+
import withPlugin from "./astro.mjs";
|
|
7
|
+
import farm from "./farm.mjs";
|
|
8
|
+
import withPlugin$1 from "./next.mjs";
|
|
9
|
+
import plugin$3 from "./nuxt.mjs";
|
|
10
|
+
import plugin$4 from "./rspack.mjs";
|
|
11
|
+
import plugin$5 from "./tsdown.mjs";
|
|
12
|
+
import withPlugin$2 from "./tsup.mjs";
|
|
13
|
+
import plugin$6 from "./unloader.mjs";
|
|
14
|
+
|
|
15
|
+
export * from "@powerlines/core/lib/unplugin"
|
|
16
|
+
|
|
17
|
+
//#region src/index.ts
|
|
18
|
+
var src_exports = /* @__PURE__ */ __exportAll({
|
|
19
|
+
createUnpluginFactory: () => createUnpluginFactory,
|
|
20
|
+
default: () => plugins,
|
|
21
|
+
plugins: () => plugins
|
|
22
|
+
});
|
|
23
|
+
const plugins = {
|
|
24
|
+
astro: withPlugin,
|
|
25
|
+
farm,
|
|
26
|
+
next: withPlugin$1,
|
|
27
|
+
nuxt: plugin$3,
|
|
28
|
+
rolldown: plugin$1,
|
|
29
|
+
rollup: plugin,
|
|
30
|
+
rspack: plugin$4,
|
|
31
|
+
tsdown: plugin$5,
|
|
32
|
+
tsup: withPlugin$2,
|
|
33
|
+
unloader: plugin$6,
|
|
34
|
+
vite: plugin$2
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { createUnpluginFactory, plugins as default, plugins };
|
|
39
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport astro from \"./astro\";\nimport farm from \"./farm\";\nimport next from \"./next\";\nimport nuxt from \"./nuxt\";\nimport rolldown from \"./rolldown\";\nimport rollup from \"./rollup\";\nimport rspack from \"./rspack\";\nimport tsdown from \"./tsdown\";\nimport tsup from \"./tsup\";\nimport unloader from \"./unloader\";\nimport vite from \"./vite\";\n\nexport type * from \"./types\";\nexport * from \"./unplugin\";\n\nexport const plugins = {\n astro,\n farm,\n next,\n nuxt,\n rolldown,\n rollup,\n rspack,\n tsdown,\n tsup,\n unloader,\n vite\n};\n\nexport default plugins;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAa,UAAU;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
package/dist/next.cjs
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_webpack = require('./webpack.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/next.ts
|
|
5
|
+
/**
|
|
6
|
+
* A Next.js configuration function that integrates Powerlines into the build process.
|
|
7
|
+
*
|
|
8
|
+
* @see https://nextjs.org/docs/api-reference/next.config.js/introduction
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```js
|
|
12
|
+
* // next.config.js
|
|
13
|
+
* import withPowerlines from '@powerlines/unplugin/next'
|
|
14
|
+
*
|
|
15
|
+
* export default withPowerlines({
|
|
16
|
+
* reactStrictMode: true,
|
|
17
|
+
* })
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @param options - The Next.js configuration to merge with the Powerlines configuration.
|
|
21
|
+
* @returns The merged Next.js configuration.
|
|
22
|
+
*/
|
|
23
|
+
function withPlugin(options) {
|
|
24
|
+
return {
|
|
25
|
+
...options,
|
|
26
|
+
webpack(config, context) {
|
|
27
|
+
const result = options.webpack?.(config, context) || config;
|
|
28
|
+
result.plugins ??= [];
|
|
29
|
+
result.plugins.push(require_webpack.default());
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
exports.default = withPlugin;
|
|
37
|
+
exports.withPlugin = withPlugin;
|
package/dist/next.d.cts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NextConfig } from "next";
|
|
2
|
+
|
|
3
|
+
//#region src/next.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A Next.js configuration function that integrates Powerlines into the build process.
|
|
6
|
+
*
|
|
7
|
+
* @see https://nextjs.org/docs/api-reference/next.config.js/introduction
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```js
|
|
11
|
+
* // next.config.js
|
|
12
|
+
* import withPowerlines from '@powerlines/unplugin/next'
|
|
13
|
+
*
|
|
14
|
+
* export default withPowerlines({
|
|
15
|
+
* reactStrictMode: true,
|
|
16
|
+
* })
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @param options - The Next.js configuration to merge with the Powerlines configuration.
|
|
20
|
+
* @returns The merged Next.js configuration.
|
|
21
|
+
*/
|
|
22
|
+
declare function withPlugin(options: NextConfig): NextConfig;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { withPlugin as default, withPlugin };
|
|
25
|
+
//# sourceMappingURL=next.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next.d.cts","names":[],"sources":["../src/next.ts"],"mappings":";;;;;AAyCA;;;;;;;;;;;;;;;;iBAAgB,UAAA,CAAW,OAAA,EAAS,UAAA,GAAa,UAAA"}
|
package/dist/next.d.mts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NextConfig } from "next";
|
|
2
|
+
|
|
3
|
+
//#region src/next.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A Next.js configuration function that integrates Powerlines into the build process.
|
|
6
|
+
*
|
|
7
|
+
* @see https://nextjs.org/docs/api-reference/next.config.js/introduction
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```js
|
|
11
|
+
* // next.config.js
|
|
12
|
+
* import withPowerlines from '@powerlines/unplugin/next'
|
|
13
|
+
*
|
|
14
|
+
* export default withPowerlines({
|
|
15
|
+
* reactStrictMode: true,
|
|
16
|
+
* })
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @param options - The Next.js configuration to merge with the Powerlines configuration.
|
|
20
|
+
* @returns The merged Next.js configuration.
|
|
21
|
+
*/
|
|
22
|
+
declare function withPlugin(options: NextConfig): NextConfig;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { withPlugin as default, withPlugin };
|
|
25
|
+
//# sourceMappingURL=next.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next.d.mts","names":[],"sources":["../src/next.ts"],"mappings":";;;;;AAyCA;;;;;;;;;;;;;;;;iBAAgB,UAAA,CAAW,OAAA,EAAS,UAAA,GAAa,UAAA"}
|
package/dist/next.mjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import plugin from "./webpack.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/next.ts
|
|
4
|
+
/**
|
|
5
|
+
* A Next.js configuration function that integrates Powerlines into the build process.
|
|
6
|
+
*
|
|
7
|
+
* @see https://nextjs.org/docs/api-reference/next.config.js/introduction
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```js
|
|
11
|
+
* // next.config.js
|
|
12
|
+
* import withPowerlines from '@powerlines/unplugin/next'
|
|
13
|
+
*
|
|
14
|
+
* export default withPowerlines({
|
|
15
|
+
* reactStrictMode: true,
|
|
16
|
+
* })
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @param options - The Next.js configuration to merge with the Powerlines configuration.
|
|
20
|
+
* @returns The merged Next.js configuration.
|
|
21
|
+
*/
|
|
22
|
+
function withPlugin(options) {
|
|
23
|
+
return {
|
|
24
|
+
...options,
|
|
25
|
+
webpack(config, context) {
|
|
26
|
+
const result = options.webpack?.(config, context) || config;
|
|
27
|
+
result.plugins ??= [];
|
|
28
|
+
result.plugins.push(plugin());
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { withPlugin as default, withPlugin };
|
|
36
|
+
//# sourceMappingURL=next.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next.mjs","names":["webpack"],"sources":["../src/next.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { NextConfig } from \"next\";\nimport type { WebpackConfigContext } from \"next/dist/server/config-shared\";\nimport type { Configuration } from \"webpack\";\nimport webpack from \"./webpack\";\n\n/**\n * A Next.js configuration function that integrates Powerlines into the build process.\n *\n * @see https://nextjs.org/docs/api-reference/next.config.js/introduction\n *\n * @example\n * ```js\n * // next.config.js\n * import withPowerlines from '@powerlines/unplugin/next'\n *\n * export default withPowerlines({\n * reactStrictMode: true,\n * })\n * ```\n *\n * @param options - The Next.js configuration to merge with the Powerlines configuration.\n * @returns The merged Next.js configuration.\n */\nexport function withPlugin(options: NextConfig): NextConfig {\n return {\n ...options,\n webpack(config: Configuration, context: WebpackConfigContext) {\n const result = (options.webpack?.(config, context) ||\n config) as Configuration;\n\n result.plugins ??= [];\n result.plugins.push(webpack());\n\n return result;\n }\n };\n}\n\nexport default withPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,WAAW,SAAiC;CAC1D,OAAO;EACL,GAAG;EACH,QAAQ,QAAuB,SAA+B;GAC5D,MAAM,SAAU,QAAQ,UAAU,QAAQ,QAAQ,IAChD;GAEF,OAAO,YAAY,EAAE;GACrB,OAAO,QAAQ,KAAKA,QAAS,CAAC;GAE9B,OAAO;;EAEV"}
|
package/dist/nuxt.cjs
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_vite = require('./vite.cjs');
|
|
3
|
+
const require_webpack = require('./webpack.cjs');
|
|
4
|
+
const require_package = require('./package.cjs');
|
|
5
|
+
let _nuxt_kit = require("@nuxt/kit");
|
|
6
|
+
|
|
7
|
+
//#region src/nuxt.ts
|
|
8
|
+
/**
|
|
9
|
+
* A Nuxt plugin that will invoke the Powerlines API hooks during the build process.
|
|
10
|
+
*
|
|
11
|
+
* @see https://nuxt.com/docs/guide/directory-structure/modules
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* // nuxt.config.ts
|
|
16
|
+
* import { defineNuxtConfig } from "@nuxt/kit";
|
|
17
|
+
*
|
|
18
|
+
* export default defineNuxtConfig({
|
|
19
|
+
* modules: [
|
|
20
|
+
* [
|
|
21
|
+
* "@powerlines/unplugin/nuxt",
|
|
22
|
+
* { name: "example-app", ... }
|
|
23
|
+
* ],
|
|
24
|
+
* ],
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
const plugin = (0, _nuxt_kit.defineNuxtModule)({
|
|
30
|
+
meta: {
|
|
31
|
+
name: require_package.name,
|
|
32
|
+
version: require_package.version,
|
|
33
|
+
configKey: "powerlines",
|
|
34
|
+
compatibility: { builder: { vite: "^8.0.0" } }
|
|
35
|
+
},
|
|
36
|
+
defaults: {},
|
|
37
|
+
setup(options) {
|
|
38
|
+
(0, _nuxt_kit.addVitePlugin)(() => require_vite.default(options));
|
|
39
|
+
(0, _nuxt_kit.addWebpackPlugin)(() => require_webpack.default(options));
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
module.exports = plugin;
|
package/dist/nuxt.d.cts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UserConfig } from "@powerlines/core";
|
|
2
|
+
import * as _$_nuxt_schema0 from "@nuxt/schema";
|
|
3
|
+
|
|
4
|
+
//#region src/nuxt.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* A Nuxt plugin that will invoke the Powerlines API hooks during the build process.
|
|
7
|
+
*
|
|
8
|
+
* @see https://nuxt.com/docs/guide/directory-structure/modules
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // nuxt.config.ts
|
|
13
|
+
* import { defineNuxtConfig } from "@nuxt/kit";
|
|
14
|
+
*
|
|
15
|
+
* export default defineNuxtConfig({
|
|
16
|
+
* modules: [
|
|
17
|
+
* [
|
|
18
|
+
* "@powerlines/unplugin/nuxt",
|
|
19
|
+
* { name: "example-app", ... }
|
|
20
|
+
* ],
|
|
21
|
+
* ],
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const plugin: _$_nuxt_schema0.NuxtModule<UserConfig, UserConfig, false>;
|
|
27
|
+
export = plugin;
|
|
28
|
+
//# sourceMappingURL=nuxt.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nuxt.d.cts","names":[],"sources":["../src/nuxt.ts"],"mappings":";;;;;;;AAmBmD;;;;;;;;;;;;;;;;;;cA0B7C,MAAA,EAAM,eAAA,CAAA,UAAA,CAAA,UAAA,EAAA,UAAA;AAAA"}
|
package/dist/nuxt.d.mts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { UserConfig } from "@powerlines/core";
|
|
2
|
+
import * as _$_nuxt_schema0 from "@nuxt/schema";
|
|
3
|
+
|
|
4
|
+
//#region src/nuxt.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* A Nuxt plugin that will invoke the Powerlines API hooks during the build process.
|
|
7
|
+
*
|
|
8
|
+
* @see https://nuxt.com/docs/guide/directory-structure/modules
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // nuxt.config.ts
|
|
13
|
+
* import { defineNuxtConfig } from "@nuxt/kit";
|
|
14
|
+
*
|
|
15
|
+
* export default defineNuxtConfig({
|
|
16
|
+
* modules: [
|
|
17
|
+
* [
|
|
18
|
+
* "@powerlines/unplugin/nuxt",
|
|
19
|
+
* { name: "example-app", ... }
|
|
20
|
+
* ],
|
|
21
|
+
* ],
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const plugin: _$_nuxt_schema0.NuxtModule<UserConfig, UserConfig, false>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { plugin as default };
|
|
29
|
+
//# sourceMappingURL=nuxt.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nuxt.d.mts","names":[],"sources":["../src/nuxt.ts"],"mappings":";;;;;;;AAmBmD;;;;;;;;;;;;;;;;;;cA0B7C,MAAA,EAAM,eAAA,CAAA,UAAA,CAAA,UAAA,EAAA,UAAA"}
|
package/dist/nuxt.mjs
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import plugin$1 from "./vite.mjs";
|
|
2
|
+
import plugin$2 from "./webpack.mjs";
|
|
3
|
+
import { name, version } from "./package.mjs";
|
|
4
|
+
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
5
|
+
|
|
6
|
+
//#region src/nuxt.ts
|
|
7
|
+
/**
|
|
8
|
+
* A Nuxt plugin that will invoke the Powerlines API hooks during the build process.
|
|
9
|
+
*
|
|
10
|
+
* @see https://nuxt.com/docs/guide/directory-structure/modules
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // nuxt.config.ts
|
|
15
|
+
* import { defineNuxtConfig } from "@nuxt/kit";
|
|
16
|
+
*
|
|
17
|
+
* export default defineNuxtConfig({
|
|
18
|
+
* modules: [
|
|
19
|
+
* [
|
|
20
|
+
* "@powerlines/unplugin/nuxt",
|
|
21
|
+
* { name: "example-app", ... }
|
|
22
|
+
* ],
|
|
23
|
+
* ],
|
|
24
|
+
* });
|
|
25
|
+
*
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
const plugin = defineNuxtModule({
|
|
29
|
+
meta: {
|
|
30
|
+
name,
|
|
31
|
+
version,
|
|
32
|
+
configKey: "powerlines",
|
|
33
|
+
compatibility: { builder: { vite: "^8.0.0" } }
|
|
34
|
+
},
|
|
35
|
+
defaults: {},
|
|
36
|
+
setup(options) {
|
|
37
|
+
addVitePlugin(() => plugin$1(options));
|
|
38
|
+
addWebpackPlugin(() => plugin$2(options));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
export { plugin as default };
|
|
44
|
+
//# sourceMappingURL=nuxt.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nuxt.mjs","names":["vite","webpack"],"sources":["../src/nuxt.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { addVitePlugin, addWebpackPlugin, defineNuxtModule } from \"@nuxt/kit\";\nimport type { UserConfig } from \"@powerlines/core\";\nimport { name, version } from \"../package.json\";\nimport vite from \"./vite\";\nimport webpack from \"./webpack\";\n\n/**\n * A Nuxt plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://nuxt.com/docs/guide/directory-structure/modules\n *\n * @example\n * ```ts\n * // nuxt.config.ts\n * import { defineNuxtConfig } from \"@nuxt/kit\";\n *\n * export default defineNuxtConfig({\n * modules: [\n * [\n * \"@powerlines/unplugin/nuxt\",\n * { name: \"example-app\", ... }\n * ],\n * ],\n * });\n *\n * ```\n */\nconst plugin = defineNuxtModule<UserConfig>({\n meta: {\n name,\n version,\n configKey: \"powerlines\",\n compatibility: {\n builder: {\n vite: \"^8.0.0\"\n }\n }\n },\n defaults: {},\n setup(options) {\n addVitePlugin(() => vite(options));\n addWebpackPlugin(() => webpack(options));\n }\n});\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAM,SAAS,iBAA6B;CAC1C,MAAM;EACJ;EACA;EACA,WAAW;EACX,eAAe,EACb,SAAS,EACP,MAAM,UACP,EACF;EACF;CACD,UAAU,EAAE;CACZ,MAAM,SAAS;EACb,oBAAoBA,SAAK,QAAQ,CAAC;EAClC,uBAAuBC,SAAQ,QAAQ,CAAC;;CAE3C,CAAC"}
|
package/dist/package.cjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region package.json
|
|
3
|
+
var name = "@powerlines/unplugin";
|
|
4
|
+
var version = "0.0.4";
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
Object.defineProperty(exports, 'name', {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return name;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, 'version', {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return version;
|
|
17
|
+
}
|
|
18
|
+
});
|
package/dist/package.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.mjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|