vercel / vercel/ncc

Add #! /usr/bin/env node (shebang line) to scripts

Open
#769 1 comment 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
9.8k
Forks
326
PR merge metrics
No merged PRs in 30d

Description

Hi, I am using ncc to build TypeScript scripts into a single JS file, is there a way to add the Node shebang line #! /usr/bin/env node to the generated file? This way they would behave more as executable.

More info for googlers: https://stackoverflow.com/questions/33509816/what-exactly-does-usr-bin-env-node-do-at-the-beginning-of-node-files

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by locating ncc's generated-file output path and how the bundled JavaScript text is assembled. Done means generated scripts begin with #! /usr/bin/env node and behave as executable Node.js scripts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.