feat: add npm package support #122
Closed
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 pull request introduces several key updates to improve the KiCanvas project, including enhancements to NPM package support, documentation, and code structure. The changes focus on enabling NPM distribution, refining TypeScript support, and streamlining the codebase for better maintainability and usability.
NPM Package Enhancements:
package.json
to include NPM-specific properties such asmain
,types
,exports
, andfiles
for proper packaging and distribution. AddedprepublishOnly
andpack
scripts to automate the build and packaging process. [1] [2].npmignore
to exclude unnecessary files like source code, test files, and build artifacts from the published NPM package.Documentation Updates:
docs/docs/npm-usage.md
guide for using KiCanvas as an NPM package, including installation instructions, usage examples, and TypeScript support details.docs/mkdocs.yml
to include the new "NPM Package Usage" documentation in the navigation menu.Codebase Improvements:
src/index.ts
to export all major modules, components, and utilities in a structured format for easier imports and better organization.src/kicad/parser.ts
to export theKind
enum for external use, improving modularity.Web Component Refinements:
CustomElement
class insrc/base/web-components/custom-element.ts
by makingupdateComplete
anddisposables
public and removing theprotected
modifier fromqueryAssignedElements
. [1] [2]Minor Configuration Changes:
.vscode/settings.json
to remove the exclusion of thebuild/
directory, simplifying the development environment.