{"id":22018135,"url":"https://github.com/rvflash/combine","last_synced_at":"2025-03-23T09:27:35.922Z","repository":{"id":57543252,"uuid":"120533843","full_name":"rvflash/combine","owner":"rvflash","description":"Package combine provides interface to create assets with multiple source of contents (bytes, string, file path or URL)","archived":false,"fork":false,"pushed_at":"2018-03-16T12:55:32.000Z","size":43,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T16:16:29.048Z","etag":null,"topics":["assets","combine","golang","minify"],"latest_commit_sha":null,"homepage":"","language":"Go","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/rvflash.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":"2018-02-06T22:58:45.000Z","updated_at":"2018-09-17T13:07:36.000Z","dependencies_parsed_at":"2022-08-27T19:10:28.921Z","dependency_job_id":null,"html_url":"https://github.com/rvflash/combine","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fcombine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fcombine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fcombine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fcombine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvflash","download_url":"https://codeload.github.com/rvflash/combine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245081293,"owners_count":20557814,"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":["assets","combine","golang","minify"],"created_at":"2024-11-30T05:10:04.414Z","updated_at":"2025-03-23T09:27:35.887Z","avatar_url":"https://github.com/rvflash.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Combine\n\n[![GoDoc](https://godoc.org/github.com/rvflash/combine?status.svg)](https://godoc.org/github.com/rvflash/combine)\n[![Build Status](https://img.shields.io/travis/rvflash/combine.svg)](https://travis-ci.org/rvflash/combine)\n[![Code Coverage](https://img.shields.io/codecov/c/github/rvflash/combine.svg)](http://codecov.io/github/rvflash/combine?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/rvflash/combine)](https://goreportcard.com/report/github.com/rvflash/combine)\n\n\nPackage combine provides interface to create assets with multiple source of contents (bytes, string, file path or URL).\nIt combines and minifies them on the fly on the first demand on the dedicated file server.\n\n\n### Installation\n\n```bash\n$ go get github.com/rvflash/combine\n$ cd $GOPATH/src/github.com/rvflash/combine\n$ dep ensure\n```\n\n### Usage\n\nSee example for real usage. Errors are ignored for the demo.\n\n```go\nimport \"github.com/rvflash/combine\"\n// ...\n// Creates a box with the path to the local file resources\n// and the path to store combined / minified assets.\nstatic := combine.NewBox(\"./src\", \"./combine\")\n// Deletes all files cache on exit. \ndefer func() { _ = static.Close() }()\n// ...\n// Creates a asset.\ncss := static.NewCSS()\n_ = css.AddURL(\"https://raw.githubusercontent.com/twbs/bootstrap/v4-dev/dist/css/bootstrap-reboot.css\")\n_ = css.AddString(\".blue{ color: #4286f4; }\")\n_ = css.AddFile(\"local/file/is_src_dir.css\")\n// Uses it in a HTML template by retrieving its path or tag.\n// By default, a build version will also added.\ntag := css.Tag(\"/static/\")\n// ...\n// Serves combined and minifed resousrces\nhttp.Handle(\"/static/\", http.FileServer(static))\nhttp.ListenAndServe(\":8080\", nil)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvflash%2Fcombine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvflash%2Fcombine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvflash%2Fcombine/lists"}