Gathering detailed insights and metrics for create-ts-index
Gathering detailed insights and metrics for create-ts-index
Gathering detailed insights and metrics for create-ts-index
Gathering detailed insights and metrics for create-ts-index
npm install create-ts-index
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
112 Stars
75 Commits
19 Forks
4 Watching
8 Branches
6 Contributors
Updated on 14 Nov 2024
Minified
Minified + Gzipped
TypeScript (94.68%)
JavaScript (5.32%)
Cumulative downloads
Total Downloads
Last day
11.7%
6,491
Compared to previous day
Last week
-1.1%
37,280
Compared to previous week
Last month
99.8%
134,001
Compared to previous month
Last year
100%
763,771
Compared to previous year
29
1npm install create-ts-index --save-dev
ctix next generation export generation tool. ctix use TypeScript compiler API. So Many problem solve in create-ts-index. For example, separate project(using by tsconfig.json) and support default function, auto detect file that have export statement, etc. I need more help for improvement at ctix.
index.ts file create for exportation. If don't have business logic in index.ts that use to only exportation, create-ts-index help easy importing. Or if you have library project need this export process(for example, blueprint.js etc ...). cti(create-ts-index) create export index.ts file.
For example, sample directory below.
src/
app.ts
component/
Nav.ts
Button.ts
create-ts-index create sub-command create index.ts file below.
src/
app.ts
> index.ts
// created from 'create-ts-index'
export * from './component';
export * from './app';
component/
Nav.ts
Button.ts
> index.ts
// created from 'create-ts-index'
export * from './Nav';
export * from './Button';
create-ts-index entrypoint sub-command create index.ts file below.
src/
app.ts
component/
Nav.ts
Button.ts
> entrypoint.ts
// created from 'create-ts-index'
export * from './src/app.ts'
export * from './src/component/Nav.ts'
export * from './src/component/Button.ts'
fileFirst: boolean
export list create filefirst. default falseaddNewline: boolean
decide add newline file ending. default trueuseSemicolon: boolean
decide use semicolon line ending. default trueuseTimestamp: boolean
decide use timestamp(YYYY-MM-DD HH:mm) top line comment. default falseincludeCWD: boolean
decide include cwd directory. default trueexcludes: string[]
pass exclude directory. default exclude directory is ['@types', 'typings', '__test__', '__tests__']
fileExcludePatterns: string[]
pass exclude filename pattern. default exclude patterns is []
targetExts: string[]
pass include extname. default extname is ['ts', 'tsx']
. extname pass without dot character.globOptions: glob.IOptions
pass include glob options. node-glob option use it.quote
decide quote character. Single quote character use to default.verbose
verbose log message displaywithoutComment
remove create-ts-index comment that top of line in index.tswithoutBackupFile
Don't create backup file if already exists target fileoutput
index.ts or entrypoint.ts filename changeincludeDeclarationFiles
pass declaration files (*.d.ts). default is false-f --filefirst
export list create file first, no option false, option true-n --addnewline
decide add newline file ending. no option true, option false-s --usesemicolon
decide use semicolon line ending. no option true, option false-t --usetimestamp
decide use timestamp(YYYY-MM-DD HH:mm) top line comment. no option false, option true-c --includecwd
decide include cwd directory. no option true, option true-e --excludes [comma separated exclude directories]
pass exclude directory. default exclude directory is ['@types', 'typings', '__test__', '__tests__']
-i --fileexcludes [comma separated extname]
pass exclude filename pattern. default exclude patterns is []
-x --targetexts [comma separated extname]
pass include extname. default extname is ['ts', 'tsx']
. extname pass without dot character.-q --quote
decide quote character. default quote character single quote-v --verbose
display verbose log message. no option false, option true-w --withoutcomment
remove create-ts-index comment that top of line in index.ts-b --withoutbackup
Don't create backup file if already exists target file-o --output
index.ts or entrypoint.ts filename change-d --includeDeclarationFiles
pass declaration files (*.d.ts). default is false1const tsiw = new TypeScritIndexWriter(); 2const option = TypeScritIndexWriter.getDefaultOption('./src'); 3 4(async () => { 5 await tsiw.create(option); 6 7 // or 8 9 await tsiw.createEntrypoint(option); 10})();
1(async () => { 2 const option = CreateTsIndexOption.getOption({}); 3 const createCommand = new CreateCommandModule(); 4 await createCommand.do(process.cwd(), option); 5});
cli use git-style sub-command
.ctirc
file1# basic usage 2cti create ./src # or cti create ./src 3## or 4cti entrypoint ./src # or cti create ./src 5 6# without newline 7 8## create sub-command, create sub-command is a default command 9cti -n ./src 10cti create -n ./src 11 12## entrypoint sub-command 13cti entrypoint -n ./src 14 15# custom exclude directories 16cti create -n -e @types,typings,__test__,__tests__,pages ./src 17## or 18cti entrypoint -n -e @types,typings,__test__,__tests__,pages ./src 19 20# clean index.ts 21cti clean ./src # or cti clean ./src 22 23# loop through every sub-directory in current path (thanks Mohsen) 24for f in *; do cti create ./$f; done 25 26# Pass variadic directories 27cti create ./src/server ./src/client ./src/module
create-ts-index cli support .ctirc
configuration file. Available name is only .ctirc
. .ctirc
configuration file can applied by each target directories and script working directory. Every configuration overwrited same feature. Also cti cli arguments forced applied. And .ctirc
file can write json5 format. json5 spec. can comment and more feature.
See below search, apply order.
1# execute on /Users/cti/github/create-ts-index 2sh> cti create ./example/type01 3 4# search configuration file on "/Users/cti/github/create-ts-index" 5# search configuration file on "/Users/cti/github/create-ts-index/example/type01" 6# apply configuration by "/Users/cti/github/create-ts-index" 7# apply configuration by "/Users/cti/github/create-ts-index/example/type01" 8# every configuration is overwrited
You can use cli for .ctirc
file creation.
1# create current directory 2> cti init 3 4# create multiple directory 5> cti init ./example/type03 ./example/type02
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 5/29 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
15 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More@types/serve-index
TypeScript definitions for serve-index
@redis/search
This package provides support for the [RediSearch](https://redisearch.io) module, which adds indexing and querying support for data stored in Redis Hashes or as JSON documents with the RedisJSON module. It extends the [Node Redis client](https://github.c
rope-sequence
Rope-based persistent sequence type
cyclist
Cyclist is an efficient cyclic list implemention.