Skip to content

Commit 351de20

Browse files
committed
feat: export built-in transformations
1 parent 984e984 commit 351de20

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
export { default as VueTransformation } from './VueTransformation'
44

55
export { default as runTransformation } from './run-transformation'
6+
7+
export { default as transformations } from '../transformations'

transformations/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
import type { Transform, Parser } from 'jscodeshift'
2+
3+
type JSTransformationModule = {
4+
default: Transform
5+
parser?: string | Parser
6+
}
7+
18
const transformationMap: {
2-
[name: string]: Function
9+
[name: string]: JSTransformationModule
310
} = {
411
'new-global-api': require('./new-global-api'),
512
'vue-router-v4': require('./vue-router-v4'),

0 commit comments

Comments
 (0)