@powerlines/plugin-automd 0.1.57 → 0.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +1 -1
- package/dist/powerlines/src/types/babel.d.mts +2 -0
- package/dist/powerlines/src/types/build.d.cts +139 -0
- package/dist/powerlines/src/types/build.d.mts +139 -0
- package/dist/powerlines/src/types/commands.d.cts +8 -0
- package/dist/powerlines/src/types/commands.d.mts +9 -0
- package/dist/powerlines/src/types/config.d.cts +345 -0
- package/dist/powerlines/src/types/config.d.mts +346 -0
- package/dist/powerlines/src/types/context.d.cts +347 -0
- package/dist/powerlines/src/types/context.d.mts +349 -0
- package/dist/powerlines/src/types/fs.d.cts +458 -0
- package/dist/powerlines/src/types/fs.d.mts +458 -0
- package/dist/powerlines/src/types/hooks.d.mts +2 -0
- package/dist/powerlines/src/types/plugin.d.cts +232 -0
- package/dist/powerlines/src/types/plugin.d.mts +232 -0
- package/dist/powerlines/src/types/resolved.d.cts +81 -0
- package/dist/powerlines/src/types/resolved.d.mts +81 -0
- package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
- package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
- package/dist/types/index.cjs +0 -1
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +50 -2
- package/dist/types/plugin.d.mts +50 -2
- package/dist/types/plugin.mjs +1 -1
- package/dist/types/toc.cjs +0 -1
- package/dist/types/toc.d.cts +33 -1
- package/dist/types/toc.d.mts +33 -1
- package/dist/types/toc.mjs +1 -1
- package/package.json +10 -10
- package/dist/index-CA4VvAY_.d.mts +0 -1
- package/dist/index-CmCelmEL.d.cts +0 -1
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-DctK9mNs.d.mts +0 -1686
- package/dist/plugin-Gb47Xzf6.mjs +0 -1
- package/dist/plugin-sofaGrZ7.d.cts +0 -1685
- package/dist/toc-BMD8zasy.cjs +0 -0
- package/dist/toc-BMJnT26b.mjs +0 -1
- package/dist/toc-CbG2Hl5G.d.cts +0 -34
- package/dist/toc-KnOLp5Tz.d.mts +0 -34
- package/dist/types-CBTc19th.cjs +0 -0
- package/dist/types-CwXe_Ycf.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,`__esModule`,{value:!0});
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./_virtual/rolldown_runtime.cjs`);let t=require(`@stryke/convert/to-array`),n=require(`@stryke/fs/is-file`),r=require(`@stryke/fs/list-files`),i=require(`@stryke/path/append`),a=require(`@stryke/path/is-type`),o=require(`@stryke/path/join-paths`),s=require(`@stryke/path/replace`),c=require(`automd`),l=require(`c12`),u=require(`defu`);u=e.__toESM(u);let d=require(`markdown-toc`);d=e.__toESM(d);const f=(e={})=>({name:`automd`,async config(){let n=await(0,c.loadConfig)((0,o.joinPaths)(this.workspaceConfig.workspaceRoot,this.config.projectRoot),e);return(!n.prefix||!Array.isArray(n.prefix))&&(n.prefix=(0,t.toArray)(n.prefix??[])),n.prefix.includes(`automd`)||n.prefix.push(`automd`),n.prefix.includes(`powerlines`)||n.prefix.push(`powerlines`),{automd:(0,u.default)(n??{},{configFile:e.configFile,allowIssues:!0,dir:this.config.projectRoot,watch:!1,input:`README.md`,toc:{maxDepth:6,bullets:`-`}})}},async configResolved(){if(this.config.automd.configFile){let{config:e}=await(0,l.loadConfig)({cwd:this.config.automd.dir,configFile:this.config.automd.configFile,defaults:{ignore:[`**/node_modules`,`**/dist`,`**/.*`],dir:this.config.automd.dir}});this.config.automd=(0,c.resolveConfig)((0,u.default)(this.config.automd,{...e,prefix:(0,t.toArray)(e.prefix??[])}))}this.config.automd.input=(await Promise.all((0,t.toArray)(this.config.automd.input).map(async e=>e.includes(`*`)?(0,r.listFiles)((0,a.isAbsolutePath)(e)?e:(0,i.appendPath)(e,this.config.projectRoot),{ignore:this.config.automd.ignore}):(0,a.isAbsolutePath)(e)?e:(0,i.appendPath)(e,this.config.projectRoot)))).flat(),this.config.automd.output&&!(0,a.isAbsolutePath)(this.config.automd.output)&&(this.config.automd.output=(0,i.appendPath)(this.config.automd.output,this.config.projectRoot)),this.config.automd.generators??={},this.config.automd.toc!==!1&&(this.config.automd.generators.toc??={name:`toc`,generate:e=>{let t=this.config.automd.toc??{};return{contents:(0,d.default)(e.block.md,{...t,maxdepth:t.maxDepth,first1:t.firstH1}).content}}})},async docs(){await Promise.all((0,t.toArray)(this.config.automd.input).map(async e=>{let t=await this.fs.read(e);if(t){let r=await(0,c.transform)(t,this.config.automd);if(r.hasIssues&&this.config.automd.allowIssues===!1)throw Error(`AutoMD found issues in file "${e}". Please resolve the issues or set \`allowIssues\` to true in the plugin configuration to ignore them.`);r.hasChanged&&await this.fs.write((0,i.appendPath)(this.config.automd.output?(0,n.isDirectory)(this.config.automd.output)?(0,s.replacePath)(e,this.config.automd.output):this.config.automd.output:e,this.config.projectRoot),r.contents)}}))}});var p=f;exports.default=p,exports.plugin=f;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
1
|
+
import { Plugin } from "./powerlines/src/types/plugin.cjs";
|
|
2
|
+
import { TOCOptions, __ΩTOCOptions } from "./types/toc.cjs";
|
|
3
|
+
import { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig } from "./types/plugin.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
6
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
1
|
+
import { Plugin } from "./powerlines/src/types/plugin.mjs";
|
|
2
|
+
import { TOCOptions, __ΩTOCOptions } from "./types/toc.mjs";
|
|
3
|
+
import { AutoMDPluginContext, AutoMDPluginOptions, AutoMDPluginResolvedConfig, AutoMDPluginUserConfig, __ΩAutoMDPluginContext, __ΩAutoMDPluginOptions, __ΩAutoMDPluginResolvedConfig, __ΩAutoMDPluginUserConfig } from "./types/plugin.mjs";
|
|
4
|
+
import "./types/index.mjs";
|
|
4
5
|
|
|
5
6
|
//#region src/index.d.ts
|
|
6
7
|
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{toArray as e}from"@stryke/convert/to-array";import{isDirectory as t}from"@stryke/fs/is-file";import{listFiles as n}from"@stryke/fs/list-files";import{appendPath as r}from"@stryke/path/append";import{isAbsolutePath as i}from"@stryke/path/is-type";import{joinPaths as a}from"@stryke/path/join-paths";import{replacePath as o}from"@stryke/path/replace";import{loadConfig as s,resolveConfig as c,transform as l}from"automd";import{loadConfig as u}from"c12";import d from"defu";import f from"markdown-toc";const p=(p={})=>({name:`automd`,async config(){let t=await s(a(this.workspaceConfig.workspaceRoot,this.config.projectRoot),p);return(!t.prefix||!Array.isArray(t.prefix))&&(t.prefix=e(t.prefix??[])),t.prefix.includes(`automd`)||t.prefix.push(`automd`),t.prefix.includes(`powerlines`)||t.prefix.push(`powerlines`),{automd:d(t??{},{configFile:p.configFile,allowIssues:!0,dir:this.config.projectRoot,watch:!1,input:`README.md`,toc:{maxDepth:6,bullets:`-`}})}},async configResolved(){if(this.config.automd.configFile){let{config:t}=await u({cwd:this.config.automd.dir,configFile:this.config.automd.configFile,defaults:{ignore:[`**/node_modules`,`**/dist`,`**/.*`],dir:this.config.automd.dir}});this.config.automd=c(d(this.config.automd,{...t,prefix:e(t.prefix??[])}))}this.config.automd.input=(await Promise.all(e(this.config.automd.input).map(async e=>e.includes(`*`)?n(i(e)?e:r(e,this.config.projectRoot),{ignore:this.config.automd.ignore}):i(e)?e:r(e,this.config.projectRoot)))).flat(),this.config.automd.output&&!i(this.config.automd.output)&&(this.config.automd.output=r(this.config.automd.output,this.config.projectRoot)),this.config.automd.generators??={},this.config.automd.toc!==!1&&(this.config.automd.generators.toc??={name:`toc`,generate:e=>{let t=this.config.automd.toc??{};return{contents:f(e.block.md,{...t,maxdepth:t.maxDepth,first1:t.firstH1}).content}}})},async docs(){await Promise.all(e(this.config.automd.input).map(async e=>{let n=await this.fs.read(e);if(n){let i=await l(n,this.config.automd);if(i.hasIssues&&this.config.automd.allowIssues===!1)throw Error(`AutoMD found issues in file "${e}". Please resolve the issues or set \`allowIssues\` to true in the plugin configuration to ignore them.`);i.hasChanged&&await this.fs.write(r(this.config.automd.output?t(this.config.automd.output)?o(e,this.config.automd.output):this.config.automd.output:e,this.config.projectRoot),i.contents)}}))}});var m=p;export{m as default,p as plugin};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
//#region ../powerlines/src/types/build.d.ts
|
|
2
|
+
|
|
3
|
+
type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
|
|
4
|
+
interface BuildConfig {
|
|
5
|
+
/**
|
|
6
|
+
* The platform to build the project for
|
|
7
|
+
*
|
|
8
|
+
* @defaultValue "neutral"
|
|
9
|
+
*/
|
|
10
|
+
platform?: "node" | "browser" | "neutral";
|
|
11
|
+
/**
|
|
12
|
+
* Array of strings indicating the polyfills to include for the build.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* {
|
|
20
|
+
* polyfill: ['{projectRoot}/custom-polyfill.ts']
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
polyfill?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
|
|
27
|
+
*
|
|
28
|
+
* @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
|
|
29
|
+
*/
|
|
30
|
+
mainFields?: string[];
|
|
31
|
+
/**
|
|
32
|
+
* Array of strings indicating what conditions should be used for module resolution.
|
|
33
|
+
*/
|
|
34
|
+
conditions?: string[];
|
|
35
|
+
/**
|
|
36
|
+
* Array of strings indicating what file extensions should be used for module resolution.
|
|
37
|
+
*
|
|
38
|
+
* @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
|
|
39
|
+
*/
|
|
40
|
+
extensions?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* Array of strings indicating what modules should be deduplicated to a single version in the build.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
|
|
46
|
+
*/
|
|
47
|
+
dedupe?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Array of strings or regular expressions that indicate what modules are builtin for the environment.
|
|
50
|
+
*/
|
|
51
|
+
builtins?: (string | RegExp)[];
|
|
52
|
+
/**
|
|
53
|
+
* Define global variable replacements.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* {
|
|
61
|
+
* define: {
|
|
62
|
+
* __VERSION__: '"1.0.0"',
|
|
63
|
+
* __DEV__: 'process.env.NODE_ENV !== "production"'
|
|
64
|
+
* }
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @see https://esbuild.github.io/api/#define
|
|
69
|
+
* @see https://vitejs.dev/config/build-options.html#define
|
|
70
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/replace
|
|
71
|
+
*/
|
|
72
|
+
define?: Record<string, any>;
|
|
73
|
+
/**
|
|
74
|
+
* Global variables that will have import statements injected where necessary
|
|
75
|
+
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* {
|
|
82
|
+
* inject: {
|
|
83
|
+
* process: 'process/browser',
|
|
84
|
+
* Buffer: ['buffer', 'Buffer'],
|
|
85
|
+
* }
|
|
86
|
+
* }
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/inject
|
|
90
|
+
*/
|
|
91
|
+
inject?: Record<string, string | string[]>;
|
|
92
|
+
/**
|
|
93
|
+
* The alias mappings to use for module resolution during the build process.
|
|
94
|
+
*
|
|
95
|
+
* @remarks
|
|
96
|
+
* This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* {
|
|
101
|
+
* alias: {
|
|
102
|
+
* "@utils": "./src/utils",
|
|
103
|
+
* "@components": "./src/components"
|
|
104
|
+
* }
|
|
105
|
+
* }
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/alias
|
|
109
|
+
*/
|
|
110
|
+
alias?: Record<string, string> | Array<{
|
|
111
|
+
find: string | RegExp;
|
|
112
|
+
replacement: string;
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* A list of modules that should not be bundled, even if they are external dependencies.
|
|
116
|
+
*
|
|
117
|
+
* @remarks
|
|
118
|
+
* This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
|
|
119
|
+
*/
|
|
120
|
+
external?: (string | RegExp)[];
|
|
121
|
+
/**
|
|
122
|
+
* A list of modules that should always be bundled, even if they are external dependencies.
|
|
123
|
+
*/
|
|
124
|
+
noExternal?: (string | RegExp)[];
|
|
125
|
+
/**
|
|
126
|
+
* Should the Powerlines CLI processes skip bundling the `node_modules` directory?
|
|
127
|
+
*/
|
|
128
|
+
skipNodeModulesBundle?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* An optional set of override options to apply to the selected build variant.
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
* This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
|
|
134
|
+
*/
|
|
135
|
+
override?: Record<string, any>;
|
|
136
|
+
}
|
|
137
|
+
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
138
|
+
//#endregion
|
|
139
|
+
export { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
//#region ../powerlines/src/types/build.d.ts
|
|
2
|
+
|
|
3
|
+
type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
|
|
4
|
+
interface BuildConfig {
|
|
5
|
+
/**
|
|
6
|
+
* The platform to build the project for
|
|
7
|
+
*
|
|
8
|
+
* @defaultValue "neutral"
|
|
9
|
+
*/
|
|
10
|
+
platform?: "node" | "browser" | "neutral";
|
|
11
|
+
/**
|
|
12
|
+
* Array of strings indicating the polyfills to include for the build.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* {
|
|
20
|
+
* polyfill: ['{projectRoot}/custom-polyfill.ts']
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
polyfill?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
|
|
27
|
+
*
|
|
28
|
+
* @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
|
|
29
|
+
*/
|
|
30
|
+
mainFields?: string[];
|
|
31
|
+
/**
|
|
32
|
+
* Array of strings indicating what conditions should be used for module resolution.
|
|
33
|
+
*/
|
|
34
|
+
conditions?: string[];
|
|
35
|
+
/**
|
|
36
|
+
* Array of strings indicating what file extensions should be used for module resolution.
|
|
37
|
+
*
|
|
38
|
+
* @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
|
|
39
|
+
*/
|
|
40
|
+
extensions?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* Array of strings indicating what modules should be deduplicated to a single version in the build.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
|
|
46
|
+
*/
|
|
47
|
+
dedupe?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Array of strings or regular expressions that indicate what modules are builtin for the environment.
|
|
50
|
+
*/
|
|
51
|
+
builtins?: (string | RegExp)[];
|
|
52
|
+
/**
|
|
53
|
+
* Define global variable replacements.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* {
|
|
61
|
+
* define: {
|
|
62
|
+
* __VERSION__: '"1.0.0"',
|
|
63
|
+
* __DEV__: 'process.env.NODE_ENV !== "production"'
|
|
64
|
+
* }
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @see https://esbuild.github.io/api/#define
|
|
69
|
+
* @see https://vitejs.dev/config/build-options.html#define
|
|
70
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/replace
|
|
71
|
+
*/
|
|
72
|
+
define?: Record<string, any>;
|
|
73
|
+
/**
|
|
74
|
+
* Global variables that will have import statements injected where necessary
|
|
75
|
+
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* {
|
|
82
|
+
* inject: {
|
|
83
|
+
* process: 'process/browser',
|
|
84
|
+
* Buffer: ['buffer', 'Buffer'],
|
|
85
|
+
* }
|
|
86
|
+
* }
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/inject
|
|
90
|
+
*/
|
|
91
|
+
inject?: Record<string, string | string[]>;
|
|
92
|
+
/**
|
|
93
|
+
* The alias mappings to use for module resolution during the build process.
|
|
94
|
+
*
|
|
95
|
+
* @remarks
|
|
96
|
+
* This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* {
|
|
101
|
+
* alias: {
|
|
102
|
+
* "@utils": "./src/utils",
|
|
103
|
+
* "@components": "./src/components"
|
|
104
|
+
* }
|
|
105
|
+
* }
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/alias
|
|
109
|
+
*/
|
|
110
|
+
alias?: Record<string, string> | Array<{
|
|
111
|
+
find: string | RegExp;
|
|
112
|
+
replacement: string;
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* A list of modules that should not be bundled, even if they are external dependencies.
|
|
116
|
+
*
|
|
117
|
+
* @remarks
|
|
118
|
+
* This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
|
|
119
|
+
*/
|
|
120
|
+
external?: (string | RegExp)[];
|
|
121
|
+
/**
|
|
122
|
+
* A list of modules that should always be bundled, even if they are external dependencies.
|
|
123
|
+
*/
|
|
124
|
+
noExternal?: (string | RegExp)[];
|
|
125
|
+
/**
|
|
126
|
+
* Should the Powerlines CLI processes skip bundling the `node_modules` directory?
|
|
127
|
+
*/
|
|
128
|
+
skipNodeModulesBundle?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* An optional set of override options to apply to the selected build variant.
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
* This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
|
|
134
|
+
*/
|
|
135
|
+
override?: Record<string, any>;
|
|
136
|
+
}
|
|
137
|
+
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
138
|
+
//#endregion
|
|
139
|
+
export { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ArrayValues } from "@stryke/types/array";
|
|
2
|
+
import { MaybePromise } from "@stryke/types/base";
|
|
3
|
+
|
|
4
|
+
//#region ../powerlines/src/types/commands.d.ts
|
|
5
|
+
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
6
|
+
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { CommandType };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./context.mjs";
|
|
2
|
+
import { ArrayValues } from "@stryke/types/array";
|
|
3
|
+
import { MaybePromise } from "@stryke/types/base";
|
|
4
|
+
|
|
5
|
+
//#region ../powerlines/src/types/commands.d.ts
|
|
6
|
+
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
7
|
+
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { CommandType };
|