Skip to content
This repository has been archived by the owner on Jan 4, 2020. It is now read-only.
/ hoast-changed Public archive

Hoast module used filter out files which have not been changed since the last build.

License

Notifications You must be signed in to change notification settings

hoast/hoast-changed

Repository files navigation

npm package @latest npm package @next

Travis-ci status CodeCov coverage

License agreement Open issues on GitHub

hoast-changed

Filter out files which have not been changed since the last build.

As the name suggest this is a hoast module.

Do note this module can only be used if remove property of the hoast options is NOT set to true.

Usage

Install hoast-changed using npm.

$ npm install hoast-changed

Parameters

  • file: The file path where the update times are stored.
    • Type: String
    • Default: hoast-changed
  • patterns: Glob patterns to match file paths with. If the file path matches the patterns it will be skipped and continue to be processed.
    • Type: String or Array of strings
    • Required: no
  • patternOptions: Options for the glob pattern matching. See planckmatch options for more details on the pattern options.
    • Type: Object
    • Default: {}
  • patternOptions.all: This options is added to patternOptions, and determines whether all patterns need to match instead of only one.
    • Type: Boolean
    • Default: false

Example

CLI

{
  "modules": {
    "hoast-changed": {
      "patterns": "*/index.md"
    },
    "read": {}
  }
}

All the files will be checked for their changed time except the index.md files which will always be processed.

Script

const Hoast = require(`hoast`);
const read = Hoast.read,
      changed = require(`hoast-changed`);

Hoast(__dirname)
  .use(changed({
    patterns: `*/index.md`
  }))
  .use(read())
  .process();

All the files will be checked for their changed time except the index.md files which will always be processed.

About

Hoast module used filter out files which have not been changed since the last build.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published