Skip to content

Commit

Permalink
chore(release): 2.4.4 > 2.4.5
Browse files Browse the repository at this point in the history
- enhance `README.md`
  • Loading branch information
imjuni committed Jun 2, 2024
1 parent 874a7b1 commit d55a909
Show file tree
Hide file tree
Showing 3 changed files with 3,843 additions and 3,066 deletions.
33 changes: 23 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ In addition, `ctix` will auto-generate `barrel` files so that a single `index.d.
- [Important](#important)
- [Generation Style](#generation-style)
- [More information](#more-information)
- [Examples](#examples)
- [What is difference Re-Map paths?](#what-is-difference-re-map-paths)
- [Option](#option)
- [License](#license)
Expand Down Expand Up @@ -122,9 +123,7 @@ There are two ways to do this. The first is to create a `.ctirc` file and set th
{
"options": {
"mode": "bundle",
"exclude": [
"**/*.storybook.tsx"
]
"exclude": ["**/*.storybook.tsx"]
}
}
```
Expand All @@ -137,19 +136,19 @@ If you want to use a `.ctirc` file, I recommend creating one with the `npx ctix
// @ctix-exclude

const Button = () => {
return <button>Sample</button>
}
return <button>Sample</button>;
};
```

### Programming interface

When using task runners like Gulp and Just, as well as bundlers like webpack and rollup, you need a programming interface to add ctix.

| function | option | descryption |
| - | - | - |
| building | [TCommandBuildOptions](src/configs/interfaces/TCommandBuildOptions.ts) | Execute the `build` command |
| initializing | [TCommandInitOptions](src/configs/interfaces/TCommandInitOptions.ts) | Execute the `init` command |
| removing | [TCommandRemoveOptions](src/configs/interfaces/TCommandRemoveOptions.ts), [TCommandBuildOptions](src/configs/interfaces/TCommandBuildOptions.ts) | Execute the `remove` command |
| function | option | descryption |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------- |
| building | [TCommandBuildOptions](src/configs/interfaces/TCommandBuildOptions.ts) | Execute the `build` command |
| initializing | [TCommandInitOptions](src/configs/interfaces/TCommandInitOptions.ts) | Execute the `init` command |
| removing | [TCommandRemoveOptions](src/configs/interfaces/TCommandRemoveOptions.ts), [TCommandBuildOptions](src/configs/interfaces/TCommandBuildOptions.ts) | Execute the `remove` command |

Check out the [example code](doc/PROGRAMMING_INTERFACE.md).

Expand All @@ -176,6 +175,20 @@ You can change the `generation style` of the entire project by setting the `gene
- [Applying a Vue.js components to your source code](doc/IN_DEPTH_VUE.md)
- [Applying a include, exclude configuration to `.ctirc`](doc/IN_DEPTH_EXCLUDE.md)

## Examples

In the examples directory, you can find cases where `ctix` has been applied to various projects. For detailed explanations, please refer to the [Examples README.md](examples/README.md) file.

| Directory Name | Purpose |
| -------------- | ------------------------------------------------------------------------------ |
| type03 | When there are duplicate names in the entire project |
| type05 | For React projects |
| type06 | When using TypeScript enums |
| type07 | When using destructive operations on variables for named exports |
| type09 | When using TTF fonts by declaring them as modules and using them in TypeScript |
| type10 | For Vue.js projects |
| type11 | When using Component Props in React projects |

## What is difference Re-Map paths?

It is not recommended to use `index.ts` file to re-map paths or shorten the paths. If you want to shorten the paths use [Re-Map paths](https://www.typescriptlang.org/tsconfig#paths) feature in TypeScript compilerOptions. `ctix` is recommended for webpack and rollup.js, typedoc entrypoint and TypeScript declaration file bundling.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ctix",
"version": "2.4.4",
"version": "2.4.5",
"description": "Automatic create index.ts file",
"scripts": {
"clean": "rimraf ./dist",
Expand Down
Loading

0 comments on commit d55a909

Please sign in to comment.