vercel / vercel/ncc

Programatic use: Allow string input

Open
#628 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

According to the examples provided in the readme and the examples folder, ncc always expects a path to a file.

In my use case, I'd prefer to directly take a string input e.g.:

const src = "console.log(require("hello-world-npm").helloWorld());";
const bundled = ncc(src);

Is this of interest to be implemented? If so, can you recommend an API definition. I'd be happy to take over the work myself. Please let me know. Thanks

Potentially related:

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

Start with the README's “Programmatically from Node.js” section and the examples folder to understand the current path-based API. Then identify the programmatic entry point and decide on a documented API for string input; done means the API is settled and string-based bundling works as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.