{"id":19504042,"url":"https://github.com/mysticatea/appcache-manifest","last_synced_at":"2025-04-26T00:33:25.112Z","repository":{"id":57182682,"uuid":"32448431","full_name":"mysticatea/appcache-manifest","owner":"mysticatea","description":"A CLI tool to generate HTML5 Application Cache Manifest.","archived":false,"fork":false,"pushed_at":"2017-11-08T06:18:47.000Z","size":77,"stargazers_count":26,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T05:41:55.927Z","etag":null,"topics":["appcache","appcache-manifest","application-cache","cli","cli-command","development","html","javascript","offline","web"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mysticatea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-18T09:06:10.000Z","updated_at":"2024-05-31T21:18:42.000Z","dependencies_parsed_at":"2022-09-11T22:40:36.287Z","dependency_job_id":null,"html_url":"https://github.com/mysticatea/appcache-manifest","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysticatea%2Fappcache-manifest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysticatea%2Fappcache-manifest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysticatea%2Fappcache-manifest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysticatea%2Fappcache-manifest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mysticatea","download_url":"https://codeload.github.com/mysticatea/appcache-manifest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250917284,"owners_count":21507561,"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":["appcache","appcache-manifest","application-cache","cli","cli-command","development","html","javascript","offline","web"],"created_at":"2024-11-10T22:24:05.127Z","updated_at":"2025-04-26T00:33:24.904Z","avatar_url":"https://github.com/mysticatea.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# appcache-manifest\n\n[![npm version](https://img.shields.io/npm/v/appcache-manifest.svg)](https://www.npmjs.com/package/appcache-manifest)\n[![Downloads/month](https://img.shields.io/npm/dm/appcache-manifest.svg)](http://www.npmtrends.com/appcache-manifest)\n[![Build Status](https://travis-ci.org/mysticatea/appcache-manifest.svg?branch=master)](https://travis-ci.org/mysticatea/appcache-manifest)\n[![Coverage Status](https://codecov.io/gh/mysticatea/appcache-manifest/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/appcache-manifest)\n[![Dependency Status](https://david-dm.org/mysticatea/appcache-manifest.svg)](https://david-dm.org/mysticatea/appcache-manifest)\n\nA CLI tool to generate HTML5 Application Cache Manifest.\n\n- `appcache-manifest` command generates the manifest file of given files.\n    - The manifest file includes the `md5` hash which is calculated from the content of the files.\n    - You can regenerate the manifest file when the files are changed by `--watch` option.\n\n## :cd: Installation\n\n```bash\n$ npm install appcache-manifest\n```\n\n- Requires Node.js 4 or later.\n\n## :book: Usage\n\nThis provides 2 commands; `appcache-manifest` and `appcache-manifest-fixer`.\n\n- `appcache-manifest` is the command to generate manifest files.\n- `appcache-manifest-fixer` is the command to add `manifest` attribute into a HTML file.\n\n```\nUsage: appcache-manifest [OPTIONS] [FILES...]\n\n    FILES: File globs that includes into manifest.\n\nOptions:\n    -o, --output \u003cFILE_PATH\u003e    The path of an output file.\n                                Prints to stdout by default.\n    -p, --prefix \u003cPATH\u003e         The prefix part of each path in cache section.\n    -P, --postfile \u003cFILE_PATH\u003e  The path of a postfix file.  The file will be\n                                concatinated after generated contents.\n    -h, --help                  Prints this text.\n    -v, --verbose               Prints detail messages in progress. This option\n                                must be used together with '--output' option.\n    -V, --version               Prints version number.\n    -w, --watch                 This command would be watching target files and\n                                directories if --watch option is specified.\n                                Then it regenerates the manifest file when those\n                                files are added, removed, or changed.\n    --network-star              Adds \"NETWORK:\\n*\" after generated contents.\n    --stamp                     Stamps the output with the date/time instead\n                                of an md5 hash.\n```\n\n```\nUsage: appcache-manifest-fixer [FILE_PATH] [OPTIONS]\n\n    This command would add \"manifest\" attribute into \u003chtml\u003e tag.\n\n    FILE_PATH: The target HTML file path.\n               Reading from stdin by default\n\nOptions:\n    -o, --output \u003cFILE_PATH\u003e  The path of an output file.\n                              Writing to stdout by default.\n    -h, --help                Prints this text.\n    -m, --manifest \u003cPATH\u003e     The path of a manifest file. The path will be set\n                              to the value of \"manifest\" attribute.\n                              \"index.appcache\" by default.\n    -v, --version             Prints version number.\n```\n\n\n### Examples\n\n```\nappcache-manifest \"app/index.{html,css,js}\" \"app/lib/**/*.{css,js}\" --network-star -o app/index.appcache\n```\n\n```\nappcache-manifest \"app/**/*.{html,css,js}\" --postfile src/api.txt --postfile src/fallback.txt -o app/index.appcache\n```\n\n\n## :turtle: Node.js API\n\n```js\nvar am = require(\"appcache-manifest\");\n```\n\n### am.generate(fileGlobs, options)\n\nGenerate a manifest file content; path list and a md5 hash comment.\n\n- **fileGlobs** `string|string[]` -- Globs that includes into CACHE section of the manifest.\n- **options** `object`\n  - **options.prefix** `string` -- The prefix part of each path in cache section.\n  - **options.postfile** `string|string[]` -- Paths of a postfix file. The file will be concatinated after generated contents.\n  - **options.networkStar** `boolean` -- A flag to add \"NETWORK:\\n*\" after generated contents.\n  - **options.stamp** `boolean` -- Stamps the output with the date/time instead\n  of an md5 hash.\n\nThis function returns `stream.Readable`.\nThe stream outputs generated contents.\n\n### am.createFixer(options)\n\nAdd a \"manifest\" attribute into `\u003chtml\u003e` tag.\n\n- **options** `object`\n  - **options.manifest** `string` -- A path to a manifest file.  By default,\n    `\"index.appcache\"`.\n\nThis function returns `stream.Transform`.\nThe stream detect `\u003chtml\u003e` tag from inputs, and add a `manifest` attribute.\n\n## :newspaper: Changelog\n\n- [GitHub Releases](https://github.com/mysticatea/appcache-manifest/releases)\n\n## :muscle: Contributing\n\nWelcome contributing!\n\nPlease use GitHub's Issues/PRs.\n\n### Development Tools\n\n- `npm test` runs tests and measures coverage.\n- `npm run coverage` shows the coverage result of `npm test` command with the default browser.\n- `npm run clean` removes the coverage result of `npm test` command.\n- `npm run lint` runs ESLint.\n- `npm run watch` runs tests with `--watch` option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysticatea%2Fappcache-manifest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmysticatea%2Fappcache-manifest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysticatea%2Fappcache-manifest/lists"}