@powerlines/plugin-style-dictionary 0.1.105 → 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 n=require(`@storm-software/config-tools/types`),r=require(`@stryke/type-checks/is-function`),i=require(`defu`);i=e.__toESM(i);let a=require(`style-dictionary`);a=e.__toESM(a);const o=(e={})=>({name:`style-dictionary`,config(){return{styleDictionary:(0,i.default)(e,{log:{verbosity:this.config.logLevel===n.LogLevelLabel.DEBUG||this.config.logLevel===n.LogLevelLabel.TRACE?`verbose`:this.config.logLevel===null?`silent`:void 0}})}},async configResolved(){if(this.styleDictionary=this.config.styleDictionary.instance??new a.default(this.config.styleDictionary),this.config.styleDictionary.customActions){let e;e=(0,r.isFunction)(this.config.styleDictionary.customActions)?this.config.styleDictionary.customActions:await t.resolve(this,this.config.styleDictionary.customActions),Object.entries((0,r.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerAction({...t,name:e})})}if(this.config.styleDictionary.customFileHeaders){let e;e=(0,r.isFunction)(this.config.styleDictionary.customFileHeaders)?this.config.styleDictionary.customFileHeaders:await t.resolve(this,this.config.styleDictionary.customFileHeaders),Object.entries((0,r.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFileHeader({name:e,fileHeader:t})})}if(this.config.styleDictionary.customFilters){let e;e=(0,r.isFunction)(this.config.styleDictionary.customFilters)?this.config.styleDictionary.customFilters:await t.resolve(this,this.config.styleDictionary.customFilters),Object.entries((0,r.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFilter({...t,name:e})})}if(this.config.styleDictionary.customPreprocessors){let e;e=(0,r.isFunction)(this.config.styleDictionary.customPreprocessors)?this.config.styleDictionary.customPreprocessors:await t.resolve(this,this.config.styleDictionary.customPreprocessors),Object.entries((0,r.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerPreprocessor({...t,name:e})})}if(this.config.styleDictionary.customParsers){let e;e=(0,r.isFunction)(this.config.styleDictionary.customParsers)?this.config.styleDictionary.customParsers:await t.resolve(this,this.config.styleDictionary.customParsers),Object.entries((0,r.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerParser({...t,name:e})})}if(this.config.styleDictionary.customTransforms){let e;e=(0,r.isFunction)(this.config.styleDictionary.customTransforms)?this.config.styleDictionary.customTransforms:await t.resolve(this,this.config.styleDictionary.customTransforms),Object.entries((0,r.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransform({...t,name:e})})}if(this.config.styleDictionary.customTransformGroups){let e;e=(0,r.isFunction)(this.config.styleDictionary.customTransformGroups)?this.config.styleDictionary.customTransformGroups:await t.resolve(this,this.config.styleDictionary.customTransformGroups),Object.entries((0,r.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransformGroup({name:e,transforms:t})})}},async prepare(){await this.styleDictionary.buildAllPlatforms({cache:!this.config.skipCache})}});var s=o;exports.default=s,exports.plugin=o;
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{LogLevelLabel as t}from"@storm-software/config-tools/types";import{isFunction as n}from"@stryke/type-checks/is-function";import r from"defu";import i from"style-dictionary";const a=(a={})=>({name:`style-dictionary`,config(){return{styleDictionary:r(a,{log:{verbosity:this.config.logLevel===t.DEBUG||this.config.logLevel===t.TRACE?`verbose`:this.config.logLevel===null?`silent`:void 0}})}},async configResolved(){if(this.styleDictionary=this.config.styleDictionary.instance??new i(this.config.styleDictionary),this.config.styleDictionary.customActions){let t;t=n(this.config.styleDictionary.customActions)?this.config.styleDictionary.customActions:await e(this,this.config.styleDictionary.customActions),Object.entries(n(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerAction({...t,name:e})})}if(this.config.styleDictionary.customFileHeaders){let t;t=n(this.config.styleDictionary.customFileHeaders)?this.config.styleDictionary.customFileHeaders:await e(this,this.config.styleDictionary.customFileHeaders),Object.entries(n(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerFileHeader({name:e,fileHeader:t})})}if(this.config.styleDictionary.customFilters){let t;t=n(this.config.styleDictionary.customFilters)?this.config.styleDictionary.customFilters:await e(this,this.config.styleDictionary.customFilters),Object.entries(n(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerFilter({...t,name:e})})}if(this.config.styleDictionary.customPreprocessors){let t;t=n(this.config.styleDictionary.customPreprocessors)?this.config.styleDictionary.customPreprocessors:await e(this,this.config.styleDictionary.customPreprocessors),Object.entries(n(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerPreprocessor({...t,name:e})})}if(this.config.styleDictionary.customParsers){let t;t=n(this.config.styleDictionary.customParsers)?this.config.styleDictionary.customParsers:await e(this,this.config.styleDictionary.customParsers),Object.entries(n(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerParser({...t,name:e})})}if(this.config.styleDictionary.customTransforms){let t;t=n(this.config.styleDictionary.customTransforms)?this.config.styleDictionary.customTransforms:await e(this,this.config.styleDictionary.customTransforms),Object.entries(n(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerTransform({...t,name:e})})}if(this.config.styleDictionary.customTransformGroups){let t;t=n(this.config.styleDictionary.customTransformGroups)?this.config.styleDictionary.customTransformGroups:await e(this,this.config.styleDictionary.customTransformGroups),Object.entries(n(t)?t(this):t).forEach(([e,t])=>{this.styleDictionary.registerTransformGroup({name:e,transforms:t})})}},async prepare(){await this.styleDictionary.buildAllPlatforms({cache:!this.config.skipCache})}});var o=a;export{o as default,a as plugin};
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.1.105",
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": {
@@ -127,14 +127,14 @@
127
127
  "@stryke/types": "^0.10.28",
128
128
  "defu": "^6.1.4",
129
129
  "jiti": "^2.6.1",
130
- "powerlines": "^0.36.4",
130
+ "powerlines": "^0.36.5",
131
131
  "style-dictionary": "^5.1.1"
132
132
  },
133
133
  "devDependencies": {
134
- "@powerlines/nx": "^0.11.30",
135
- "@powerlines/plugin-plugin": "^0.12.51",
134
+ "@powerlines/nx": "^0.11.31",
135
+ "@powerlines/plugin-plugin": "^0.12.52",
136
136
  "@types/node": "^24.10.4"
137
137
  },
138
138
  "publishConfig": { "access": "public" },
139
- "gitHead": "97f5ae6f9f2d25c402c3bd69a6f2167cb11969f6"
139
+ "gitHead": "34d5b3c98555ca6f395c60d20cb7f40464ea9257"
140
140
  }