Skip to content

Commit 6d978ba

Browse files
committed
Release 0.0.87
1 parent cf3d56e commit 6d978ba

6 files changed

Lines changed: 24 additions & 7 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ spooned/
9292

9393
# Build and distribution
9494
dist/
95+
client/media/codicons/
9596
coverage/
9697
.env
9798
.env.local

client/.vscodeignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ package-lock.json
1515
# Build artifacts
1616
out/**
1717
node_modules/**
18-
node_modules/@vscode/codicons/**
19-
!node_modules/@vscode/codicons/dist/codicon.css
20-
!node_modules/@vscode/codicons/dist/codicon.ttf
2118
*.vsix
2219
dist/**/*.map
2320
media/**/*.map

client/package-lock.json

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

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "liquid-java",
33
"displayName": "LiquidJava",
44
"description": "Extending Java with Liquid Types",
5-
"version": "0.0.86",
5+
"version": "0.0.87",
66
"publisher": "AlcidesFonseca",
77
"repository": {
88
"type": "git",

client/src/webview/html.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function getHtml(webview: vscode.Webview, extensionUri: vscode.Uri): stri
1313
const nonce = Date.now().toString();
1414
const cspSource = webview.cspSource;
1515
const scriptUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, "media", "webview.js"));
16-
const codiconsUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, "node_modules", "@vscode", "codicons", "dist", "codicon.css"));
16+
const codiconsUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, "media", "codicons", "codicon.css"));
1717
return /*html*/ `
1818
<!DOCTYPE html>
1919
<html lang="en">

client/webpack.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@ const createTsRule = () => ({
1616
]
1717
});
1818

19+
const copyCodiconsAssets = () => {
20+
const codiconsDist = path.resolve(__dirname, 'node_modules', '@vscode', 'codicons', 'dist');
21+
const codiconsDest = path.resolve(__dirname, 'media', 'codicons');
22+
const assets = ['codicon.css', 'codicon.ttf'];
23+
24+
if (!fs.existsSync(codiconsDest)) {
25+
fs.mkdirSync(codiconsDest, { recursive: true });
26+
}
27+
28+
for (const asset of assets) {
29+
fs.copyFileSync(path.resolve(codiconsDist, asset), path.resolve(codiconsDest, asset));
30+
}
31+
};
32+
1933
/** @type {import('webpack').Configuration} */
2034
const extensionConfig = {
2135
target: 'node',
@@ -45,6 +59,11 @@ const extensionConfig = {
4559
rules: [createTsRule()]
4660
},
4761
plugins: [
62+
{
63+
apply: (compiler) => {
64+
compiler.hooks.afterEmit.tap('CopyCodiconsAssets', copyCodiconsAssets);
65+
}
66+
},
4867
// Copy server JAR to dist folder after build
4968
{
5069
apply: (compiler) => {

0 commit comments

Comments
 (0)