Skip to content

Commit

Permalink
Merge pull request #266 from Telegram-Mini-Apps/bugfix/npx-create-min…
Browse files Browse the repository at this point in the history
…i-app

fix(create-mini-app): add shebang
  • Loading branch information
heyqbnk authored Mar 27, 2024
2 parents ab61396 + 41b80fa commit d0d8f30
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eleven-cheetahs-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tma.js/create-mini-app": patch
---

Add shebang in distributive script.
1 change: 1 addition & 0 deletions packages/create-mini-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@types/node": "^20.0.0",
"build-utils": "workspace:*",
"eslint-config-custom": "workspace:*",
"rollup-plugin-preserve-shebang": "^1.0.1",
"test-utils": "workspace:*",
"tsconfig": "workspace:*"
},
Expand Down
1 change: 1 addition & 0 deletions packages/create-mini-app/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
import process from 'node:process';

import chalk from 'chalk';
Expand Down
6 changes: 6 additions & 0 deletions packages/create-mini-app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { defineConfig } from 'vite';
import shebang from 'rollup-plugin-preserve-shebang';

export default defineConfig({
plugins: [
shebang({
shebang: '#!/usr/bin/env node',
}),
],
build: {
emptyOutDir: true,
ssr: true,
Expand Down
22 changes: 21 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0d8f30

Please sign in to comment.