Skip to content

Pinjasaur/gulp-update-humanstxt-date

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

gulp-update-humanstxt-date Travis

Update the last update date in a humans.txt file.

Install

With npm

npm install --save-dev gulp-update-humanstxt-date

or with Yarn

yarn add --dev gulp-update-humanstxt-date

Usage

const gulp = require("gulp");
const updateHumanstxtDate = require("gulp-update-humanstxt-date");

gulp.task("default", () => {
  gulp.src("./humans.txt")
    .pipe(updateHumanstxtDate())
    .pipe(gulp.dest("dist"));
});

Caveats

As per the humans.txt standard, the year is expected in the YYYY/MM/DD format.

In addition, the general format is expected to be as follows: Last updated: YYYY/MM/DD. The tense of "update" can be present (update) or past (updated). Further, the space between the colon (:) and the date is optional.

If you're having trouble, enable logging: updateHumanstxtDate({ log: true }). If the issue persists please let me know.

API

updateHumanstxtDate([options])

options

log

Type: Boolean
Default: false

Log out the previous date and the current date as it will be replaced in humans.txt. Useful for debugging.

License

MIT © Paul Esch-Laurent

About

Update the `last updated` date in a humans.txt file.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published