ts-migration-helper
v4.0.0
Published
Migrate simple JS projects to Typescript
Downloads
14
Readme
ts-migration-helper
Migrate simple Cheminfo JS projects to TS.
- Fork the js project to a Codespace (rather than locally, where you could ruin your system.)
- Install and run the helper (details below.)
Installation
From the Codespace terminal, run:
npm i -g ts-migration-helper
Execution
npx migration-questions
npx migration-jsrename
Contribute
The code is built with the following idea:
- Each function is a task: Install Software, Remove Software, Update Files etc.
- Tasks are executed in order.
ToDos
- [ ] add script to switch to
vitest
and clean uppackage.json
. - [ ] script to replace
@jest/globals
withvitest
or add the line (as a default at least.)import { describe, it, expect } from 'vitest';
Test
Simplest is to use npm link
that creates a symlink globally, so that now the scripts in bin
can be executed with npx
.
For example you'd do (in ts-migration-helper
folder):
npm link
# now switch to any folder of a project that needs migration (preferably a test project.)
# then you could run
npx migration-questions && npx migration-jsrename