{"id":20366390,"url":"https://github.com/wp-launchpad/bud-assets","last_synced_at":"2026-02-11T11:34:54.312Z","repository":{"id":165653594,"uuid":"640639571","full_name":"wp-launchpad/bud-assets","owner":"wp-launchpad","description":"Bud.js mapping for resources","archived":false,"fork":false,"pushed_at":"2024-12-21T23:21:08.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-23T17:45:15.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wp-launchpad.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-14T18:44:58.000Z","updated_at":"2024-10-17T00:14:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa5dea22-1211-4b69-9130-9145cd2afac9","html_url":"https://github.com/wp-launchpad/bud-assets","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/wp-launchpad/bud-assets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-launchpad%2Fbud-assets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-launchpad%2Fbud-assets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-launchpad%2Fbud-assets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-launchpad%2Fbud-assets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wp-launchpad","download_url":"https://codeload.github.com/wp-launchpad/bud-assets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-launchpad%2Fbud-assets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29332607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-15T00:24:30.200Z","updated_at":"2026-02-11T11:34:54.264Z","avatar_url":"https://github.com/wp-launchpad.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bud Assets\nA mapper between WordPress and Bud.js assets.\n\nTo enqueue a bud.js asset then use the name of the entrypoint to enqueue instead of the URL.\n\n## Manipulate script\n\nUnlike vanilla WordPress, this library uses a builder to enqueue and register scripts.\n\nFor that you can use the method `with_script`\n\n### Enqueue script\n\nTo enqueue a script it is possible with the method `enqueue` the following way:\n\n```php\n$assets\n    -\u003ewith_script('/app.js')\n    -\u003eenqueue();\n```\n\n### Register script\n\nTo register a script it is possible with the method `register` the following way:\n\n```php\n$assets\n    -\u003ewith_script('/app.js')\n    -\u003eregister();\n```\n\n## Manipulate style\n\nUnlike vanilla WordPress, this library uses a builder to enqueue and register styles.\n\nFor that you can use the method `with_style`\n\n### Enqueue style\n\nTo enqueue a style it is possible with the method `enqueue` the following way:\n\n```php\n$assets\n    -\u003ewith_style('/app.css')\n    -\u003eenqueue();\n```\n\n### Register style\n\nTo register a style it is possible with the method `register` the following way:\n\n```php\n$assets\n    -\u003ewith_style('/app.css')\n    -\u003eregister();\n```\n\n## Register only on certain conditions\n\nWith this library, it is possible to enqueue or register a script or style based on certain conditions.\n\nFor that on both builders a method `with_query` is available:\n\n```php\n$assets\n    -\u003ewith_style('/app.css')\n    -\u003ewith_query(function (\\LaunchpadBudAssets\\Builders\\AvailabilityQuery $query) {\n        $query-\u003ewith_block('my-block')\n        return $query;\n    })\n    -\u003eenqueue();\n```\n\nThe query offers a couple entities the asset can be paired with:\n\n| Method         | Entity          |\n|----------------|-----------------|\n| with_block     | Gutenberg block |\n| with_shortcode | Shortcode       |\n| with_template  | Template        |\n| with_taxonomy  | Taxonomy        |\n| with_post_type | Post type       |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-launchpad%2Fbud-assets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-launchpad%2Fbud-assets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-launchpad%2Fbud-assets/lists"}