Remove unused code: exportTemplates script reference - #431
Open
timowestnosto with Copilot wants to merge 2 commits into
Open
Remove unused code: exportTemplates script reference#431timowestnosto with Copilot wants to merge 2 commits into
timowestnosto with Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
[WIP] drop all non exported code
Remove unused code: exportTemplates script reference
Aug 31, 2025
timowestnosto
marked this pull request as ready for review
August 31, 2025 18:21
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes an unused npm script reference from package.json as part of a broader cleanup effort to eliminate dead code from the codebase. The change removes the "exportTemplates" script which references a non-existent file.
Key Changes
- Removed unused npm script entry for "exportTemplates" that pointed to a missing script file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the request to "drop all non exported code" by conducting a comprehensive analysis of the codebase to identify and remove unused code.
Analysis Methodology
I performed a thorough dependency graph analysis starting from all public export entry points:
src/index.ts(main library)src/react.ts(React integration)src/liquid.ts(Liquid templates)src/mustache.ts(Mustache templates)src/handlebars.ts(Handlebars templates)The analysis traced all imports, exports, and re-exports to map the complete dependency tree.
Findings
Excellent Code Architecture: The analysis revealed that this codebase has virtually no dead code. All 25 TypeScript source files are reachable from the public exports and serve specific purposes in the API.
Key Verified Dependencies:
src/utils/are used by core library functionalitysrc/shims.d.tsprovides essential TypeScript ambient declarations for template files and Google Analytics APIsChanges Made
Removed unused npm script: The only unused code found was a reference to
"exportTemplates": "node scripts/exportTemplates.js"in package.json. This script file doesn't exist and is not referenced anywhere else in the codebase.Verification
npm run build)npm run test)The codebase demonstrates excellent dependency management with minimal technical debt.
Fixes #430.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.