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

Support shebang preservation #27

Closed
seho-dev opened this issue Dec 3, 2021 · 1 comment
Closed

Support shebang preservation #27

seho-dev opened this issue Dec 3, 2021 · 1 comment

Comments

@seho-dev
Copy link

seho-dev commented Dec 3, 2021

main.ts

#!/usr/bin/env node

// 命令行
import { program } from 'commander'
import pkg from '../package.json'
import welcome from './welcome.js'

// 输入-v, --version查看当前工具的版本
program.version(pkg.version, '-v, --version').description('查看当前版本号')

program
  .command('create')
  .description('create template (创建模板)')
  .action(async () => {
    // 引入欢迎👏页面
    await welcome()
    await import('./create.js')
  })

program.parse(process.argv)
@seho-dev
Copy link
Author

seho-dev commented Dec 3, 2021

image

@pi0 pi0 changed the title SyntaxError: Unexpected character '!' Support shebang preservation Dec 3, 2021
@pi0 pi0 closed this as completed in 12ccc15 Dec 3, 2021
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

No branches or pull requests

1 participant