@powerlines/plugin-vite 0.5.0 → 0.6.0
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/package.json +10 -6
- package/dist/chunk-SHUYVCID.js +0 -4
- package/dist/chunk-USNT2KNT.cjs +0 -6
- package/dist/helpers/index.cjs +0 -12
- package/dist/helpers/index.d.cts +0 -6
- package/dist/helpers/index.d.ts +0 -6
- package/dist/helpers/index.js +0 -1
- package/dist/helpers/unplugin.cjs +0 -14
- package/dist/helpers/unplugin.d.cts +0 -9
- package/dist/helpers/unplugin.d.ts +0 -9
- package/dist/helpers/unplugin.js +0 -12
- package/dist/index.cjs +0 -65
- package/dist/index.d.cts +0 -15
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -44
- package/dist/types/index.cjs +0 -12
- package/dist/types/index.d.cts +0 -4
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.js +0 -1
- package/dist/types/plugin.cjs +0 -2
- package/dist/types/plugin.d.cts +0 -9
- package/dist/types/plugin.d.ts +0 -9
- package/dist/types/plugin.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
6
|
"repository": {
|
|
@@ -127,16 +127,20 @@
|
|
|
127
127
|
"files": ["dist/**/*"],
|
|
128
128
|
"keywords": ["vite", "powerlines", "storm-software", "powerlines-plugin"],
|
|
129
129
|
"dependencies": {
|
|
130
|
-
"@stryke/fs": "^0.
|
|
131
|
-
"@stryke/path": "^0.
|
|
130
|
+
"@stryke/fs": "^0.32.2",
|
|
131
|
+
"@stryke/path": "^0.16.0",
|
|
132
132
|
"@stryke/type-checks": "^0.3.10",
|
|
133
133
|
"@stryke/types": "^0.10.0",
|
|
134
134
|
"defu": "^6.1.4",
|
|
135
135
|
"jiti": "^2.6.1",
|
|
136
|
-
"powerlines": "^0.
|
|
136
|
+
"powerlines": "^0.5.0",
|
|
137
137
|
"vite": "^7.1.11"
|
|
138
138
|
},
|
|
139
|
-
"devDependencies": {
|
|
139
|
+
"devDependencies": {
|
|
140
|
+
"@powerlines/nx": "^0.5.0",
|
|
141
|
+
"@powerlines/plugin-plugin": "^0.6.0",
|
|
142
|
+
"@types/node": "^22.18.12"
|
|
143
|
+
},
|
|
140
144
|
"publishConfig": { "access": "public" },
|
|
141
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "8ec5ff52ffc87cfbf2807e077209ea5745a95d43"
|
|
142
146
|
}
|
package/dist/chunk-SHUYVCID.js
DELETED
package/dist/chunk-USNT2KNT.cjs
DELETED
package/dist/helpers/index.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var unplugin = require('./unplugin');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.keys(unplugin).forEach(function (k) {
|
|
8
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () { return unplugin[k]; }
|
|
11
|
-
});
|
|
12
|
-
});
|
package/dist/helpers/index.d.cts
DELETED
package/dist/helpers/index.d.ts
DELETED
package/dist/helpers/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './unplugin';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkUSNT2KNT_cjs = require('../chunk-USNT2KNT.cjs');
|
|
4
|
-
var unplugin$1 = require('powerlines/lib/unplugin');
|
|
5
|
-
var unplugin = require('unplugin');
|
|
6
|
-
|
|
7
|
-
function createVitePlugin(context) {
|
|
8
|
-
return unplugin.createEsbuildPlugin(unplugin$1.createUnplugin(context, {
|
|
9
|
-
skipResolve: true
|
|
10
|
-
}))({});
|
|
11
|
-
}
|
|
12
|
-
chunkUSNT2KNT_cjs.__name(createVitePlugin, "createVitePlugin");
|
|
13
|
-
|
|
14
|
-
exports.createVitePlugin = createVitePlugin;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as esbuild from 'esbuild';
|
|
2
|
-
import { VitePluginContext } from '../types/plugin.cjs';
|
|
3
|
-
import 'powerlines/types/build';
|
|
4
|
-
import 'powerlines/types/context';
|
|
5
|
-
import 'powerlines/types/resolved';
|
|
6
|
-
|
|
7
|
-
declare function createVitePlugin(context: VitePluginContext): esbuild.Plugin;
|
|
8
|
-
|
|
9
|
-
export { createVitePlugin };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as esbuild from 'esbuild';
|
|
2
|
-
import { VitePluginContext } from '../types/plugin.js';
|
|
3
|
-
import 'powerlines/types/build';
|
|
4
|
-
import 'powerlines/types/context';
|
|
5
|
-
import 'powerlines/types/resolved';
|
|
6
|
-
|
|
7
|
-
declare function createVitePlugin(context: VitePluginContext): esbuild.Plugin;
|
|
8
|
-
|
|
9
|
-
export { createVitePlugin };
|
package/dist/helpers/unplugin.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { __name } from '../chunk-SHUYVCID.js';
|
|
2
|
-
import { createUnplugin } from 'powerlines/lib/unplugin';
|
|
3
|
-
import { createEsbuildPlugin } from 'unplugin';
|
|
4
|
-
|
|
5
|
-
function createVitePlugin(context) {
|
|
6
|
-
return createEsbuildPlugin(createUnplugin(context, {
|
|
7
|
-
skipResolve: true
|
|
8
|
-
}))({});
|
|
9
|
-
}
|
|
10
|
-
__name(createVitePlugin, "createVitePlugin");
|
|
11
|
-
|
|
12
|
-
export { createVitePlugin };
|
package/dist/index.cjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
6
|
-
var types$1 = require('@storm-software/config-tools/types');
|
|
7
|
-
var defu = require('defu');
|
|
8
|
-
var vite$1 = require('powerlines/lib/build/vite');
|
|
9
|
-
var vite = require('vite');
|
|
10
|
-
var unplugin = require('./helpers/unplugin');
|
|
11
|
-
var helpers = require('./helpers');
|
|
12
|
-
var types = require('./types');
|
|
13
|
-
|
|
14
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
|
|
16
|
-
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
17
|
-
|
|
18
|
-
const plugin = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((options = {}) => {
|
|
19
|
-
return {
|
|
20
|
-
name: "vite",
|
|
21
|
-
config() {
|
|
22
|
-
this.log(types$1.LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `vite` build plugin.");
|
|
23
|
-
return {
|
|
24
|
-
output: {
|
|
25
|
-
format: [
|
|
26
|
-
"cjs",
|
|
27
|
-
"esm"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
build: {
|
|
31
|
-
...vite$1.DEFAULT_VITE_CONFIG,
|
|
32
|
-
...options,
|
|
33
|
-
variant: "vite"
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
async build() {
|
|
38
|
-
this.log(types$1.LogLevelLabel.TRACE, `Building the Powerlines plugin.`);
|
|
39
|
-
await vite.build(defu__default.default({
|
|
40
|
-
config: false,
|
|
41
|
-
entry: this.entry
|
|
42
|
-
}, vite$1.extractViteConfig(this), {
|
|
43
|
-
plugins: [
|
|
44
|
-
unplugin.createVitePlugin(this)
|
|
45
|
-
]
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}, "plugin");
|
|
50
|
-
var index_default = plugin;
|
|
51
|
-
|
|
52
|
-
exports.default = index_default;
|
|
53
|
-
exports.plugin = plugin;
|
|
54
|
-
Object.keys(helpers).forEach(function (k) {
|
|
55
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
get: function () { return helpers[k]; }
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
Object.keys(types).forEach(function (k) {
|
|
61
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function () { return types[k]; }
|
|
64
|
-
});
|
|
65
|
-
});
|
package/dist/index.d.cts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'powerlines/types/plugin';
|
|
2
|
-
import { VitePluginContext, VitePluginOptions } from './types/plugin.cjs';
|
|
3
|
-
export { VitePluginResolvedConfig } from './types/plugin.cjs';
|
|
4
|
-
export { createVitePlugin } from './helpers/unplugin.cjs';
|
|
5
|
-
import 'powerlines/types/build';
|
|
6
|
-
import 'powerlines/types/context';
|
|
7
|
-
import 'powerlines/types/resolved';
|
|
8
|
-
import 'esbuild';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
12
|
-
*/
|
|
13
|
-
declare const plugin: <TContext extends VitePluginContext = VitePluginContext>(options?: VitePluginOptions) => Plugin<TContext>;
|
|
14
|
-
|
|
15
|
-
export { VitePluginContext, VitePluginOptions, plugin as default, plugin };
|
package/dist/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'powerlines/types/plugin';
|
|
2
|
-
import { VitePluginContext, VitePluginOptions } from './types/plugin.js';
|
|
3
|
-
export { VitePluginResolvedConfig } from './types/plugin.js';
|
|
4
|
-
export { createVitePlugin } from './helpers/unplugin.js';
|
|
5
|
-
import 'powerlines/types/build';
|
|
6
|
-
import 'powerlines/types/context';
|
|
7
|
-
import 'powerlines/types/resolved';
|
|
8
|
-
import 'esbuild';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
12
|
-
*/
|
|
13
|
-
declare const plugin: <TContext extends VitePluginContext = VitePluginContext>(options?: VitePluginOptions) => Plugin<TContext>;
|
|
14
|
-
|
|
15
|
-
export { VitePluginContext, VitePluginOptions, plugin as default, plugin };
|
package/dist/index.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
-
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
3
|
-
import defu from 'defu';
|
|
4
|
-
import { extractViteConfig, DEFAULT_VITE_CONFIG } from 'powerlines/lib/build/vite';
|
|
5
|
-
import { build } from 'vite';
|
|
6
|
-
import { createVitePlugin } from './helpers/unplugin';
|
|
7
|
-
export * from './helpers';
|
|
8
|
-
export * from './types';
|
|
9
|
-
|
|
10
|
-
const plugin = /* @__PURE__ */ __name((options = {}) => {
|
|
11
|
-
return {
|
|
12
|
-
name: "vite",
|
|
13
|
-
config() {
|
|
14
|
-
this.log(LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `vite` build plugin.");
|
|
15
|
-
return {
|
|
16
|
-
output: {
|
|
17
|
-
format: [
|
|
18
|
-
"cjs",
|
|
19
|
-
"esm"
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
build: {
|
|
23
|
-
...DEFAULT_VITE_CONFIG,
|
|
24
|
-
...options,
|
|
25
|
-
variant: "vite"
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
async build() {
|
|
30
|
-
this.log(LogLevelLabel.TRACE, `Building the Powerlines plugin.`);
|
|
31
|
-
await build(defu({
|
|
32
|
-
config: false,
|
|
33
|
-
entry: this.entry
|
|
34
|
-
}, extractViteConfig(this), {
|
|
35
|
-
plugins: [
|
|
36
|
-
createVitePlugin(this)
|
|
37
|
-
]
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
}, "plugin");
|
|
42
|
-
var index_default = plugin;
|
|
43
|
-
|
|
44
|
-
export { index_default as default, plugin };
|
package/dist/types/index.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var plugin = require('./plugin');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.keys(plugin).forEach(function (k) {
|
|
8
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () { return plugin[k]; }
|
|
11
|
-
});
|
|
12
|
-
});
|
package/dist/types/index.d.cts
DELETED
package/dist/types/index.d.ts
DELETED
package/dist/types/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './plugin';
|
package/dist/types/plugin.cjs
DELETED
package/dist/types/plugin.d.cts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ViteBuildConfig } from 'powerlines/types/build';
|
|
2
|
-
import { PluginContext } from 'powerlines/types/context';
|
|
3
|
-
import { ViteResolvedConfig } from 'powerlines/types/resolved';
|
|
4
|
-
|
|
5
|
-
type VitePluginOptions = Partial<ViteBuildConfig>;
|
|
6
|
-
type VitePluginResolvedConfig = ViteResolvedConfig;
|
|
7
|
-
type VitePluginContext<TResolvedConfig extends VitePluginResolvedConfig = VitePluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
8
|
-
|
|
9
|
-
export type { VitePluginContext, VitePluginOptions, VitePluginResolvedConfig };
|
package/dist/types/plugin.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ViteBuildConfig } from 'powerlines/types/build';
|
|
2
|
-
import { PluginContext } from 'powerlines/types/context';
|
|
3
|
-
import { ViteResolvedConfig } from 'powerlines/types/resolved';
|
|
4
|
-
|
|
5
|
-
type VitePluginOptions = Partial<ViteBuildConfig>;
|
|
6
|
-
type VitePluginResolvedConfig = ViteResolvedConfig;
|
|
7
|
-
type VitePluginContext<TResolvedConfig extends VitePluginResolvedConfig = VitePluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
8
|
-
|
|
9
|
-
export type { VitePluginContext, VitePluginOptions, VitePluginResolvedConfig };
|
package/dist/types/plugin.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|