Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
npm i ctix --save-dev
# or
npx ctix create ./tsconfig.json # execute create mode
0.4.x ctix generate default export variable, function, class process to lowercase start. But 0.5.x ctix can set excludePath. If set excludePath optoin to true, ctix follow filename first charactor.
ex>
Option excludePath set true and useUpperFirst true: TribeClass -> tribeClass
Option excludePath set false or useUpperFirst false: TribeClass -> TribeClass
When you develop package for another application using TypeScript, that is compiled using by webpack, babel. webpack very popular tool for bundling. At this time you need bundle entrypoint called by index.ts.
Manage index.ts(export file), not so convenience. If you add file or class, function you rewrite export file over and over again. ctix
help this work. ctix
read .npmignore, .ctiignore file after ignore there also you can use exclude configuration in tsconfig.json. See below example,
src/
app.ts
component/
Nav.ts
Button.ts
ctix create sub-command create index.ts file below.
src/
app.ts
> index.ts
// created from 'ctix'
export * from './component';
export * from './app';
component/
Nav.ts
Button.ts
> index.ts
// created from 'ctix'
export * from './Nav';
export * from './Button';
ctix single mode generate single file. This file suitable for webpack entrypoint.
src/
app.ts
component/
Nav.ts
Button.ts
> entrypoint.ts
// created from 'ctix'
export * from './src/app.ts'
export * from './src/component/Nav.ts'
export * from './src/component/Button.ts'
export { default as myDefaultIndexTest } from './my_default_index.test'
Most inconvenience from import statement that solve module resolution. But module resolution don't helpful for entrypoint create for bundling. ctix helpful this work.
ctix create ./tsconfig.json
or ctix create -p ./tsconfig.json
ctix single ./tsconfig.json
or ctix single -p ./tsconfig.json
ctix clean ./tsconfig.json
or ctix clean -p ./tsconfig.json
ctix init ./tsconfig.json
or ctix init -p ./tsconfig.json
Name | Short | Default | SubCommand | Description |
---|---|---|---|---|
--project | -p | required | All | tsconfig.json path: you must pass path with filename, like this "./tsconfig.json" |
--exportFilename | -f | index.ts | create, single, clean | Export filename, if you not pass this field that use "index.ts" or "index.d.ts" |
--verbose | -v | false | All | Display more detailed log |
--addNewline | -n | true | create, single | add newline on EOF |
--useSemicolon | -s | true | create, single | add semicolon on line ending at every export statement |
--useTimestamp | -m | false | create, single | timestamp write on ctix comment right-side, only works in useComment option set true |
--useComment | -c | true | create, single | ctix comment add on first line of creted export file(default index.ts) file, that remark created from ctix |
--quote | -q | ' | create, single | change quote character at export syntax |
--output | -o | N/A | single | output directory |
--useBackupFile | -b | true | create, single | created backup file if exists export file(default index.ts) file already in directory |
--useRootDir | -r | false | single | output file under rootDir in tsconfig.json. |
--excludePath | -x | false | single | Default export name create without directory(dirname). |
--useUpperFirst | N/A | true | create, single | If your default export variable, class, function name keep first capital character. |
useRootDir option activate using rootDir option in tsconfig.json. This option run below flowchart.
ctix 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.
You can use cli for .ctirc
file creation.
# create current directory
> cti init
# create multiple directory
> cti init ./example/type03 ./example/type02
FAQs
Automatic create index.ts file
The npm package ctix receives a total of 3,616 weekly downloads. As such, ctix popularity was classified as popular.
We found that ctix demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.