Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daanv2/typescript-action-create-indexes
The github action that creates include code files for your project, the changes still need to be submitted afterwards.
https://github.com/daanv2/typescript-action-create-indexes
actions code code-generation github-action github-actions include typescript workflows
Last synced: 1 day ago
JSON representation
The github action that creates include code files for your project, the changes still need to be submitted afterwards.
- Host: GitHub
- URL: https://github.com/daanv2/typescript-action-create-indexes
- Owner: DaanV2
- License: mit
- Created: 2021-03-13T16:38:37.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-04T12:43:31.000Z (2 months ago)
- Last Synced: 2024-11-04T13:38:17.450Z (2 months ago)
- Topics: actions, code, code-generation, github-action, github-actions, include, typescript, workflows
- Language: TypeScript
- Homepage:
- Size: 363 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Typescript-Action-Create-Indexes
[![tagged-release](https://github.com/DaanV2/Typescript-Action-Create-Indexes/actions/workflows/tagged-release.yml/badge.svg)](https://github.com/DaanV2/Typescript-Action-Create-Indexes/actions/workflows/tagged-release.yml)
[![unit-test](https://github.com/DaanV2/Typescript-Action-Create-Indexes/actions/workflows/npm-test.yml/badge.svg)](https://github.com/DaanV2/Typescript-Action-Create-Indexes/actions/workflows/npm-test.yml)- [Typescript-Action-Create-Indexes](#typescript-action-create-indexes)
- [Inputs](#inputs)
- [Examples](#examples)
- [Example usage](#example-usage)The github action that creates indexes code files for your project, the changes still need to be submitted afterwards.
Its creates a list of each typescript file in the folder and for each sub folder that has an `index.ts`.
## Inputs
**folder**:
The folder path to start at, use `${{github.workspace}}/source`**excludes**:
The multi string glob patterns that can exclude files from being listed**export_sub_index**:
defaults to true
Whenever or not a index.ts file should be specially exported:
such as:```ts
export * as Foo from 'Foo/index';
```## Examples
![example](https://raw.githubusercontent.com/DaanV2/Typescript-Action-Create-Indexes/main/assets/example.PNG)
## Example usage
```yml
# This is a basic workflow to help you get started with Actionsname: Creating typescript indexes
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
pull_request:
branches: [ main ]# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/[email protected]# Runs a single command using the runners shell
- uses: DaanV2/Typescript-Action-Create-Indexes@latest
with:
folder: ${{github.workspace}}/server/src
export_sub_index: false
excludes: "*.test.ts"- uses: DaanV2/Typescript-Action-Create-Indexes@latest
with:
folder: ${{github.workspace}}/client/src
excludes: |
"*.test.ts"
"index.ts"- name: Commit changes
continue-on-error: true
run: |
cd ${{github.workspace}}
git config --global user.email "[email protected]"
git config --global user.name "Bot"
git add .
git commit -m "auto: Generated typescript indexes"
git push
```