Compare commits

...

2 Commits
0.1.0 ... main

Author SHA1 Message Date
Bauke 46662007d3
Publish Love to open-vsx.org 2020-12-21 16:06:37 +01:00
Bauke 0a1cecda0d
Add a CSS file with the colors defined as custom properties. 2020-08-18 14:37:52 +02:00
7 changed files with 102 additions and 5 deletions

View File

@ -17,6 +17,15 @@ The following sections assume you have previously published a version, but are s
5. Click on the `...` next to the current version and click on `Update`.
6. Upload the `.vsix` that was created in step 3.
#### Open VSX
Love is also published to [open-vsx.org](https://open-vsx.org/extension/Holllo/love), with the [ovsx CLI](https://yarn.pm/ovsx). To publish it, use `yarn package` to package it with VSCE and then publish the resulting `.vsix` file.
An access token is also required, defined as `OVSX_PAT`. For example, to publish version 0.1.4, the following commands would be used:
1. `yarn package` to create the `.vsix` package (if it doesn't already exist).
2. `OVSX_PAT=<token> yarn ovsx publish love-0.1.4.vsix`.
## Published to the website
The following integrations aren't yet/can't be published to platforms, so mostly no special procedure needs to happen. They are just built and served on the website directly.

View File

@ -1,4 +1,5 @@
{
"css-custom-properties": "0.1.0",
"firefox": "0.1.1",
"kitty": "0.1.1",
"sublime-text": "0.1.1",

View File

@ -146,6 +146,9 @@
File Formats
</h3>
<ul>
<li>
<a href="/love.css">CSS</a>
</li>
<li>
<a href="/love.json">JSON</a>
</li>

View File

@ -134,6 +134,8 @@ ${love[1].colors.grays
htmlclean(nunjucks.render('get.html', {love, markdown, title}))
);
}
await writeCustomProperties(love, versions['css-custom-properties']);
}
export function capitalize(word: string): string {
@ -145,6 +147,42 @@ export async function writeJSON(path: string, data: unknown): Promise<void> {
await fsp.writeFile(path, JSON.stringify(data, null, 2));
}
export async function writeCustomProperties(
love: LoveVariant[],
version: string
): Promise<void> {
let css = `/*
The Love Theme CSS Custom Properties
https://love.holllo.cc - version ${version}
MIT license
*/
.love {\n`;
for (const variant of love) {
const prefix = variant.name === 'dark' ? 'd' : 'l';
css += ` /* Love ${capitalize(variant.name)} */\n`;
css += ` --${prefix}f-1: ${variant.colors.foreground1};\n`;
css += ` --${prefix}f-2: ${variant.colors.foreground2};\n`;
css += ` --${prefix}b-1: ${variant.colors.background1};\n`;
css += ` --${prefix}b-2: ${variant.colors.background2};\n`;
for (const [index, color] of variant.colors.accents.entries()) {
css += ` --${prefix}a-${index + 1}: ${color};\n`;
}
for (const [index, color] of variant.colors.grays.entries()) {
css += ` --${prefix}g-${index + 1}: ${color};\n`;
}
css += '\n';
}
css = css.trim();
css += '\n}\n';
await fsp.writeFile(join(__dirname, '../../public/love.css'), css);
}
if (require.main === module) {
void main();
}

View File

@ -5,6 +5,7 @@ import semver from 'semver';
export interface Versions {
[index: string]: string;
'css-custom-properties': string;
firefox: string;
kitty: string;
'sublime-text': string;

View File

@ -11,7 +11,8 @@
},
"dependencies": {},
"devDependencies": {
"vsce": "^1.77.0"
"ovsx": "^0.1.0-next.b868597",
"vsce": "^1.81.1"
},
"displayName": "Love Theme",
"publisher": "Holllo",

View File

@ -92,6 +92,11 @@ commander@^2.8.1:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
commander@^6.1.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@ -188,6 +193,11 @@ fd-slicer@~1.1.0:
dependencies:
pend "~1.2.0"
follow-redirects@^1.13.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.1.tgz#5f69b813376cee4fd0474a3aba835df04ab763b7"
integrity sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
@ -322,6 +332,14 @@ osenv@^0.1.3:
os-homedir "^1.0.0"
os-tmpdir "^1.0.0"
ovsx@^0.1.0-next.b868597:
version "0.1.0-next.b868597"
resolved "https://registry.yarnpkg.com/ovsx/-/ovsx-0.1.0-next.b868597.tgz#c33de2b422272f35d235be9e87de94c5fb4a079e"
integrity sha512-JbuPleehLqo6TfAunzHQKm7caIcpOv2rLbTzvj4lHG6esaUZtkKqe0bVF0bnKEm+R20ANDnTWofLMJRK0xt6gQ==
dependencies:
follow-redirects "^1.13.0"
vsce "~1.79.5"
parse-semver@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/parse-semver/-/parse-semver-1.1.1.tgz#9a4afd6df063dc4826f93fba4a99cf223f666cb8"
@ -431,10 +449,36 @@ util-deprecate@^1.0.1:
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
vsce@^1.77.0:
version "1.77.0"
resolved "https://registry.yarnpkg.com/vsce/-/vsce-1.77.0.tgz#21364d3e63095b2f54e0f185445e8ff6ab614602"
integrity sha512-8vOTCI3jGmOm0JJFu/BMAbqxpaSuka4S3hV9E6K5aWBUsDM1SGFExkIxHblnsI8sls43xP61DHorYT+K0F+GFA==
vsce@^1.81.1:
version "1.81.1"
resolved "https://registry.yarnpkg.com/vsce/-/vsce-1.81.1.tgz#c741e9830cc750925e5f37b1e048341b98125262"
integrity sha512-1yWAYRxTx/PKSFZnuELe7GPyIo70H/XKJqf6wGikofUK3f3TCNGI6F9xkTQFvXKNe0AygUuxN7kITyPIQGMP+w==
dependencies:
azure-devops-node-api "^7.2.0"
chalk "^2.4.2"
cheerio "^1.0.0-rc.1"
commander "^6.1.0"
denodeify "^1.2.1"
glob "^7.0.6"
leven "^3.1.0"
lodash "^4.17.15"
markdown-it "^10.0.0"
mime "^1.3.4"
minimatch "^3.0.3"
osenv "^0.1.3"
parse-semver "^1.1.1"
read "^1.0.7"
semver "^5.1.0"
tmp "0.0.29"
typed-rest-client "1.2.0"
url-join "^1.1.0"
yauzl "^2.3.1"
yazl "^2.2.2"
vsce@~1.79.5:
version "1.79.5"
resolved "https://registry.yarnpkg.com/vsce/-/vsce-1.79.5.tgz#622d947aed97632d460e68ec774eac41f550102d"
integrity sha512-KZFOthGwxWFwoGqwrkzfTfyCZGuniTofnJ1a/dCzQ2HP93u1UuCKrTQyGT+SuGHu8sNqdBYNe0hb9GC3qCN7fg==
dependencies:
azure-devops-node-api "^7.2.0"
chalk "^2.4.2"