{"id":23274027,"url":"https://github.com/remko/gulp-hashsum","last_synced_at":"2025-08-21T06:31:37.512Z","repository":{"id":20320461,"uuid":"23594617","full_name":"remko/gulp-hashsum","owner":"remko","description":"Gulp plugin to generate checksum files","archived":false,"fork":false,"pushed_at":"2018-04-26T07:31:17.000Z","size":29,"stargazers_count":14,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-15T22:06:57.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/remko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-02T20:35:32.000Z","updated_at":"2023-10-19T08:58:54.000Z","dependencies_parsed_at":"2022-09-08T12:21:09.248Z","dependency_job_id":null,"html_url":"https://github.com/remko/gulp-hashsum","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remko%2Fgulp-hashsum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remko%2Fgulp-hashsum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remko%2Fgulp-hashsum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remko%2Fgulp-hashsum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remko","download_url":"https://codeload.github.com/remko/gulp-hashsum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230494926,"owners_count":18235047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T20:11:34.305Z","updated_at":"2024-12-19T20:11:34.899Z","avatar_url":"https://github.com/remko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [gulp-hashsum: Generate checksum files with Gulp](https://el-tramo.be/gulp-hashsum)\n\nA [Gulp](http://gulpjs.com/) plugin for generating a checksum file with the hash checksums of the\npassed files. The file follows the same format as `shasum`, `sha1sum`, `md5sum`, and similar tools.\n\nSince it only writes the file when the checksums have changed, can also be used as a timestamp.\n\n## Installation\n\n    npm install gulp-hashsum --save-dev\n\n## Usage\n\n### Generate a hash file\n\nThe following generates a file `app/SHA1SUMS` with all the SHA-1 checksums of all the\n`.js` files in the `app` directory.\n\n    var hashsum = require(\"gulp-hashsum\");\n\n    gulp.src([\"app/**/*.js\"]).\n        pipe(hashsum({dest: \"app\"}));\n\nThe contents of the `SHA1SUMS` file will look like this:\n\n    3ff1f9baca7bf41fe4a12222436025c036ba88bf  main.js\n    14de86e007f14bc0c6bc9a84d21cb9da908495ae  submodule/sub.js\n\n### Use a different hash than SHA-1\n\nThe following generates a file `app/MD5SUMS` with all the MD5 checksums of all the\n`.js` files in the `app` directory.\n\n    var hashsum = require(\"gulp-hashsum\");\n\n    gulp.src([\"app/**/*.js\"]).\n        pipe(hashsum({dest: \"app\", hash: \"md5\"}));\n\n### Use it as a timestamp\n\nSince `gulp-hashsum` only writes the hash file whenever its content changes, you can\nuse it as a checksum file, e.g. to restart Passenger Phusion whenever a file changes,\nby specifying `restart.txt` as the filename:\n\n    var hashsum = require(\"gulp-hashsum\");\n\n    gulp.src([\"app/**/*.js\"]).\n        pipe(hashsum({filename: \"tmp/restart.txt\"}));\n\n### Stream\n\nInstead of writing the checksum file to disk, you can stream it and pass it\nto pipes:\n\n    var hashsum = require(\"gulp-hashsum\");\n\n    gulp.src([\"app/**/*.js\"]).\n        pipe(hashsum({stream: true})).\n        pipe(gulp.dest(\"app\"));\n\n## API\n\n### `hashsum(options)`\n\n* **`options.dest`** - _string_  \n   The destination directory of the hash file.  \n   All paths in the hash file will be relative to this directory.\n\n  Default: `process.cwd()` (the current working directory)\n\n* **`options.filename`** - _string_  \n   The filename of the hash file.  \n   Default: `\u003cHASH-NAME\u003eSUMS` (i.e. `SHA1SUMS` when `sha1` is used as hash function)\n\n* **`options.hash`** - _string_  \n   The hash function to use. Must be one supported by\n  [crypto](https://www.npmjs.org/package/crypto).  \n   Default: `sha1`\n\n* **`options.force`** - _boolean_  \n   Always overwrite the hashsum file, regardless of whether the contents changed.  \n   Default: `false`\n\n* **`options.delimiter`** - _string_  \n   Separator between hashsum and filename.\n  Default: `` (two spaces)\n\n* **`options.json`** - _boolean_  \n   Format hash file as a JSON object (instead of a `options.delimiter`-delimited file).\n  E.g.:\n\n        {\n          \"dir1/file1\": \"3ff1f9baca7bf41fe4a12222436025c036ba88bf\",\n          \"dir1/file2\": \"14de86e007f14bc0c6bc9a84d21cb9da908495ae\"\n        }\n\n  Default: `false`\n\n* **`options.stream`** - _boolean_  \n   Instead of writing the file to disk, stream it (so it can be passed to later\n  pipes)\n\n  Default: `false`\n\n## Changelog\n\n### 1.2.0 (2018-04-16)\n\n* Add `stream` option.\n\n### 1.1.0 (2016-06-16)\n\n* Add `json` option.\n\n### 1.0.1 (2016-01-29)\n\n* Remove `buffertools` dependency\n\n### 1.0.0 (2014-09-29)\n\n* Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremko%2Fgulp-hashsum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremko%2Fgulp-hashsum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremko%2Fgulp-hashsum/lists"}