Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tsx #677

Merged
merged 2 commits into from
Nov 16, 2024
Merged

Tsx #677

merged 2 commits into from
Nov 16, 2024

Conversation

indeyets
Copy link
Contributor

@indeyets indeyets commented Nov 9, 2024

Use https://tsx.is/ instead of local esm/register

Copy link
Member

@davidmz davidmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Предлагаю добавить tsx лоадером в knexfile (см. комментарии), тогда не придётся возиться с вызовом command-line knex через tsx.

knexfile.js Show resolved Hide resolved
package.json Outdated
@@ -13,10 +13,11 @@
"lint": "run-s eslint ejslint",
"ejslint": "ejslint app",
"eslint": "eslint . --ext \".js,.jsx,.ts\"",
"babel": "node -r './esm/register.cjs'",
"babel": "tsx",
"knex": "tsx node_modules/.bin/knex",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Под Windows так не работает, в .bin лежат cms и sh скрипты. Надо вызывать node_modules/knex/bin/cli.js. Но если поставить tsx лоадером в knexfile, то и это не понадобится.

Copy link
Member

@davidmz davidmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@davidmz davidmz merged commit ce1f37c into stable Nov 16, 2024
12 checks passed
@davidmz davidmz deleted the tsx branch November 16, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants