Skip to content

Commit 84d8607

Browse files
authored
Rename & autopublish (#21)
* Bump to 0.0.18, rename package to @pierre/theme * Update package script to temp rename package for vsix * Update names and URLs * more * Restore npm publish * temp back to 18 * back to 19 after initial publish
1 parent 60689bc commit 84d8607

6 files changed

Lines changed: 67 additions & 27 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ jobs:
3232
VSCE_PAT: ${{ secrets.VSCE_PAT }}
3333
run: npx @vscode/vsce publish --pat $VSCE_PAT
3434

35-
# - name: Setup npm authentication
36-
# run: |
37-
# echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
35+
- name: Setup npm authentication
36+
run: |
37+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
3838
39-
# - name: Publish to npm
40-
# run: npm publish
39+
- name: Publish to npm
40+
run: npm publish

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"recommendations": [
3-
"pierre-computer-co.pierre-vscode-theme"
3+
"pierrecomputer.pierre-theme"
44
]
55
}

README.md

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,38 @@
1-
# Pierre VS Code Theme
1+
# Pierre Theme
2+
3+
Light and dark themes for Visual Studio Code, Cursor, and Shiki. Built for [Diffs.com](https://diffs.com) by [The Pierre Computer Company](https://pierre.computer).
4+
5+
## Preview
26

37
![Pierre dark theme screenshot](https://github.com/user-attachments/assets/e8b2a6e0-995b-4515-997a-f805f4fbc5bf)
48
![Pierre light theme screenshot](https://github.com/user-attachments/assets/2ebb09d0-eb42-4c28-9617-35873d96ed8f)
59

610
## Install
711

8-
1. Go to the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=pierre-computer-co.pierre-vscode-theme).
9-
2. Click on the "Install" button.
10-
3. Then [select a theme](https://code.visualstudio.com/docs/getstarted/themes#_selecting-the-color-theme). Four themes are included:
11-
- `Pierre Light`
12-
- `Pierre Dark`
12+
### Visual Studio Code
13+
14+
From the menu in Visual Studio Code:
15+
16+
- View > Extensions (or hit Command+Shift+X or Control+Shift+X)
17+
- Search for `Pierre Theme`
18+
- Click install
19+
20+
You can also install or download from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=pierrecomputer.pierre-theme).
21+
22+
### Cursor
23+
24+
From the menu in Cursor:
25+
26+
- View > Extensions (or hit Command+Shift+X or Control+Shift+X)
27+
- Search for `Pierre Theme`
28+
- Click install
29+
30+
You can also install or download from the [Open VSX registry](https://open-vsx.org/extension/pierrecomputer/pierre-theme).
1331

1432
## Vibrant themes (Display P3)
1533

1634
> [!NOTE]
17-
> Vibrant themes do not work in VS Code at this time as it does not support color formats other than Hex or RGB. You can, however, use these with [Diffs](https://diffs.com) or any [Shiki](https://shiki.style) project to render code.
35+
> Vibrant themes do not work in VS Code or Cursor at this time as it does not support color formats other than Hex or RGB. You can, however, use these with [Diffs](https://diffs.com) or any [Shiki](https://shiki.style) project to render code.
1836
1937
The **Vibrant** theme variants use CSS's `color(display-p3 r g b)` format with enhanced saturation to fully utilize Display P3's wider color gamut. Display P3 can represent ~25% more colors than standard sRGB, and these themes are optimized to take full advantage of that on compatible displays.
2038

@@ -26,11 +44,11 @@ To override this (or any other) theme in your personal config file, please follo
2644

2745
## Contribute
2846

29-
1. Clone and open this [repo](https://github.com/pierrecomputer/pierre-vscode-theme) in VS Code
30-
2. Run `yarn` to install the dependencies.
47+
1. Clone and open this [repo](https://github.com/pierrecomputer/theme) in your editor
48+
2. Run `npm install` to install the dependencies.
3149
3. Press `F5` to open a new window with your extension loaded
3250
4. Open `Code > Preferences > Color Theme` [`⌘k ⌘t`] and pick the "Pierre…" theme you want to test.
33-
5. Make changes to the [`/src/theme.ts`](https://github.com/pierrecomputer/pierre-vscode-theme/blob/main/src/theme.ts) file.
51+
5. Make changes to the [`/src/theme.ts`](https://github.com/pierrecomputer/theme/blob/main/src/theme.ts) file.
3452
6. Run `npm run build` to update the theme. You can also run `npm run start` instead to automatically rebuild the theme while making changes and no reloading should be necessary.
3553
7. Run `npm test` to validate your changes (this runs automatically on PRs).
3654
8. Once you're happy, commit your changes and open a PR.
@@ -46,4 +64,4 @@ To override this (or any other) theme in your personal config file, please follo
4664

4765
## Credit
4866

49-
This theme was built on top of [GitHub's VS Code Theme](https://github.com/primer/github-vscode-theme). All credit to them for the technique and build tooling, which we've since iterated on for more specific language tokens.
67+
This theme was built on top of [GitHub's Visual Studio Code Theme](https://github.com/primer/github-vscode-theme). All credit to them for the technique and build tooling, which we've since iterated on for more specific language tokens.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "pierre-vscode-theme",
2+
"name": "@pierre/theme",
33
"displayName": "Pierre Theme",
44
"description": "Pierre theme for Shiki, VS Code, and more",
5-
"version": "0.0.17",
6-
"publisher": "pierre-computer-co",
5+
"version": "0.0.19",
6+
"publisher": "pierrecomputer",
77
"icon": "icon.png",
88
"galleryBanner": {
99
"color": "#141415",
@@ -12,10 +12,10 @@
1212
"license": "MIT",
1313
"repository": {
1414
"type": "git",
15-
"url": "https://github.com/pierrecomputer/pierre-vscode-theme"
15+
"url": "https://github.com/pierrecomputer/theme"
1616
},
1717
"bugs": {
18-
"url": "https://github.com/pierrecomputer/pierre-vscode-theme/issues"
18+
"url": "https://github.com/pierrecomputer/theme/issues"
1919
},
2020
"engines": {
2121
"vscode": "^1.0.0"
@@ -47,7 +47,7 @@
4747
"build": "ts-node src/build.ts",
4848
"test": "npm run build && ts-node src/test.ts",
4949
"start": "nodemon --watch src --ext ts --exec npm run build",
50-
"package": "vsce package"
50+
"package": "ts-node src/package-vsix.ts"
5151
},
5252
"devDependencies": {
5353
"nodemon": "^3.1.11",

src/package-vsix.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { readFileSync, writeFileSync } from "fs";
2+
import { execSync } from "child_process";
3+
import { join } from "path";
4+
5+
const pkgPath = join(__dirname, "..", "package.json");
6+
const original = readFileSync(pkgPath, "utf-8");
7+
const pkg = JSON.parse(original);
8+
9+
// Store original name and swap to unscoped version for VSIX
10+
const originalName = pkg.name;
11+
pkg.name = "pierre-theme";
12+
13+
console.log(`Temporarily renaming package: ${originalName}${pkg.name}\n`);
14+
15+
try {
16+
writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
17+
execSync("vsce package", { stdio: "inherit", cwd: join(__dirname, "..") });
18+
} finally {
19+
// Always restore original package.json
20+
writeFileSync(pkgPath, original);
21+
console.log(`\nRestored package name: ${originalName}`);
22+
}

0 commit comments

Comments
 (0)