Skip to content

Commit

Permalink
refactor: replace sucrase with tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed May 3, 2024
1 parent 1903c7c commit 451f28c
Show file tree
Hide file tree
Showing 3 changed files with 257 additions and 8 deletions.
7 changes: 3 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { createRequire } from 'node:module'
// @ts-check
// import { sxzz } from './dist/index.js'

const require = createRequire(import.meta.url)
require('sucrase/register')
import { require } from 'tsx/cjs/api'
/** @type {typeof import('./src/index.ts')} */
const { sxzz } = require('./src/index.ts')
const { sxzz } = require('./src/index.ts', import.meta.url)

export default sxzz(
[
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"@types/node": "^20.12.7",
"bumpp": "^9.4.1",
"eslint": "^9.1.1",
"sucrase": "^3.35.0",
"tsup": "^8.0.2",
"tsx": "^4.8.2",
"typescript": "^5.4.5"
},
"engines": {
Expand Down
Loading

0 comments on commit 451f28c

Please sign in to comment.