baldrick-codemod-ts

Code modification for typescript projects

Usage no npm install needed!

<script type="module">
  import baldrickCodemodTs from 'https://cdn.skypack.dev/baldrick-codemod-ts';
</script>

README

Baldrick-codemod-ts

npm Build status npm bundle size

npm type definitions node-current NPM

Code modification and generation for typescript projects

The main motivation is to boost the development effort by providing ready made snippets:

  • Snippets are written in Typescript, and have been unit tested.

  • Encourage a zero-dependency approach when the code needed does not justify importing a whole library.

  • Improve the consistency of the code.

You can run the generator in interactive mode by just typing:

baldrick-codemod-ts

It will ask for the snippet name, some parameters specific to the snippet and a target file.

Documentation and links

Installation

This package is ESM only.

yarn global add baldrick-codemod-ts
baldrick-codemod-ts --help

Or alternatively run it:

npx baldrick-codemod-ts --help

If you want to tun the latest version from github. Mostly useful for dev:

git clone git@github.com:flarebyte/baldrick-codemod-ts.git
yarn global add `pwd`