{"id":28205781,"url":"https://github.com/coast-framework/assets","last_synced_at":"2025-10-29T09:01:53.860Z","repository":{"id":57713510,"uuid":"203836112","full_name":"coast-framework/assets","owner":"coast-framework","description":"Easy clojure assets minifying and bundling","archived":false,"fork":false,"pushed_at":"2019-10-03T21:13:36.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-18T23:52:29.789Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/coast-framework.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":"2019-08-22T16:48:25.000Z","updated_at":"2022-01-09T15:11:33.000Z","dependencies_parsed_at":"2022-09-18T06:34:30.002Z","dependency_job_id":null,"html_url":"https://github.com/coast-framework/assets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coast-framework/assets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coast-framework%2Fassets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coast-framework%2Fassets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coast-framework%2Fassets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coast-framework%2Fassets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coast-framework","download_url":"https://codeload.github.com/coast-framework/assets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coast-framework%2Fassets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281592587,"owners_count":26527518,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-05-17T10:08:30.874Z","updated_at":"2025-10-29T09:01:53.842Z","avatar_url":"https://github.com/coast-framework.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# assets\n\nEasy clojure asset bundling\n\n## Quickstart\n\n## Install\n\nAdd this to your [deps.edn](https://clojure.org/guides/deps_and_cli)\n\n```clojure\ncoast-framework/db {:mvn/version \"1.0.0\"}\n```\n\n## Usage\nCreate an `assets.edn` file in the `resources` directory that looks something like this:\n\n```clojure\n{\"bundle.css\" [\"tachyons.min.css\" \"app.css\"]\n \"bundle.js\"  [\"app.js\"]})\n```\n\nYou can have as many \"bundles\" as you want and you can name them anything. Ensure that your css files go into the `resources/public/css` directory and the js files go into the `resources/public/js` directory.\n\nYou can reference your bundles with some clojure code like below, but it's entirely up to you\n\n```clojure\n(ns your-proj\n  (:require [assets.core :as assets]))\n\n(defn css\n  ([req bundle opts]\n   (let [files (assets/bundle \"dev\" bundle)]\n     (for [href files]\n       [:link (merge {:href href :type \"text/css\" :rel \"stylesheet\"} opts)])))\n  ([req bundle]\n   (css nil bundle {}))\n  ([bundle]\n   (css nil bundle)))\n\n\n(defn js\n  ([req bundle opts]\n   (let [files (assets/bundle \"dev\" bundle)]\n     (for [src files]\n      [:script (merge {:src src :type \"application/javascript\"} opts)])))\n  ([req bundle]\n   (js nil bundle {}))\n  ([bundle]\n   (js nil bundle)))\n```\n\nWhen the `bundle` fn is called, the `assets.edn` file is read or if you pass `\"prod\"` as the first argument to `bundle`, the `assets.minified.edn` file is read.\n\nYou can generate the `assets.minified.edn` file by calling something like the following code:\n\n```clojure\n(let [m (-\u003e (io/resource \"assets.edn\")\n              (slurp)\n              (edn/read-string))]\n    (pprint-write \"resources/assets.minified.edn\" (build m)))\n```\n\nIf this seems kind of weird and half-baked, it kind of is, this library was built to be used with coast and it hasn't been fully separated out yet. PRs welcome!\n\n## Running the tests\n\n```bash\nmake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoast-framework%2Fassets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoast-framework%2Fassets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoast-framework%2Fassets/lists"}