-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing to the TypeScript Toolkit
The TypeScript Toolkit Project welcomes all contributors! However, please note that all contributors are expected to follow all of the documented processes and procedures for contributing to the codebase.
- General Information
- Coding Style
- Adding a New Namespace
- Adding a New Tool
- Updating Existing Tools
- Contributing to the Project Configuration, Architecture, and Direction
-
Unless you have been added as a contributor to the project repository, you will need to first create a fork of the repository before you can start making changes.
-
When making Pull Requests, it is recommended to allow edits from maintainers to speed up the process of getting your changes merged into the upstream codebase.
In general, all contributions to the codebase should make as much of an attempt to match the existing coding style as possible.
Suggestions to alter the Project Coding Style should be made to the Discussions Forum on the Project GitHub. Changes to the codebase that only attempt to change the coding style or appearance will be rejected.
Warning
This section is incomplete:
Add or link to a comprehensive description of the Project Coding Style here.
To add a new Namespace used to group several related tools together to the TypeScript Toolkit:
-
Determine the name of the new namespace. Namespace names can only contain alpha-numeric characters and should always begin with a lowercase letter.
-
Checkout the Target Release Branch (e.g.,
releases/1.0.0
).The Target Release Branch should always be a Minor Version increment of the Current Release Version where possible.
-
Create and checkout a new branch with the name
feats/TARGET_RELEASE_BRANCH/NAMESPACE/namespace
where:-
TARGET_RELEASE_BRANCH
is the Target Release Branch from Step 1 -
NAMESPACE
is the name of the new namespace
-
-
Copy the New Namespace Template directory to the
/toolkit
directory and rename it to the name of the new namespace. -
Update each of the files in the template, including:
-
index.ts
-
README.md
Ensure that you replace all of instances of
NAMESPACE
with the name of the namespace and all instances ofTARGET_VERSION
with the Targeted Release Version identified in Step 2 (e.g.,1.0.0
). -
-
Update the Toolkit Index File (
index.ts
) and add the following line to the file:export * as NAMESPACE from "./NAMESPACE/index.js";
replacing
NAMESPACE
with the name of the new namespace. -
Update the
exports
section ofpackage.json
and add an entry for the new namespace:"exports": { ".": "./dist/index.js", "./NAMESPACE": "./dist/NAMESPACE/index.js" }
replacing
NAMESPACE
with the name of the new namespace. -
Commit and push all changes to the repository.
-
Open a Pull Request to merge the branch back into the Target Release Branch from Step 1 (e.g.,
releases/1.0.0
). -
Once approved and merged, update the API Documentation Wiki.
- Add a new page to the wiki for the new namespace.
- Update the Home Page and add a link to the new namespace page in the API Namespaces section.
- Update the Sidebar and add a link to the new namespace page.
To add a new Namespace used to group several related tools together to the TypeScript Toolkit:
-
Determine the name of the new tool. Tool names can only contain alpha-numeric characters and should always begin with a lowercase letter.
-
Checkout the Target Release Branch (e.g.,
releases/1.0.0
).The Target Release Branch should always be a Minor Version increment of the Current Release Version where possible.
-
Create and checkout a new branch with the name
feats/TARGET_RELEASE_BRANCH/NAMESPACE/TOOL_NAME
where:-
TARGET_RELEASE_BRANCH
is the Target Release Branch from Step 1 -
NAMESPACE
is the name of the target namespace -
TOOL_NAME
is the name of the new tool.
-
-
Copy the New Tool Template directory to the Parent Namespace within the
/toolkit
directory and rename it to the name of the new tool. -
Update each of the files in the template, including:
-
index.ts
-
README.md
-
module/index.ts
- Add any additional TypeScript modules.
-
ts/index.ts
- Add any additional TypeScript code snippet variants.
-
js/index.js
- Add any additional JavaScript code snippet variants.
Ensure that you replace all the instances of any of the following variables with the respective values:
-
NAMESPACE
: The name of the namespace -
TARGET_VERSION
The Targeted Release Version identified in Step 2 (e.g.,1.0.0
) -
TOOL_NAME
: The name of the new tool -
AUTHOR_NAME
: The name of the author(s) of the code. -
AUTHOR_LINK
: The link to the author(s) GitHub profile. -
SOURCE_NAME
: The name of the original source of the code (e.g., Stack Overflow). -
SOURCE_URL
: The link to the original source of the code.
-
-
Record all of the Inner-Package Dependencies and Dependents.
- Record all Dependencies and Dependents in the tool's
README.md
file. - Update the
README.md
file of all Dependencies and Dependents accordingly.
- Record all Dependencies and Dependents in the tool's
-
Update the Parent Namespace Index File (
/toolkit/NAMESPACE/index.ts
) and add the following line to the file:export * from "./TOOL_NAME/index.js";
replacing
TOOL_NAME
with the name of the new tool. -
Update the Parent Namespace
README.md
and add a link to the tool directory:## Tool List - [`TOOL_NAME`](TOOL_NAME): A short description for TOOL_NAME.
Additionally, the examples can be updated to include code snippets from the new tool, if desired and appropriate.
-
Update the
exports
section ofpackage.json
and add an entry for the new tool beneath the entry for the Parent Namespace:"exports": { ".": "./dist/index.js", "./NAMESPACE": "./dist/NAMESPACE/index.js", "./NAMESPACE/TOOL_NAME": "./dist/NAMESPACE/TOOL_NAME/index.js" }
replacing
NAMESPACE
with the name of the target namespace andTOOL_NAME
with the name of the new tool. -
Commit and push all changes to the repository.
-
Open a Pull Request to merge the branch back into the Target Release Branch from Step 1 (e.g.,
releases/1.0.0
). -
Once approved and merged, update the API Documentation Wiki.
- Update the page of the wiki containing the API Documentation for the Parent Namespace.
- Update the Sidebar and add a link to the new tool on the parent namespace page.
Warning
This section has not been written yet.
Warning
This section has not been written yet.