{"id":16183785,"url":"https://github.com/tleunen/brfs-htmlmin","last_synced_at":"2025-03-19T02:30:52.636Z","repository":{"id":21009867,"uuid":"24300547","full_name":"tleunen/brfs-htmlmin","owner":"tleunen","description":"browserify fs.readFileSync() static html file inliner with html minifier","archived":false,"fork":false,"pushed_at":"2015-07-22T00:02:04.000Z","size":133,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-11T07:46:13.704Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tleunen.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":"2014-09-21T19:06:26.000Z","updated_at":"2017-04-03T22:28:56.000Z","dependencies_parsed_at":"2022-08-03T15:10:31.219Z","dependency_job_id":null,"html_url":"https://github.com/tleunen/brfs-htmlmin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleunen%2Fbrfs-htmlmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleunen%2Fbrfs-htmlmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleunen%2Fbrfs-htmlmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleunen%2Fbrfs-htmlmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tleunen","download_url":"https://codeload.github.com/tleunen/brfs-htmlmin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244341435,"owners_count":20437648,"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-10-10T07:06:53.259Z","updated_at":"2025-03-19T02:30:52.376Z","avatar_url":"https://github.com/tleunen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# brfs-htmlmin\n\n`brfs-htmlmin` is kind of a fork of [brfs](https://github.com/substack/brfs).\nIt's a transform for browserify that allows you to use `fs.readFileSync()`\nin your code and will statically inline the content in your bundle.\n\nThe difference is that with `brfs-htmlmin`, it will minify the html output.\n\n## install\n\n- Install `brfs-htmlmin` in your project: `npm install brfs-htmlmin`\n- Use it as a transform, in the command line or with the API:\n```\n$ browserify -t brfs-htmlmin example/main.js \u003e bundle.js\n```\n``` js\nvar browserify = require('browserify');\nvar fs = require('fs');\n\nvar b = browserify('example/main.js');\nb.transform('brfs-htmlmin');\n\nb.bundle().pipe(fs.createWriteStream('bundle.js'));\n```\n\n## example\n\nfor a main.js:\n\n``` js\nvar fs = require('fs');\nvar html = fs.readFileSync(__dirname + '/doc.html', 'utf8');\nconsole.log(html);\n```\n\nand a doc.html:\n\n``` html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n  \u003ctitle\u003eA RMScreenprint\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003ch1\u003eMain heading in my document\u003c/h1\u003e\n  \u003c!-- Note that it is \"h\" + \"1\", not \"h\" + the letters \"one\" --\u003e\n  \u003cp\u003eLook Ma, I am coding \u003cabbr title=\"Hyper Text Markup Language\"\u003eHTML\u003c/abbr\u003e.\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## options\n\n#### minify\nType: `Object`\n\nHash of options sent to the [html-minifier](https://github.com/kangax/html-minifier). See [github html-minifier by Kangax](https://github.com/kangax/html-minifier#options-quick-reference).\n\nBy defaults, these options are already `true`:\n```\nremoveComments: true,\ncollapseWhitespace: true,\ncollapseBooleanAttributes: true,\nremoveAttributeQuotes: true,\nremoveRedundantAttributes: true,\nremoveEmptyAttributes: true\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftleunen%2Fbrfs-htmlmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftleunen%2Fbrfs-htmlmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftleunen%2Fbrfs-htmlmin/lists"}