@powerlines/plugin-style-dictionary 0.3.241 → 0.3.243
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/README.md +14 -17
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/index.cjs +32 -33
- package/dist/index.d.cts +0 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -6
- package/dist/index.mjs.map +1 -1
- package/dist/src/style-dictionary/file-header.mjs.map +1 -0
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +7 -6
- package/dist/node_modules/.pnpm/@storm-software_config-tools@1.189.28_magicast@0.5.2/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.cjs +0 -16
- package/dist/node_modules/.pnpm/@storm-software_config-tools@1.189.28_magicast@0.5.2/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.mjs +0 -16
- package/dist/node_modules/.pnpm/@storm-software_config-tools@1.189.28_magicast@0.5.2/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.mjs.map +0 -1
- package/dist/style-dictionary/file-header.mjs.map +0 -1
- /package/dist/{style-dictionary → src/style-dictionary}/file-header.cjs +0 -0
- /package/dist/{style-dictionary → src/style-dictionary}/file-header.mjs +0 -0
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -58,22 +58,19 @@ A Powerlines plugin to generate project code with [Style Dictionary](https://amz
|
|
|
58
58
|
|
|
59
59
|
## Table of Contents
|
|
60
60
|
|
|
61
|
-
- [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [Acknowledgements](#acknowledgements)
|
|
75
|
-
- [Contributing](#contributing)
|
|
76
|
-
- [Contributors](#contributors)
|
|
61
|
+
- [Installing](#installing)
|
|
62
|
+
- [Reduced Package Size](#reduced-package-size)
|
|
63
|
+
- [Development](#development)
|
|
64
|
+
- [Building](#building)
|
|
65
|
+
- [Running unit tests](#running-unit-tests)
|
|
66
|
+
- [Linting](#linting)
|
|
67
|
+
- [Storm Workspaces](#storm-workspaces)
|
|
68
|
+
- [Roadmap](#roadmap)
|
|
69
|
+
- [Support](#support)
|
|
70
|
+
- [License](#license)
|
|
71
|
+
- [Changelog](#changelog)
|
|
72
|
+
- [Contributing](#contributing)
|
|
73
|
+
- [Contributors](#contributors)
|
|
77
74
|
|
|
78
75
|
<!-- END doctoc -->
|
|
79
76
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
let
|
|
6
|
-
let
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_file_header = require('./src/style-dictionary/file-header.cjs');
|
|
4
|
+
let _powerlines_plugin_esbuild_helpers_resolve = require("@powerlines/plugin-esbuild/helpers/resolve");
|
|
5
|
+
let _storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
6
|
+
let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
7
7
|
let defu = require("defu");
|
|
8
|
-
defu =
|
|
8
|
+
defu = require_runtime.__toESM(defu);
|
|
9
9
|
let style_dictionary = require("style-dictionary");
|
|
10
|
-
style_dictionary =
|
|
10
|
+
style_dictionary = require_runtime.__toESM(style_dictionary);
|
|
11
11
|
|
|
12
12
|
//#region src/index.ts
|
|
13
13
|
/**
|
|
@@ -21,7 +21,7 @@ const plugin = (options = {}) => {
|
|
|
21
21
|
name: "style-dictionary",
|
|
22
22
|
config() {
|
|
23
23
|
return { styleDictionary: (0, defu.default)(options, {
|
|
24
|
-
log: { verbosity: this.config.logLevel ===
|
|
24
|
+
log: { verbosity: this.config.logLevel === _storm_software_config_tools_types.LogLevelLabel.TRACE ? "verbose" : this.config.logLevel === _storm_software_config_tools_types.LogLevelLabel.DEBUG ? "default" : "silent" },
|
|
25
25
|
fileHeader: "powerlines/file-header"
|
|
26
26
|
}) };
|
|
27
27
|
},
|
|
@@ -30,9 +30,9 @@ const plugin = (options = {}) => {
|
|
|
30
30
|
this.styleDictionary.registerFileHeader(require_file_header.fileHeader(this));
|
|
31
31
|
if (this.config.styleDictionary.customActions) {
|
|
32
32
|
let builder;
|
|
33
|
-
if ((0,
|
|
34
|
-
else builder = await (0,
|
|
35
|
-
Object.entries((0,
|
|
33
|
+
if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customActions)) builder = this.config.styleDictionary.customActions;
|
|
34
|
+
else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customActions);
|
|
35
|
+
Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, action]) => {
|
|
36
36
|
this.styleDictionary.registerAction({
|
|
37
37
|
...action,
|
|
38
38
|
name
|
|
@@ -41,20 +41,20 @@ const plugin = (options = {}) => {
|
|
|
41
41
|
}
|
|
42
42
|
if (this.config.styleDictionary.customFileHeaders) {
|
|
43
43
|
let builder;
|
|
44
|
-
if ((0,
|
|
45
|
-
else builder = await (0,
|
|
46
|
-
Object.entries((0,
|
|
44
|
+
if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customFileHeaders)) builder = this.config.styleDictionary.customFileHeaders;
|
|
45
|
+
else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customFileHeaders);
|
|
46
|
+
Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, fileHeader]) => {
|
|
47
47
|
this.styleDictionary.registerFileHeader({
|
|
48
48
|
name,
|
|
49
|
-
fileHeader
|
|
49
|
+
fileHeader
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
if (this.config.styleDictionary.customFilters) {
|
|
54
54
|
let builder;
|
|
55
|
-
if ((0,
|
|
56
|
-
else builder = await (0,
|
|
57
|
-
Object.entries((0,
|
|
55
|
+
if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customFilters)) builder = this.config.styleDictionary.customFilters;
|
|
56
|
+
else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customFilters);
|
|
57
|
+
Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, filter]) => {
|
|
58
58
|
this.styleDictionary.registerFilter({
|
|
59
59
|
...filter,
|
|
60
60
|
name
|
|
@@ -63,9 +63,9 @@ const plugin = (options = {}) => {
|
|
|
63
63
|
}
|
|
64
64
|
if (this.config.styleDictionary.customPreprocessors) {
|
|
65
65
|
let builder;
|
|
66
|
-
if ((0,
|
|
67
|
-
else builder = await (0,
|
|
68
|
-
Object.entries((0,
|
|
66
|
+
if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customPreprocessors)) builder = this.config.styleDictionary.customPreprocessors;
|
|
67
|
+
else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customPreprocessors);
|
|
68
|
+
Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, preprocessor]) => {
|
|
69
69
|
this.styleDictionary.registerPreprocessor({
|
|
70
70
|
...preprocessor,
|
|
71
71
|
name
|
|
@@ -74,9 +74,9 @@ const plugin = (options = {}) => {
|
|
|
74
74
|
}
|
|
75
75
|
if (this.config.styleDictionary.customParsers) {
|
|
76
76
|
let builder;
|
|
77
|
-
if ((0,
|
|
78
|
-
else builder = await (0,
|
|
79
|
-
Object.entries((0,
|
|
77
|
+
if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customParsers)) builder = this.config.styleDictionary.customParsers;
|
|
78
|
+
else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customParsers);
|
|
79
|
+
Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, parser]) => {
|
|
80
80
|
this.styleDictionary.registerParser({
|
|
81
81
|
...parser,
|
|
82
82
|
name
|
|
@@ -85,9 +85,9 @@ const plugin = (options = {}) => {
|
|
|
85
85
|
}
|
|
86
86
|
if (this.config.styleDictionary.customTransforms) {
|
|
87
87
|
let builder;
|
|
88
|
-
if ((0,
|
|
89
|
-
else builder = await (0,
|
|
90
|
-
Object.entries((0,
|
|
88
|
+
if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customTransforms)) builder = this.config.styleDictionary.customTransforms;
|
|
89
|
+
else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customTransforms);
|
|
90
|
+
Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, transform]) => {
|
|
91
91
|
this.styleDictionary.registerTransform({
|
|
92
92
|
...transform,
|
|
93
93
|
name
|
|
@@ -96,9 +96,9 @@ const plugin = (options = {}) => {
|
|
|
96
96
|
}
|
|
97
97
|
if (this.config.styleDictionary.customTransformGroups) {
|
|
98
98
|
let builder;
|
|
99
|
-
if ((0,
|
|
100
|
-
else builder = await (0,
|
|
101
|
-
Object.entries((0,
|
|
99
|
+
if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customTransformGroups)) builder = this.config.styleDictionary.customTransformGroups;
|
|
100
|
+
else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customTransformGroups);
|
|
101
|
+
Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, transformGroup]) => {
|
|
102
102
|
this.styleDictionary.registerTransformGroup({
|
|
103
103
|
name,
|
|
104
104
|
transforms: transformGroup
|
|
@@ -117,8 +117,7 @@ const plugin = (options = {}) => {
|
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
119
|
};
|
|
120
|
-
var src_default = plugin;
|
|
121
120
|
|
|
122
121
|
//#endregion
|
|
123
|
-
exports.default =
|
|
122
|
+
exports.default = plugin;
|
|
124
123
|
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig } from "./types/plugin.cjs";
|
|
2
|
-
import "./types/index.cjs";
|
|
3
2
|
import { Plugin } from "powerlines";
|
|
4
3
|
|
|
5
4
|
//#region src/index.d.ts
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAyCY,MAAA;IACR,eAAA,GAAkB,4BAAA;EAAA;AAAA;;;;;;;cAUT,MAAA,oBACM,4BAAA,GAA+B,4BAAA,EAEhD,OAAA,GAAS,4BAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig } from "./types/plugin.mjs";
|
|
2
|
-
import "./types/index.mjs";
|
|
3
2
|
import { Plugin } from "powerlines";
|
|
4
3
|
|
|
5
4
|
//#region src/index.d.ts
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAyCY,MAAA;IACR,eAAA,GAAkB,4BAAA;EAAA;AAAA;;;;;;;cAUT,MAAA,oBACM,4BAAA,GAA+B,4BAAA,EAEhD,OAAA,GAAS,4BAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fileHeader } from "./style-dictionary/file-header.mjs";
|
|
1
|
+
import { fileHeader } from "./src/style-dictionary/file-header.mjs";
|
|
3
2
|
import { resolve } from "@powerlines/plugin-esbuild/helpers/resolve";
|
|
3
|
+
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
4
4
|
import { isFunction } from "@stryke/type-checks/is-function";
|
|
5
5
|
import defu from "defu";
|
|
6
6
|
import StyleDictionary from "style-dictionary";
|
|
@@ -39,10 +39,10 @@ const plugin = (options = {}) => {
|
|
|
39
39
|
let builder;
|
|
40
40
|
if (isFunction(this.config.styleDictionary.customFileHeaders)) builder = this.config.styleDictionary.customFileHeaders;
|
|
41
41
|
else builder = await resolve(this, this.config.styleDictionary.customFileHeaders);
|
|
42
|
-
Object.entries(isFunction(builder) ? builder(this) : builder).forEach(([name, fileHeader
|
|
42
|
+
Object.entries(isFunction(builder) ? builder(this) : builder).forEach(([name, fileHeader]) => {
|
|
43
43
|
this.styleDictionary.registerFileHeader({
|
|
44
44
|
name,
|
|
45
|
-
fileHeader
|
|
45
|
+
fileHeader
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
}
|
|
@@ -113,8 +113,7 @@ const plugin = (options = {}) => {
|
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
|
-
var src_default = plugin;
|
|
117
116
|
|
|
118
117
|
//#endregion
|
|
119
|
-
export {
|
|
118
|
+
export { plugin as default, plugin };
|
|
120
119
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["builder!: CustomActionsBuilder","builder!: CustomFileHeadersBuilder","fileHeader","builder!: CustomFiltersBuilder","builder!: CustomPreprocessorsBuilder","builder!: CustomParsersBuilder","builder!: CustomTransformsBuilder","builder!: CustomTransformGroupsBuilder"],"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 { resolve } from \"@powerlines/plugin-esbuild/helpers/resolve\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport StyleDictionary from \"style-dictionary\";\nimport { fileHeader } from \"./style-dictionary/file-header\";\nimport {\n CustomActionsBuilder,\n CustomFileHeadersBuilder,\n CustomFiltersBuilder,\n CustomParsersBuilder,\n CustomPreprocessorsBuilder,\n CustomTransformGroupsBuilder,\n CustomTransformsBuilder,\n StyleDictionaryPluginContext,\n StyleDictionaryPluginOptions,\n StyleDictionaryPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n styleDictionary?: StyleDictionaryPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to integrate style-dictionary for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends StyleDictionaryPluginContext = StyleDictionaryPluginContext\n>(\n options: StyleDictionaryPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"style-dictionary\",\n config() {\n return {\n styleDictionary: defu(options, {\n log: {\n verbosity:\n this.config.logLevel === LogLevelLabel.TRACE\n ? \"verbose\"\n : this.config.logLevel === LogLevelLabel.DEBUG\n ? \"default\"\n : \"silent\"\n },\n fileHeader: \"powerlines/file-header\"\n })\n } as Partial<StyleDictionaryPluginUserConfig>;\n },\n async configResolved() {\n this.styleDictionary =\n this.config.styleDictionary.instance ??\n new StyleDictionary(this.config.styleDictionary);\n\n this.styleDictionary.registerFileHeader(fileHeader(this));\n\n if (this.config.styleDictionary.customActions) {\n let builder!: CustomActionsBuilder;\n if (isFunction(this.config.styleDictionary.customActions)) {\n builder = this.config.styleDictionary.customActions;\n } else {\n builder = await resolve<CustomActionsBuilder>(\n this,\n this.config.styleDictionary.customActions\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, action]) => {\n this.styleDictionary.registerAction({\n ...action,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customFileHeaders) {\n let builder!: CustomFileHeadersBuilder;\n if (isFunction(this.config.styleDictionary.customFileHeaders)) {\n builder = this.config.styleDictionary.customFileHeaders;\n } else {\n builder = await resolve<CustomFileHeadersBuilder>(\n this,\n this.config.styleDictionary.customFileHeaders\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, fileHeader]) => {\n this.styleDictionary.registerFileHeader({\n name,\n fileHeader\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customFilters) {\n let builder!: CustomFiltersBuilder;\n if (isFunction(this.config.styleDictionary.customFilters)) {\n builder = this.config.styleDictionary.customFilters;\n } else {\n builder = await resolve<CustomFiltersBuilder>(\n this,\n this.config.styleDictionary.customFilters\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, filter]) => {\n this.styleDictionary.registerFilter({\n ...filter,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customPreprocessors) {\n let builder!: CustomPreprocessorsBuilder;\n if (isFunction(this.config.styleDictionary.customPreprocessors)) {\n builder = this.config.styleDictionary.customPreprocessors;\n } else {\n builder = await resolve<CustomPreprocessorsBuilder>(\n this,\n this.config.styleDictionary.customPreprocessors\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, preprocessor]) => {\n this.styleDictionary.registerPreprocessor({\n ...preprocessor,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customParsers) {\n let builder!: CustomParsersBuilder;\n if (isFunction(this.config.styleDictionary.customParsers)) {\n builder = this.config.styleDictionary.customParsers;\n } else {\n builder = await resolve<CustomParsersBuilder>(\n this,\n this.config.styleDictionary.customParsers\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, parser]) => {\n this.styleDictionary.registerParser({\n ...parser,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customTransforms) {\n let builder!: CustomTransformsBuilder;\n if (isFunction(this.config.styleDictionary.customTransforms)) {\n builder = this.config.styleDictionary.customTransforms;\n } else {\n builder = await resolve<CustomTransformsBuilder>(\n this,\n this.config.styleDictionary.customTransforms\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, transform]) => {\n this.styleDictionary.registerTransform({\n ...transform,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customTransformGroups) {\n let builder!: CustomTransformGroupsBuilder;\n if (isFunction(this.config.styleDictionary.customTransformGroups)) {\n builder = this.config.styleDictionary.customTransformGroups;\n } else {\n builder = await resolve<CustomTransformGroupsBuilder>(\n this,\n this.config.styleDictionary.customTransformGroups\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, transformGroup]) => {\n this.styleDictionary.registerTransformGroup({\n name,\n transforms: transformGroup\n });\n }\n );\n }\n },\n async clean() {\n await this.styleDictionary.cleanAllPlatforms({\n cache: !this.config.skipCache\n });\n },\n prepare: {\n order: \"pre\",\n async handler() {\n if (!this.config.styleDictionary.skipBuild) {\n await this.styleDictionary.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AQ,CAAC,SAC3D,CAAC,MAAM,eAAe;AACrB,UAAK,gBAAgB,kBAAkB;MACrC,GAAG;MACH;MACD,CAAC;MAEL;;AAGH,OAAI,KAAK,OAAO,gBAAgB,uBAAuB;IACrD,IAAIC;AACJ,QAAI,WAAW,KAAK,OAAO,gBAAgB,sBAAsB,CAC/D,WAAU,KAAK,OAAO,gBAAgB;QAEtC,WAAU,MAAM,QACd,MACA,KAAK,OAAO,gBAAgB,sBAC7B;AAGH,WAAO,QAAQ,WAAW,QAAQ,GAAG,QAAQ,KAAK,GAAG,QAAQ,CAAC,SAC3D,CAAC,MAAM,oBAAoB;AAC1B,UAAK,gBAAgB,uBAAuB;MAC1C;MACA,YAAY;MACb,CAAC;MAEL;;;EAGL,MAAM,QAAQ;AACZ,SAAM,KAAK,gBAAgB,kBAAkB,EAC3C,OAAO,CAAC,KAAK,OAAO,WACrB,CAAC;;EAEJ,SAAS;GACP,OAAO;GACP,MAAM,UAAU;AACd,QAAI,CAAC,KAAK,OAAO,gBAAgB,UAC/B,OAAM,KAAK,gBAAgB,kBAAkB,EAC3C,OAAO,CAAC,KAAK,OAAO,WACrB,CAAC;;GAGP;EACF;;AAGH,kBAAe"}
|
|
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 { resolve } from \"@powerlines/plugin-esbuild/helpers/resolve\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport StyleDictionary from \"style-dictionary\";\nimport { fileHeader } from \"./style-dictionary/file-header\";\nimport {\n CustomActionsBuilder,\n CustomFileHeadersBuilder,\n CustomFiltersBuilder,\n CustomParsersBuilder,\n CustomPreprocessorsBuilder,\n CustomTransformGroupsBuilder,\n CustomTransformsBuilder,\n StyleDictionaryPluginContext,\n StyleDictionaryPluginOptions,\n StyleDictionaryPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n styleDictionary?: StyleDictionaryPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to integrate style-dictionary for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends StyleDictionaryPluginContext = StyleDictionaryPluginContext\n>(\n options: StyleDictionaryPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"style-dictionary\",\n config() {\n return {\n styleDictionary: defu(options, {\n log: {\n verbosity:\n this.config.logLevel === LogLevelLabel.TRACE\n ? \"verbose\"\n : this.config.logLevel === LogLevelLabel.DEBUG\n ? \"default\"\n : \"silent\"\n },\n fileHeader: \"powerlines/file-header\"\n })\n } as Partial<StyleDictionaryPluginUserConfig>;\n },\n async configResolved() {\n this.styleDictionary =\n this.config.styleDictionary.instance ??\n new StyleDictionary(this.config.styleDictionary);\n\n this.styleDictionary.registerFileHeader(fileHeader(this));\n\n if (this.config.styleDictionary.customActions) {\n let builder!: CustomActionsBuilder;\n if (isFunction(this.config.styleDictionary.customActions)) {\n builder = this.config.styleDictionary.customActions;\n } else {\n builder = await resolve<CustomActionsBuilder>(\n this,\n this.config.styleDictionary.customActions\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, action]) => {\n this.styleDictionary.registerAction({\n ...action,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customFileHeaders) {\n let builder!: CustomFileHeadersBuilder;\n if (isFunction(this.config.styleDictionary.customFileHeaders)) {\n builder = this.config.styleDictionary.customFileHeaders;\n } else {\n builder = await resolve<CustomFileHeadersBuilder>(\n this,\n this.config.styleDictionary.customFileHeaders\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, fileHeader]) => {\n this.styleDictionary.registerFileHeader({\n name,\n fileHeader\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customFilters) {\n let builder!: CustomFiltersBuilder;\n if (isFunction(this.config.styleDictionary.customFilters)) {\n builder = this.config.styleDictionary.customFilters;\n } else {\n builder = await resolve<CustomFiltersBuilder>(\n this,\n this.config.styleDictionary.customFilters\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, filter]) => {\n this.styleDictionary.registerFilter({\n ...filter,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customPreprocessors) {\n let builder!: CustomPreprocessorsBuilder;\n if (isFunction(this.config.styleDictionary.customPreprocessors)) {\n builder = this.config.styleDictionary.customPreprocessors;\n } else {\n builder = await resolve<CustomPreprocessorsBuilder>(\n this,\n this.config.styleDictionary.customPreprocessors\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, preprocessor]) => {\n this.styleDictionary.registerPreprocessor({\n ...preprocessor,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customParsers) {\n let builder!: CustomParsersBuilder;\n if (isFunction(this.config.styleDictionary.customParsers)) {\n builder = this.config.styleDictionary.customParsers;\n } else {\n builder = await resolve<CustomParsersBuilder>(\n this,\n this.config.styleDictionary.customParsers\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, parser]) => {\n this.styleDictionary.registerParser({\n ...parser,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customTransforms) {\n let builder!: CustomTransformsBuilder;\n if (isFunction(this.config.styleDictionary.customTransforms)) {\n builder = this.config.styleDictionary.customTransforms;\n } else {\n builder = await resolve<CustomTransformsBuilder>(\n this,\n this.config.styleDictionary.customTransforms\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, transform]) => {\n this.styleDictionary.registerTransform({\n ...transform,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customTransformGroups) {\n let builder!: CustomTransformGroupsBuilder;\n if (isFunction(this.config.styleDictionary.customTransformGroups)) {\n builder = this.config.styleDictionary.customTransformGroups;\n } else {\n builder = await resolve<CustomTransformGroupsBuilder>(\n this,\n this.config.styleDictionary.customTransformGroups\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, transformGroup]) => {\n this.styleDictionary.registerTransformGroup({\n name,\n transforms: transformGroup\n });\n }\n );\n }\n },\n async clean() {\n await this.styleDictionary.cleanAllPlatforms({\n cache: !this.config.skipCache\n });\n },\n prepare: {\n order: \"pre\",\n async handler() {\n if (!this.config.styleDictionary.skipBuild) {\n await this.styleDictionary.buildAllPlatforms({\n cache: !this.config.skipCache\n });\n }\n }\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;AAoDA,MAAa,UAGX,UAAwC,EAAE,KACrB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,iBAAiB,KAAK,SAAS;IAC7B,KAAK,EACH,WACE,KAAK,OAAO,aAAa,cAAc,QACnC,YACA,KAAK,OAAO,aAAa,cAAc,QACrC,YACA,UACT;IACD,YAAY;IACb,CAAC,EACH;;EAEH,MAAM,iBAAiB;AACrB,QAAK,kBACH,KAAK,OAAO,gBAAgB,YAC5B,IAAI,gBAAgB,KAAK,OAAO,gBAAgB;AAElD,QAAK,gBAAgB,mBAAmB,WAAW,KAAK,CAAC;AAEzD,OAAI,KAAK,OAAO,gBAAgB,eAAe;IAC7C,IAAI;AACJ,QAAI,WAAW,KAAK,OAAO,gBAAgB,cAAc,CACvD,WAAU,KAAK,OAAO,gBAAgB;QAEtC,WAAU,MAAM,QACd,MACA,KAAK,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,KAAK,gBAAgB,kBAAkB,EAC3C,OAAO,CAAC,KAAK,OAAO,WACrB,CAAC;;GAGP;EACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-header.mjs","names":[],"sources":["../../../src/style-dictionary/file-header.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 { Context } from \"powerlines\";\nimport type { FileHeader } from \"style-dictionary/types\";\n\nexport const fileHeader = (\n context: Context\n): { name: string; fileHeader: FileHeader } => ({\n name: \"powerlines/file-header\",\n fileHeader: (defaultMessages = [] as string[]) => {\n return [\n `Generated by ${context.config.framework || \"Powerlines\"}`,\n 'NOTE: Do not edit this file manually - it will be overwritten automatically by the \"prepare\" command',\n ...defaultMessages\n ];\n }\n});\n"],"mappings":";AAqBA,MAAa,cACX,aAC8C;CAC9C,MAAM;CACN,aAAa,kBAAkB,EAAE,KAAiB;AAChD,SAAO;GACL,gBAAgB,QAAQ,OAAO,aAAa;GAC5C;GACA,GAAG;GACJ;;CAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;KAqCK,+BAAA,OACH,gBAAA,EAAkB,4BAAA,KACf,MAAA,SAAe,CAAA;AAAA,KAER,oBAAA,GAAuB,+BAAA,CAAgC,MAAA;AAAA,KACvD,uBAAA,GACV,+BAAA,CAA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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;KAqCK,+BAAA,OACH,gBAAA,EAAkB,4BAAA,KACf,MAAA,SAAe,CAAA;AAAA,KAER,oBAAA,GAAuB,+BAAA,CAAgC,MAAA;AAAA,KACvD,uBAAA,GACV,+BAAA,CAAgC,SAAA;AAAA,KACtB,oBAAA,GAAuB,+BAAA,CAAgC,MAAA;AAAA,KACvD,4BAAA,GAA+B,+BAAA;AAAA,KAG/B,wBAAA,GACV,+BAAA,CAAgC,UAAA;AAAA,KACtB,oBAAA,GAAuB,+BAAA,CAAgC,MAAA;AAAA,KACvD,oBAAA,IACV,gBAAA,EAAkB,4BAAA,KACf,MAAA;AAAA,KACO,0BAAA,GACV,+BAAA,CAAgC,YAAA;AAAA,KAEtB,4BAAA,GAA+B,IAAA,CAAK,MAAA;EApBX;;;;;;;AAIrC;EAyBE,SAAA;;;;AAxBF;;;EAgCE,aAAA,GAAgB,uBAAA,GAA0B,oBAAA;EA/BD;AAC3C;;;;;EAsCE,iBAAA,GAAoB,uBAAA,GAA0B,wBAAA;EArCR;;;;AAGxC;;EA0CE,aAAA,GAAgB,uBAAA,GAA0B,oBAAA;EAzC1C;;AACF;;;;EAgDE,aAAA,GAAgB,uBAAA,GAA0B,oBAAA;EA/ChC;;;;;;EAuDV,mBAAA,GAAsB,uBAAA,GAA0B,0BAAA;EArDvC;;AACX;;;;EA4DE,aAAA,GAAgB,uBAAA,GAA0B,oBAAA;EAzDhC;;;;;;EAiEV,qBAAA,GACI,uBAAA,GACA,4BAAA;EA1CgB;;;;;;EAkDpB,gBAAA,GAAmB,uBAAA,GAA0B,uBAAA;EA1BG;;;;;;EAkChD,QAAA,GAAW,eAAA;AAAA;AAAA,KAGD,sCAAA,GAAyC,iBAAA,GACnD,cAAA;AAAA,KAEU,+BAAA,GAAkC,UAAA;EAC5C,eAAA,GAAkB,4BAAA;EAClB,YAAA,GAAe,MAAA,SAAe,sCAAA;AAAA;AAAA,KAGpB,mCAAA,GAAsC,cAAA;EAChD,eAAA,EAAiB,4BAAA;EACjB,YAAA,EAAc,MAAA,SAAe,sCAAA;AAAA;AAAA,KAGnB,4BAAA,yBACc,mCAAA,GACtB,mCAAA,IACA,aAAA,CAAc,eAAA;EAChB,eAAA,EAAiB,eAAA;AAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-style-dictionary",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.243",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin to generate project code with Style Dictionary.",
|
|
6
6
|
"keywords": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"default": "./dist/index.mjs"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
"
|
|
62
|
+
"./package.json": "./package.json",
|
|
63
63
|
"./types": {
|
|
64
64
|
"require": {
|
|
65
65
|
"types": "./dist/types/index.d.cts",
|
|
@@ -95,19 +95,20 @@
|
|
|
95
95
|
"typings": "dist/index.d.mts",
|
|
96
96
|
"files": ["dist/**/*"],
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@powerlines/plugin-esbuild": "^0.13.
|
|
98
|
+
"@powerlines/plugin-esbuild": "^0.13.346",
|
|
99
|
+
"@storm-software/config-tools": "1.189.28",
|
|
99
100
|
"@stryke/path": "^0.26.19",
|
|
100
101
|
"@stryke/type-checks": "^0.5.38",
|
|
101
102
|
"@stryke/types": "^0.10.52",
|
|
102
103
|
"defu": "^6.1.4",
|
|
103
104
|
"jiti": "^2.6.1",
|
|
104
|
-
"powerlines": "^0.41.
|
|
105
|
+
"powerlines": "^0.41.7",
|
|
105
106
|
"style-dictionary": "^5.3.3"
|
|
106
107
|
},
|
|
107
108
|
"devDependencies": {
|
|
108
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
109
|
+
"@powerlines/plugin-plugin": "^0.12.293",
|
|
109
110
|
"@types/node": "^25.4.0"
|
|
110
111
|
},
|
|
111
112
|
"publishConfig": { "access": "public" },
|
|
112
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "2fb48143904805988bac9bdbc04cdc4a35ff398b"
|
|
113
114
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28_magicast@0.5.2/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
|
|
3
|
-
var LogLevelLabel = {
|
|
4
|
-
SILENT: "silent",
|
|
5
|
-
FATAL: "fatal",
|
|
6
|
-
ERROR: "error",
|
|
7
|
-
WARN: "warn",
|
|
8
|
-
SUCCESS: "success",
|
|
9
|
-
INFO: "info",
|
|
10
|
-
DEBUG: "debug",
|
|
11
|
-
TRACE: "trace",
|
|
12
|
-
ALL: "all"
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
exports.LogLevelLabel = LogLevelLabel;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28_magicast@0.5.2/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
|
|
2
|
-
var LogLevelLabel = {
|
|
3
|
-
SILENT: "silent",
|
|
4
|
-
FATAL: "fatal",
|
|
5
|
-
ERROR: "error",
|
|
6
|
-
WARN: "warn",
|
|
7
|
-
SUCCESS: "success",
|
|
8
|
-
INFO: "info",
|
|
9
|
-
DEBUG: "debug",
|
|
10
|
-
TRACE: "trace",
|
|
11
|
-
ALL: "all"
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { LogLevelLabel };
|
|
16
|
-
//# sourceMappingURL=chunk-POXTJ6GF.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-POXTJ6GF.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@storm-software+config-tools@1.189.28_magicast@0.5.2/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js"],"sourcesContent":["// src/types.ts\nvar LogLevel = {\n SILENT: 0,\n FATAL: 10,\n ERROR: 20,\n WARN: 30,\n SUCCESS: 35,\n INFO: 40,\n DEBUG: 60,\n TRACE: 70,\n ALL: 100\n};\nvar LogLevelLabel = {\n SILENT: \"silent\",\n FATAL: \"fatal\",\n ERROR: \"error\",\n WARN: \"warn\",\n SUCCESS: \"success\",\n INFO: \"info\",\n DEBUG: \"debug\",\n TRACE: \"trace\",\n ALL: \"all\"\n};\n\nexport {\n LogLevel,\n LogLevelLabel\n};\n"],"x_google_ignoreList":[0],"mappings":";AAYA,IAAI,gBAAgB;CAClB,QAAQ;CACR,OAAO;CACP,OAAO;CACP,MAAM;CACN,SAAS;CACT,MAAM;CACN,OAAO;CACP,OAAO;CACP,KAAK;CACN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-header.mjs","names":[],"sources":["../../src/style-dictionary/file-header.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 { Context } from \"powerlines\";\nimport type { FileHeader } from \"style-dictionary/types\";\n\nexport const fileHeader = (\n context: Context\n): { name: string; fileHeader: FileHeader } => ({\n name: \"powerlines/file-header\",\n fileHeader: (defaultMessages = [] as string[]) => {\n return [\n `Generated by ${context.config.framework || \"Powerlines\"}`,\n 'NOTE: Do not edit this file manually - it will be overwritten automatically by the \"prepare\" command',\n ...defaultMessages\n ];\n }\n});\n"],"mappings":";AAqBA,MAAa,cACX,aAC8C;CAC9C,MAAM;CACN,aAAa,kBAAkB,EAAE,KAAiB;AAChD,SAAO;GACL,gBAAgB,QAAQ,OAAO,aAAa;GAC5C;GACA,GAAG;GACJ;;CAEJ"}
|
|
File without changes
|
|
File without changes
|