@powerlines/plugin-style-dictionary 0.2.0 → 0.3.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/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./powerlines/src/lib/utilities/resolve.cjs`);let
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./powerlines/src/lib/utilities/resolve.cjs`),n=require(`./style-dictionary/file-header.cjs`);let r=require(`@storm-software/config-tools/types`),i=require(`@stryke/type-checks/is-function`),a=require(`defu`);a=e.__toESM(a);let o=require(`style-dictionary`);o=e.__toESM(o);const s=(e={})=>({name:`style-dictionary`,config(){return{styleDictionary:(0,a.default)(e,{log:{verbosity:this.config.logLevel===r.LogLevelLabel.DEBUG||this.config.logLevel===r.LogLevelLabel.TRACE?`verbose`:this.config.logLevel===null?`silent`:void 0},fileHeader:`powerlines/file-header`})}},async configResolved(){if(this.styleDictionary=this.config.styleDictionary.instance??new o.default(this.config.styleDictionary),this.styleDictionary.registerFileHeader(n.fileHeader(this)),this.config.styleDictionary.customActions){let e;e=(0,i.isFunction)(this.config.styleDictionary.customActions)?this.config.styleDictionary.customActions:await t.resolve(this,this.config.styleDictionary.customActions),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerAction({...t,name:e})})}if(this.config.styleDictionary.customFileHeaders){let e;e=(0,i.isFunction)(this.config.styleDictionary.customFileHeaders)?this.config.styleDictionary.customFileHeaders:await t.resolve(this,this.config.styleDictionary.customFileHeaders),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFileHeader({name:e,fileHeader:t})})}if(this.config.styleDictionary.customFilters){let e;e=(0,i.isFunction)(this.config.styleDictionary.customFilters)?this.config.styleDictionary.customFilters:await t.resolve(this,this.config.styleDictionary.customFilters),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFilter({...t,name:e})})}if(this.config.styleDictionary.customPreprocessors){let e;e=(0,i.isFunction)(this.config.styleDictionary.customPreprocessors)?this.config.styleDictionary.customPreprocessors:await t.resolve(this,this.config.styleDictionary.customPreprocessors),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerPreprocessor({...t,name:e})})}if(this.config.styleDictionary.customParsers){let e;e=(0,i.isFunction)(this.config.styleDictionary.customParsers)?this.config.styleDictionary.customParsers:await t.resolve(this,this.config.styleDictionary.customParsers),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerParser({...t,name:e})})}if(this.config.styleDictionary.customTransforms){let e;e=(0,i.isFunction)(this.config.styleDictionary.customTransforms)?this.config.styleDictionary.customTransforms:await t.resolve(this,this.config.styleDictionary.customTransforms),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransform({...t,name:e})})}if(this.config.styleDictionary.customTransformGroups){let e;e=(0,i.isFunction)(this.config.styleDictionary.customTransformGroups)?this.config.styleDictionary.customTransformGroups:await t.resolve(this,this.config.styleDictionary.customTransformGroups),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransformGroup({name:e,transforms:t})})}},async clean(){await this.styleDictionary.cleanAllPlatforms({cache:!this.config.skipCache})},prepare:{order:`pre`,async handler(){await this.styleDictionary.buildAllPlatforms({cache:!this.config.skipCache})}}});var c=s;exports.default=c,exports.plugin=s;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolve as e}from"./powerlines/src/lib/utilities/resolve.mjs";import{
|
|
1
|
+
import{resolve as e}from"./powerlines/src/lib/utilities/resolve.mjs";import{fileHeader as t}from"./style-dictionary/file-header.mjs";import{LogLevelLabel as n}from"@storm-software/config-tools/types";import{isFunction as r}from"@stryke/type-checks/is-function";import i from"defu";import a from"style-dictionary";const o=(o={})=>({name:`style-dictionary`,config(){return{styleDictionary:i(o,{log:{verbosity:this.config.logLevel===n.DEBUG||this.config.logLevel===n.TRACE?`verbose`:this.config.logLevel===null?`silent`:void 0},fileHeader:`powerlines/file-header`})}},async configResolved(){if(this.styleDictionary=this.config.styleDictionary.instance??new a(this.config.styleDictionary),this.styleDictionary.registerFileHeader(t(this)),this.config.styleDictionary.customActions){let t;t=r(this.config.styleDictionary.customActions)?this.config.styleDictionary.customActions:await e(this,this.config.styleDictionary.customActions),Object.entries(r(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerAction({...t,name:e})})}if(this.config.styleDictionary.customFileHeaders){let t;t=r(this.config.styleDictionary.customFileHeaders)?this.config.styleDictionary.customFileHeaders:await e(this,this.config.styleDictionary.customFileHeaders),Object.entries(r(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerFileHeader({name:e,fileHeader:t})})}if(this.config.styleDictionary.customFilters){let t;t=r(this.config.styleDictionary.customFilters)?this.config.styleDictionary.customFilters:await e(this,this.config.styleDictionary.customFilters),Object.entries(r(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerFilter({...t,name:e})})}if(this.config.styleDictionary.customPreprocessors){let t;t=r(this.config.styleDictionary.customPreprocessors)?this.config.styleDictionary.customPreprocessors:await e(this,this.config.styleDictionary.customPreprocessors),Object.entries(r(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerPreprocessor({...t,name:e})})}if(this.config.styleDictionary.customParsers){let t;t=r(this.config.styleDictionary.customParsers)?this.config.styleDictionary.customParsers:await e(this,this.config.styleDictionary.customParsers),Object.entries(r(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerParser({...t,name:e})})}if(this.config.styleDictionary.customTransforms){let t;t=r(this.config.styleDictionary.customTransforms)?this.config.styleDictionary.customTransforms:await e(this,this.config.styleDictionary.customTransforms),Object.entries(r(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerTransform({...t,name:e})})}if(this.config.styleDictionary.customTransformGroups){let t;t=r(this.config.styleDictionary.customTransformGroups)?this.config.styleDictionary.customTransformGroups:await e(this,this.config.styleDictionary.customTransformGroups),Object.entries(r(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerTransformGroup({name:e,transforms:t})})}},async clean(){await this.styleDictionary.cleanAllPlatforms({cache:!this.config.skipCache})},prepare:{order:`pre`,async handler(){await this.styleDictionary.buildAllPlatforms({cache:!this.config.skipCache})}}});var s=o;export{s as default,o as plugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>({name:`powerlines/file-header`,fileHeader:(t=[])=>[`Generated by ${e.config.framework||`Powerlines`}`,`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`,...t]});exports.fileHeader=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>({name:`powerlines/file-header`,fileHeader:(t=[])=>[`Generated by ${e.config.framework||`Powerlines`}`,`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`,...t]});export{e as fileHeader};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-style-dictionary",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code with Style Dictionary.",
|
|
6
6
|
"repository": {
|
|
@@ -136,5 +136,5 @@
|
|
|
136
136
|
"@types/node": "^24.10.4"
|
|
137
137
|
},
|
|
138
138
|
"publishConfig": { "access": "public" },
|
|
139
|
-
"gitHead": "
|
|
139
|
+
"gitHead": "34d5b3c98555ca6f395c60d20cb7f40464ea9257"
|
|
140
140
|
}
|