@razorwind/vsce 0.0.9 → 0.0.11
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 +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +5 -2
- package/dist/index.mjs +8 -8
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -182,4 +182,4 @@ artifacts/**
|
|
|
182
182
|
README.md.bak
|
|
183
183
|
INSTALL.md
|
|
184
184
|
.DS_Store
|
|
185
|
-
`}const u={name:`razorwind-vsce`},d={vscode:`^1.85.0`};function f(e,n,r){return(0,t.createDocument)(e,n,u,r)}function p(e){switch(e){case`light`:return`vs`;case`hc`:return`hc-black`;case`hcLight`:return`hc-light`;case`dark`:return`vs-dark`;default:return`vs-dark`}}function m(e){return(0,t.isObject)(e)&&typeof e.name==`string`&&(e.type===`light`||e.type===`dark`||e.type===`hc`||e.type===`hcLight`)}function h(e){if(Array.isArray(e))return e.map((e,t)=>{if(!m(e))throw TypeError(`@razorwind/vsce mapTheme()[${t}] must be a VsCodeTheme with name + type`);return e});if(m(e))return[e];if(!(0,t.isObject)(e))throw TypeError(`@razorwind/vsce mapTheme() must return a theme, theme array, or theme record`);return Object.entries(e).map(([e,t])=>{if(!m(t))throw TypeError(`@razorwind/vsce mapTheme()["${e}"] must be a VsCodeTheme with name + type`);return{...t,name:t.name||e}})}function g(e){if(typeof e==`string`)return e;if(e&&typeof e.url==`string`)return e.url}function _(e){if(!e.mapTheme)throw Error(`@razorwind/vsce requires options.mapTheme`);if(!e.name||e.name.includes(`/`))throw Error(`@razorwind/vsce requires options.name (unscoped Marketplace id)`);if(!e.publisher)throw Error(`@razorwind/vsce requires options.publisher`)}function v(e){return e===`light`||e===`hcLight`?`light`:`dark`}function y(e){let t={name:e.name,type:v(e.type),colors:e.colors??{}};return e.displayName&&(t.displayName=e.displayName),e.tokenColors&&(t.tokenColors=e.tokenColors),e.semanticHighlighting!==void 0&&(t.semanticHighlighting=e.semanticHighlighting),e.semanticTokenColors&&(t.semanticTokenColors=e.semanticTokenColors),`${JSON.stringify(t,null,2)}\n`}function b(e,n){let
|
|
185
|
+
`}const u={name:`razorwind-vsce`},d={vscode:`^1.85.0`};function f(e,n,r){return(0,t.createDocument)(e,n,u,r)}function p(e){switch(e){case`light`:return`vs`;case`hc`:return`hc-black`;case`hcLight`:return`hc-light`;case`dark`:return`vs-dark`;default:return`vs-dark`}}function m(e){return(0,t.isObject)(e)&&typeof e.name==`string`&&(e.type===`light`||e.type===`dark`||e.type===`hc`||e.type===`hcLight`)}function h(e){if(Array.isArray(e))return e.map((e,t)=>{if(!m(e))throw TypeError(`@razorwind/vsce mapTheme()[${t}] must be a VsCodeTheme with name + type`);return e});if(m(e))return[e];if(!(0,t.isObject)(e))throw TypeError(`@razorwind/vsce mapTheme() must return a theme, theme array, or theme record`);return Object.entries(e).map(([e,t])=>{if(!m(t))throw TypeError(`@razorwind/vsce mapTheme()["${e}"] must be a VsCodeTheme with name + type`);return{...t,name:t.name||e}})}function g(e){if(typeof e==`string`)return e;if(e&&typeof e.url==`string`)return e.url}function _(e){if(!e.mapTheme)throw Error(`@razorwind/vsce requires options.mapTheme`);if(!e.name||e.name.includes(`/`))throw Error(`@razorwind/vsce requires options.name (unscoped Marketplace id)`);if(!e.publisher)throw Error(`@razorwind/vsce requires options.publisher`)}function v(e){return e===`light`||e===`hcLight`?`light`:`dark`}function y(e){let t={name:e.name,type:v(e.type),colors:e.colors??{}};return e.displayName&&(t.displayName=e.displayName),e.tokenColors&&(t.tokenColors=e.tokenColors),e.semanticHighlighting!==void 0&&(t.semanticHighlighting=e.semanticHighlighting),e.semanticTokenColors&&(t.semanticTokenColors=e.semanticTokenColors),`${JSON.stringify(t,null,2)}\n`}function b(e,n,r={}){let i=e.includeScripts!==!1,a=(0,t.resolveSchemaIdentity)(r,{displayName:e.displayName,description:e.description,homepage:e.homepage,icon:e.icon,repository:typeof e.repository==`string`?e.repository:void 0}),o=a.title??(0,t.titleCase)(e.name),s=a.description??`${o} — VS Code themes generated by Razorwind`,c=e.repository??a.repository,l=e.homepage??a.homepage,u=e.icon??a.logo,f={themes:n.map(e=>({label:e.displayName??e.name,uiTheme:p(e.type),path:`./themes/${(0,t.slugifyThemeName)(e.name)}.json`}))},m=i?{"package-vsix":`node --import tsx scripts/buildVsCodePackage.ts`,"publish-vsce":`node --import tsx scripts/publishVsce.ts`,"publish-ovsx":`node --import tsx scripts/publishOvsx.ts`}:void 0,h={name:e.name,displayName:o,description:s,version:e.version??`0.0.1`,publisher:e.publisher,license:e.license??`Apache-2.0`,categories:e.categories??[`Themes`],engines:e.engines??{...d},contributes:f,...e.keywords?{keywords:e.keywords}:{},...c?{repository:c}:{},...l?{homepage:l}:{},...e.bugs?{bugs:e.bugs}:{},...e.author?{author:e.author}:{},...u?{icon:u}:{},...e.galleryBanner?{galleryBanner:e.galleryBanner}:{},...m?{scripts:m}:{},...e.packageJson??{}};return h.name=e.name,h.publisher=e.publisher,h.contributes=f,m&&(h.scripts=(0,t.isObject)(h.scripts)&&!Array.isArray(h.scripts)?{...h.scripts,...m}:m),`${JSON.stringify(h,null,2)}\n`}function x(e,u){_(u);let d=u.outputPath??`vscode-extension`,p=u.includeScripts!==!1,m=u.extensionName??u.name,v=(0,t.resolveSchemaIdentity)(e,{displayName:u.displayName,description:u.description,homepage:u.homepage,icon:u.icon,repository:typeof u.repository==`string`?u.repository:void 0}),x=v.title??(0,t.titleCase)(u.name),S=v.description??`${x} — VS Code themes generated by Razorwind`,C=u.repository??v.repository,w=h(u.mapTheme(e.tokens));if(w.length===0)throw Error(`@razorwind/vsce mapTheme() returned no themes`);let T={};for(let e of w){let r=`${(0,t.slugifyThemeName)(e.name)}.json`,i=(0,n.join)(d,`themes`,r);T[i]=f(i,y(e),`json`)}let E=(0,n.join)(d,`package.json`);T[E]=f(E,b(u,w,e),`json`);let D=(0,n.join)(d,`.vscodeignore`);T[D]=f(D,l(),`ignore`);let O=w.map(e=>({label:e.displayName??e.name,path:`./themes/${(0,t.slugifyThemeName)(e.name)}.json`})),k=u.readme??c({displayName:x,description:S,themes:O,repositoryUrl:g(C)}),A=(0,n.join)(d,`README.md`);T[A]=f(A,k,`markdown`);let j=u.installGuide??r({displayName:x,extensionName:m,themes:O,includeScripts:p}),M=(0,n.join)(d,`INSTALL.md`);if(T[M]=f(M,j,`markdown`),p){let e=(0,n.join)(d,`scripts`,`vsixPackageShim.ts`);T[e]=f(e,i(m),`typescript`);let t=(0,n.join)(d,`scripts`,`buildVsCodePackage.ts`);T[t]=f(t,a(),`typescript`);let r=(0,n.join)(d,`scripts`,`publishVsce.ts`);T[r]=f(r,o(),`typescript`);let l=(0,n.join)(d,`scripts`,`publishOvsx.ts`);T[l]=f(l,s(),`typescript`);let u=(0,n.join)(d,`scripts`,`README.package.md`);T[u]=f(u,c({displayName:x,description:S,themes:O,repositoryUrl:g(C)}),`markdown`)}return T}var S=(0,e.definePlugin)(e=>({name:`vsce`,generate:async t=>{if(!e)throw Error(`@razorwind/vsce requires options: { name, publisher, mapTheme }`);return x(t,e)}}));exports.default=S,Object.defineProperty(exports,"flattenTokens",{enumerable:!0,get:function(){return t.flattenTokens}}),Object.defineProperty(exports,"formatTokenValue",{enumerable:!0,get:function(){return t.formatTokenValue}}),exports.generateVsceExtension=x,exports.normalizeThemes=h,exports.renderInstallMd=r,exports.renderPackageJson=b,exports.renderThemeJson=y,Object.defineProperty(exports,"resolveTokenSets",{enumerable:!0,get:function(){return t.resolveTokenSets}}),Object.defineProperty(exports,"toCssVar",{enumerable:!0,get:function(){return t.toCssVar}});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { flattenTokens, formatTokenValue, resolveTokenSets, toCssVar } from "@razorwind/core/utils";
|
|
1
|
+
import { SchemaIdentity, flattenTokens, formatTokenValue, resolveTokenSets, toCssVar } from "@razorwind/core/utils";
|
|
2
2
|
import { GeneratorFunctionResult } from "@power-plant/core";
|
|
3
3
|
import { Schema, Tokens } from "@razorwind/core/schema";
|
|
4
4
|
import { TokenType } from "@power-plant/dtcg-schema";
|
|
@@ -201,8 +201,11 @@ declare function normalizeThemes(result: VsCodeTheme | VsCodeTheme[] | Record<st
|
|
|
201
201
|
declare function renderThemeJson(theme: VsCodeTheme): string;
|
|
202
202
|
/**
|
|
203
203
|
* Build the extension `package.json` manifest (themes + optional scripts).
|
|
204
|
+
*
|
|
205
|
+
* When {@link spec} is provided, Schema identity fills missing display
|
|
206
|
+
* name / description / repository / homepage / icon.
|
|
204
207
|
*/
|
|
205
|
-
declare function renderPackageJson(options: VscePluginOptions, themes: VsCodeTheme[]): string;
|
|
208
|
+
declare function renderPackageJson(options: VscePluginOptions, themes: VsCodeTheme[], spec?: SchemaIdentity): string;
|
|
206
209
|
/**
|
|
207
210
|
* Generate a publishable VS Code theme extension package from a Razorwind schema.
|
|
208
211
|
*/
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/install.ts","../src/types.ts","../src/generate.ts","../src/index.ts"],"mappings":";;;;;;;;;;iBAuBgB,gBAAgB;EAC9B;EACA;EACA,QAAQ;IAAQ;IAAe;;EAC/B;;;;;;;UCHe;;EAEf;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;EAEA;;;;;;;UAQe;EACf;EACA;EACA;IACE;IACA;IACA;;;;;;;;UASa;;EAEf;;EAEA;;EAEA;EACA,SAAS;EACT,cAAc;EACd;EACA,sBAAsB;IAET;IAAqB;IAAoB;;;;;;;;KAS5C,uBACV,QAAQ,SAAS,eAAe,YAC7B,cAAc,gBAAgB,eAAe;;;;KAKtC;EAGN;EACA;EACA;;;;;;;;UASW;;;;;;;EAOf;;;;;;EAOA,UAAU;;;;;EAMV;;EAGA;;EAGA;;;;;;EAOA;;EAGA;;;;;EAMA;;;;EAKA;EAEA;IAGM;IACA;IACA;;EAGN;EAEA;IAGM;IACA;;EAGN,SAAS;;;;;EAMT;EAEA;IACE;IACA;;;;;EAMF;EAEA;;;;EAKA;IACE;;;;;;;;;;EAWF;;;;;EAMA;;;;;EAMA,eAAe;;;;;EAMf,cAAc;;;;;EAMd;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/install.ts","../src/types.ts","../src/generate.ts","../src/index.ts"],"mappings":";;;;;;;;;;iBAuBgB,gBAAgB;EAC9B;EACA;EACA,QAAQ;IAAQ;IAAe;;EAC/B;;;;;;;UCHe;;EAEf;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;EAEA;;;;;;;UAQe;EACf;EACA;EACA;IACE;IACA;IACA;;;;;;;;UASa;;EAEf;;EAEA;;EAEA;EACA,SAAS;EACT,cAAc;EACd;EACA,sBAAsB;IAET;IAAqB;IAAoB;;;;;;;;KAS5C,uBACV,QAAQ,SAAS,eAAe,YAC7B,cAAc,gBAAgB,eAAe;;;;KAKtC;EAGN;EACA;EACA;;;;;;;;UASW;;;;;;;EAOf;;;;;;EAOA,UAAU;;;;;EAMV;;EAGA;;EAGA;;;;;;EAOA;;EAGA;;;;;EAMA;;;;EAKA;EAEA;IAGM;IACA;IACA;;EAGN;EAEA;IAGM;IACA;;EAGN,SAAS;;;;;EAMT;EAEA;IACE;IACA;;;;;EAMF;EAEA;;;;EAKA;IACE;;;;;;;;;;EAWF;;;;;EAMA;;;;;EAMA,eAAe;;;;;EAMf,cAAc;;;;;EAMd;;;;;;;iBC1Ic,gBACd,QAAQ,cAAc,gBAAgB,eAAe,eACpD;iBA0Ea,gBAAgB,OAAO;;;;;;;iBA6BvB,kBACd,SAAS,mBACT,QAAQ,eACR,OAAM;;;;iBA4EQ,sBACd,MAAM,QACN,SAAS,oBACR,wBAAwB,QAAQ"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { flattenTokens, formatTokenValue, resolveTokenSets, toCssVar } from "@razorwind/core/utils";
|
|
1
|
+
import { SchemaIdentity, flattenTokens, formatTokenValue, resolveTokenSets, toCssVar } from "@razorwind/core/utils";
|
|
2
2
|
import { GeneratorFunctionResult } from "@power-plant/core";
|
|
3
3
|
import { Schema, Tokens } from "@razorwind/core/schema";
|
|
4
4
|
import { TokenType } from "@power-plant/dtcg-schema";
|
|
@@ -201,8 +201,11 @@ declare function normalizeThemes(result: VsCodeTheme | VsCodeTheme[] | Record<st
|
|
|
201
201
|
declare function renderThemeJson(theme: VsCodeTheme): string;
|
|
202
202
|
/**
|
|
203
203
|
* Build the extension `package.json` manifest (themes + optional scripts).
|
|
204
|
+
*
|
|
205
|
+
* When {@link spec} is provided, Schema identity fills missing display
|
|
206
|
+
* name / description / repository / homepage / icon.
|
|
204
207
|
*/
|
|
205
|
-
declare function renderPackageJson(options: VscePluginOptions, themes: VsCodeTheme[]): string;
|
|
208
|
+
declare function renderPackageJson(options: VscePluginOptions, themes: VsCodeTheme[], spec?: SchemaIdentity): string;
|
|
206
209
|
/**
|
|
207
210
|
* Generate a publishable VS Code theme extension package from a Razorwind schema.
|
|
208
211
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{definePlugin as e}from"@razorwind/core/plugin";import{createDocument as t,flattenTokens as n,formatTokenValue as r,isObject as i,
|
|
1
|
+
import{definePlugin as e}from"@razorwind/core/plugin";import{createDocument as t,flattenTokens as n,formatTokenValue as r,isObject as i,resolveSchemaIdentity as a,resolveTokenSets as o,slugifyThemeName as s,titleCase as c,toCssVar as l}from"@razorwind/core/utils";import{join as u}from"node:path";function d(e){let t=e.themes.map(e=>`- \`${e.path}\` — ${e.label}`).join(`
|
|
2
2
|
`),n=e.themes.map(e=>`- **${e.label}**`).join(`
|
|
3
3
|
`),r=`./dist/${e.extensionName}.vsix`,i=e.includeScripts?`
|
|
4
4
|
## Package VSIX
|
|
@@ -35,7 +35,7 @@ ${i}
|
|
|
35
35
|
Open the Command Palette (\`Ctrl+Shift+P\` / \`Cmd+Shift+P\`) → **Preferences: Color Theme** → choose:
|
|
36
36
|
|
|
37
37
|
${n}
|
|
38
|
-
`}function
|
|
38
|
+
`}function f(e){return`import { existsSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
39
39
|
import { dirname, join } from "node:path";
|
|
40
40
|
import { fileURLToPath } from "node:url";
|
|
41
41
|
|
|
@@ -99,7 +99,7 @@ export function withVsixPackageShim(action: () => void): void {
|
|
|
99
99
|
console.log(\`\\nRestored package name: \${originalName}\`);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
`}function
|
|
102
|
+
`}function p(){return`import { execFileSync } from "node:child_process";
|
|
103
103
|
import { mkdirSync } from "node:fs";
|
|
104
104
|
import { join } from "node:path";
|
|
105
105
|
import { packageRoot, withVsixPackageShim } from "./vsixPackageShim.ts";
|
|
@@ -123,7 +123,7 @@ withVsixPackageShim(() => {
|
|
|
123
123
|
}
|
|
124
124
|
);
|
|
125
125
|
});
|
|
126
|
-
`}function
|
|
126
|
+
`}function m(){return`import { execFileSync } from "node:child_process";
|
|
127
127
|
import { packageRoot, withVsixPackageShim } from "./vsixPackageShim.ts";
|
|
128
128
|
|
|
129
129
|
// Manual VS Marketplace publish. Requires VSCE_PAT in the environment.
|
|
@@ -140,7 +140,7 @@ withVsixPackageShim(() => {
|
|
|
140
140
|
stdio: "inherit"
|
|
141
141
|
});
|
|
142
142
|
});
|
|
143
|
-
`}function
|
|
143
|
+
`}function h(){return`import { execFileSync } from "node:child_process";
|
|
144
144
|
import { packageRoot, withVsixPackageShim } from "./vsixPackageShim.ts";
|
|
145
145
|
|
|
146
146
|
// Manual Open VSX publish. Requires OVSX_PAT in the environment.
|
|
@@ -157,7 +157,7 @@ withVsixPackageShim(() => {
|
|
|
157
157
|
stdio: "inherit"
|
|
158
158
|
});
|
|
159
159
|
});
|
|
160
|
-
`}function
|
|
160
|
+
`}function g(e){let t=e.themes.map(e=>`- ${e.label}`).join(`
|
|
161
161
|
`),n=e.repositoryUrl?`\n## Links\n\n- [GitHub](${e.repositoryUrl})\n`:``;return`# ${e.displayName}
|
|
162
162
|
|
|
163
163
|
${e.description}
|
|
@@ -167,7 +167,7 @@ See **INSTALL.md** for VS Code extension install steps (VSIX or Extension Develo
|
|
|
167
167
|
## Themes
|
|
168
168
|
|
|
169
169
|
${t||`- (generated themes)`}
|
|
170
|
-
${n}`}function
|
|
170
|
+
${n}`}function _(){return`node_modules/**
|
|
171
171
|
src/**
|
|
172
172
|
scripts/**
|
|
173
173
|
test/**
|
|
@@ -182,5 +182,5 @@ artifacts/**
|
|
|
182
182
|
README.md.bak
|
|
183
183
|
INSTALL.md
|
|
184
184
|
.DS_Store
|
|
185
|
-
`}const
|
|
185
|
+
`}const v={name:`razorwind-vsce`},y={vscode:`^1.85.0`};function b(e,n,r){return t(e,n,v,r)}function x(e){switch(e){case`light`:return`vs`;case`hc`:return`hc-black`;case`hcLight`:return`hc-light`;case`dark`:return`vs-dark`;default:return`vs-dark`}}function S(e){return i(e)&&typeof e.name==`string`&&(e.type===`light`||e.type===`dark`||e.type===`hc`||e.type===`hcLight`)}function C(e){if(Array.isArray(e))return e.map((e,t)=>{if(!S(e))throw TypeError(`@razorwind/vsce mapTheme()[${t}] must be a VsCodeTheme with name + type`);return e});if(S(e))return[e];if(!i(e))throw TypeError(`@razorwind/vsce mapTheme() must return a theme, theme array, or theme record`);return Object.entries(e).map(([e,t])=>{if(!S(t))throw TypeError(`@razorwind/vsce mapTheme()["${e}"] must be a VsCodeTheme with name + type`);return{...t,name:t.name||e}})}function w(e){if(typeof e==`string`)return e;if(e&&typeof e.url==`string`)return e.url}function T(e){if(!e.mapTheme)throw Error(`@razorwind/vsce requires options.mapTheme`);if(!e.name||e.name.includes(`/`))throw Error(`@razorwind/vsce requires options.name (unscoped Marketplace id)`);if(!e.publisher)throw Error(`@razorwind/vsce requires options.publisher`)}function E(e){return e===`light`||e===`hcLight`?`light`:`dark`}function D(e){let t={name:e.name,type:E(e.type),colors:e.colors??{}};return e.displayName&&(t.displayName=e.displayName),e.tokenColors&&(t.tokenColors=e.tokenColors),e.semanticHighlighting!==void 0&&(t.semanticHighlighting=e.semanticHighlighting),e.semanticTokenColors&&(t.semanticTokenColors=e.semanticTokenColors),`${JSON.stringify(t,null,2)}\n`}function O(e,t,n={}){let r=e.includeScripts!==!1,o=a(n,{displayName:e.displayName,description:e.description,homepage:e.homepage,icon:e.icon,repository:typeof e.repository==`string`?e.repository:void 0}),l=o.title??c(e.name),u=o.description??`${l} — VS Code themes generated by Razorwind`,d=e.repository??o.repository,f=e.homepage??o.homepage,p=e.icon??o.logo,m={themes:t.map(e=>({label:e.displayName??e.name,uiTheme:x(e.type),path:`./themes/${s(e.name)}.json`}))},h=r?{"package-vsix":`node --import tsx scripts/buildVsCodePackage.ts`,"publish-vsce":`node --import tsx scripts/publishVsce.ts`,"publish-ovsx":`node --import tsx scripts/publishOvsx.ts`}:void 0,g={name:e.name,displayName:l,description:u,version:e.version??`0.0.1`,publisher:e.publisher,license:e.license??`Apache-2.0`,categories:e.categories??[`Themes`],engines:e.engines??{...y},contributes:m,...e.keywords?{keywords:e.keywords}:{},...d?{repository:d}:{},...f?{homepage:f}:{},...e.bugs?{bugs:e.bugs}:{},...e.author?{author:e.author}:{},...p?{icon:p}:{},...e.galleryBanner?{galleryBanner:e.galleryBanner}:{},...h?{scripts:h}:{},...e.packageJson??{}};return g.name=e.name,g.publisher=e.publisher,g.contributes=m,h&&(g.scripts=i(g.scripts)&&!Array.isArray(g.scripts)?{...g.scripts,...h}:h),`${JSON.stringify(g,null,2)}\n`}function k(e,t){T(t);let n=t.outputPath??`vscode-extension`,r=t.includeScripts!==!1,i=t.extensionName??t.name,o=a(e,{displayName:t.displayName,description:t.description,homepage:t.homepage,icon:t.icon,repository:typeof t.repository==`string`?t.repository:void 0}),l=o.title??c(t.name),v=o.description??`${l} — VS Code themes generated by Razorwind`,y=t.repository??o.repository,x=C(t.mapTheme(e.tokens));if(x.length===0)throw Error(`@razorwind/vsce mapTheme() returned no themes`);let S={};for(let e of x){let t=`${s(e.name)}.json`,r=u(n,`themes`,t);S[r]=b(r,D(e),`json`)}let E=u(n,`package.json`);S[E]=b(E,O(t,x,e),`json`);let k=u(n,`.vscodeignore`);S[k]=b(k,_(),`ignore`);let A=x.map(e=>({label:e.displayName??e.name,path:`./themes/${s(e.name)}.json`})),j=t.readme??g({displayName:l,description:v,themes:A,repositoryUrl:w(y)}),M=u(n,`README.md`);S[M]=b(M,j,`markdown`);let N=t.installGuide??d({displayName:l,extensionName:i,themes:A,includeScripts:r}),P=u(n,`INSTALL.md`);if(S[P]=b(P,N,`markdown`),r){let e=u(n,`scripts`,`vsixPackageShim.ts`);S[e]=b(e,f(i),`typescript`);let t=u(n,`scripts`,`buildVsCodePackage.ts`);S[t]=b(t,p(),`typescript`);let r=u(n,`scripts`,`publishVsce.ts`);S[r]=b(r,m(),`typescript`);let a=u(n,`scripts`,`publishOvsx.ts`);S[a]=b(a,h(),`typescript`);let o=u(n,`scripts`,`README.package.md`);S[o]=b(o,g({displayName:l,description:v,themes:A,repositoryUrl:w(y)}),`markdown`)}return S}var A=e(e=>({name:`vsce`,generate:async t=>{if(!e)throw Error(`@razorwind/vsce requires options: { name, publisher, mapTheme }`);return k(t,e)}}));export{A as default,n as flattenTokens,r as formatTokenValue,k as generateVsceExtension,C as normalizeThemes,d as renderInstallMd,O as renderPackageJson,D as renderThemeJson,o as resolveTokenSets,l as toCssVar};
|
|
186
186
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razorwind/vsce",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Razorwind Visual Studio Code Extension plugin that creates theming extensions from design tokens.",
|
|
6
6
|
"repository": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@power-plant/core": "^0.0.81",
|
|
70
70
|
"@power-plant/dtcg-schema": "^0.0.1",
|
|
71
|
-
"@razorwind/core": "0.0.
|
|
71
|
+
"@razorwind/core": "0.0.34"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@powerlines/plugin-tsdown": "^0.1.591",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"typescript": "^6.0.3"
|
|
77
77
|
},
|
|
78
78
|
"publishConfig": { "access": "public" },
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "2e9d53ceff13e46fdd225eff5f9ac32bc661814a"
|
|
80
80
|
}
|