Skip to content

fix(cli): fix jQuery theme assets copy#1723

Merged
kdinev merged 3 commits into
masterfrom
ganastasov/fix-jquery-theme-assets-copy
Jun 5, 2026
Merged

fix(cli): fix jQuery theme assets copy#1723
kdinev merged 3 commits into
masterfrom
ganastasov/fix-jquery-theme-assets-copy

Conversation

@georgianastasov
Copy link
Copy Markdown
Contributor

Description

This PR fixes an issue in the CLI build process for jQuery projects using LESS/SASS themes.

Previously, the build command copied theme directory entries using fs.copyFileSync. This failed when one of the entries was a directory, such as the images folder in the infragistics.less theme.

The fix uses recursive copying when the theme source is a directory, allowing all theme assets, including nested folders, to be copied correctly.

Related Issue

Closes #1718

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring / code cleanup
  • Build / CI configuration change

Affected Packages

  • igniteui-cli (packages/cli)
  • @igniteui/cli-core (packages/core)
  • @igniteui/angular-templates (packages/igx-templates)
  • @igniteui/angular-schematics (packages/ng-schematics)
  • @igniteui/mcp-server (packages/igniteui-mcp)

Checklist

  • I have tested my changes locally (npm run test)
  • I have built the project successfully (npm run build)
  • I have run the linter (npm run lint)
  • I have added/updated tests as needed
  • My changes do not introduce new warnings or errors

Additional Context

The issue was reproduced with a jQuery project using the infragistics.less theme.

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 3, 2026

Coverage Status

coverage: 88.077% (+0.3%) from 87.809% — ganastasov/fix-jquery-theme-assets-copy into master

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

Fixes the ig build flow for jQuery projects using .less / .sass themes by correctly copying theme assets when the theme contains directories (e.g., images/), resolving the failure described in #1718.

Changes:

  • Update the build command to copy theme directories recursively (instead of attempting copyFileSync on directory entries).
  • Normalize theme source path construction using path.join(...) segments.
  • Add a unit test that validates nested theme assets (like images/foo.png) are copied into the project themes/ directory.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
spec/unit/build-spec.ts Adds a regression unit test ensuring theme folders (e.g., images/) are copied recursively for jQuery LESS themes.
packages/cli/lib/commands/build.ts Fixes theme asset copying by using recursive directory copy when the theme source is a directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kdinev kdinev merged commit 48fe647 into master Jun 5, 2026
4 checks passed
@kdinev kdinev deleted the ganastasov/fix-jquery-theme-assets-copy branch June 5, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jQuery LESS theme build fails when copying theme images directory

5 participants