vercel / vercel/ncc

Option to check whether a build is necessary

Open
#501 0 comments 2 reactions 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

Would it be possible to implement an option to check if a build is needed? Something like:

ncc build --check

Similarly to prettier --check.

I was developing a github action (they suggest using ncc to bundle the code) and I thought it'd be really useful to check in a ci-friendly way whether the current bundle is up to date or not. It can sort of already be done by committing the dist file but for big projects that might be inefficient because it requires doing a full build.

Apologies if this has already been requested or is already available, I couldn't find anything of the sort while searching.

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 at the ncc build CLI entry point and trace how the current bundle is produced. Define how a --check invocation should determine whether the bundle is up to date and what CI-visible result it should return; the issue does not name specific files or tests, so those will need to be located first.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.