0.0.4 • Published 5 years ago

is-up-to-date v0.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

What does is-up-to-date do?

is-up-to-date synchronously checks that arbitrary target file is more recent than all source files matching glob patterns.

Installation

npm i is-up-to-date -D

Usage

Let's say you have an expensive custom "code generator", which builds dist/generated.js from .txt files in data directory.

You can make it build only if source TXT files in data folder changed:

const isUpToDate = require('is-up-to-date');
if (!isUpToDate('data/*.txt', 'dist/generated.js') {
    // Go ahead and build generated.js from the txt files
}

When NOT to use it?

If you are using popular compilers, transpilers, they probably have built-in mechanism for incremental build. It is likely that they do much more granular job handling your incremental build.

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

6 years ago

0.0.1

6 years ago