hoast-changed

1.1.3 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i hoast-changed

Weekly Downloads

1

Version

1.1.3

License

ISC

Unpacked Size

8.99 kB

Total Files

5

Last publish

Collaborators

  • redkenrok