Skip to content

Get codicons from node module#289705

Merged
alexr00 merged 11 commits intomainfrom
alexr00/gothic-vulture
Jan 26, 2026
Merged

Get codicons from node module#289705
alexr00 merged 11 commits intomainfrom
alexr00/gothic-vulture

Conversation

@alexr00
Copy link
Copy Markdown
Member

@alexr00 alexr00 commented Jan 22, 2026

Fixes #283823

Copilot AI review requested due to automatic review settings January 22, 2026 18:08
@alexr00 alexr00 self-assigned this Jan 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR transitions the codicon.ttf font file from being stored directly in the repository to being sourced from the @vscode/codicons npm package. The file is now automatically copied during the postinstall phase and when node_modules are restored from cache in CI/CD pipelines.

Changes:

  • Added @vscode/codicons package dependency to both root and remote/web package.json
  • Created a new copy-codicons.ts script that copies the font file from node_modules to the source tree
  • Updated all CI/CD workflows to run the copy script when node_modules are restored from cache
  • Added the generated codicon.ttf file to .gitignore and included a README explaining its origin

Reviewed changes

Copilot reviewed 17 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Added @vscode/codicons dependency and copy-codicons npm script
package-lock.json Lock file entry for new dependency
remote/web/package.json Added @vscode/codicons dependency for web remote
remote/web/package-lock.json Lock file entry for remote web package
build/npm/copy-codicons.ts New script to copy codicon.ttf from npm package with error handling
build/npm/postinstall.ts Calls copy-codicons script after npm install
build/gulpfile.editor.ts Ensures codicon.ttf is copied during editor extraction task
.gitignore Excludes generated codicon.ttf from version control
src/vs/base/browser/ui/codicons/codicon/README.md Documents where codicon.ttf comes from
build/azure-pipelines/win32/steps/product-build-win32-compile.yml Runs copy-codicons when using cached node_modules
build/azure-pipelines/web/product-build-web.yml Runs copy-codicons when using cached node_modules
build/azure-pipelines/product-compile.yml Runs copy-codicons when using cached node_modules
build/azure-pipelines/linux/steps/product-build-linux-compile.yml Runs copy-codicons when using cached node_modules
build/azure-pipelines/darwin/steps/product-build-darwin-compile.yml Runs copy-codicons when using cached node_modules
build/azure-pipelines/alpine/product-build-alpine.yml Runs copy-codicons when using cached node_modules
.github/workflows/pr-win32-test.yml Runs copy-codicons when using cached node_modules
.github/workflows/pr-node-modules.yml Runs copy-codicons when using cached node_modules
.github/workflows/pr-linux-test.yml Runs copy-codicons when using cached node_modules
.github/workflows/pr-darwin-test.yml Runs copy-codicons when using cached node_modules
.github/workflows/monaco-editor.yml Runs copy-codicons when using cached node_modules
Files not reviewed (1)
  • remote/web/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

build/gulpfile.editor.ts:45

  • The codicon.ttf copying logic is duplicated between this file and build/npm/copy-codicons.ts. Consider extracting this logic into a shared utility function that both files can use. This would ensure consistent behavior, reduce maintenance burden, and ensure both code paths have the same error handling.
	// Ensure codicon.ttf is copied from node_modules (needed when node_modules is cached and postinstall doesn't run)
	const codiconSource = path.join(root, 'node_modules', '@vscode', 'codicons', 'dist', 'codicon.ttf');
	const codiconDest = path.join(root, 'src', 'vs', 'base', 'browser', 'ui', 'codicons', 'codicon', 'codicon.ttf');
	if (fs.existsSync(codiconSource)) {
		fs.mkdirSync(path.dirname(codiconDest), { recursive: true });
		fs.copyFileSync(codiconSource, codiconDest);
	}

Comment thread build/gulpfile.editor.ts
@alexr00 alexr00 requested review from Copilot and lszomoru January 23, 2026 10:19
@alexr00 alexr00 marked this pull request as ready for review January 23, 2026 10:19
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 23 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • remote/web/package-lock.json: Language not supported

@alexr00 alexr00 marked this pull request as draft January 23, 2026 13:23
@alexr00 alexr00 marked this pull request as ready for review January 23, 2026 13:44
joaomoreno
joaomoreno previously approved these changes Jan 23, 2026
@alexr00 alexr00 enabled auto-merge (squash) January 23, 2026 14:23
@alexr00 alexr00 merged commit 10abebd into main Jan 26, 2026
22 checks passed
@alexr00 alexr00 deleted the alexr00/gothic-vulture branch January 26, 2026 11:13
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consume codicons from npm

3 participants