{"id":16040716,"url":"https://github.com/ryelle/theme-build-tools","last_synced_at":"2026-06-30T15:31:10.973Z","repository":{"id":11941851,"uuid":"14511679","full_name":"ryelle/theme-build-tools","owner":"ryelle","description":"Grunt tasks for creating a wp theme","archived":false,"fork":false,"pushed_at":"2014-09-29T16:55:11.000Z","size":138,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-10T18:52:45.582Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryelle.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-19T02:21:31.000Z","updated_at":"2018-12-21T09:13:07.000Z","dependencies_parsed_at":"2022-09-10T17:10:43.186Z","dependency_job_id":null,"html_url":"https://github.com/ryelle/theme-build-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryelle/theme-build-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryelle%2Ftheme-build-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryelle%2Ftheme-build-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryelle%2Ftheme-build-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryelle%2Ftheme-build-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryelle","download_url":"https://codeload.github.com/ryelle/theme-build-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryelle%2Ftheme-build-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34973543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"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":"2024-10-08T23:21:06.536Z","updated_at":"2026-06-30T15:31:10.538Z","avatar_url":"https://github.com/ryelle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"##What is this?\n\nIt's a grunt setup for building WordPress themes, mainly. It also includes these other automation tools:\n\n- Codesniffer ruleset\n\n###What's in it?\n\n[grunt-contrib-sass](https://www.npmjs.org/package/grunt-contrib-sass), [grunt-contrib-concat](https://www.npmjs.org/package/grunt-contrib-concat), [grunt-contrib-watch](https://www.npmjs.org/package/grunt-contrib-watch), [grunt-contrib-clean](https://www.npmjs.org/package/grunt-contrib-clean), [grunt-contrib-copy](https://www.npmjs.org/package/grunt-contrib-copy), [grunt-contrib-compress](https://www.npmjs.org/package/grunt-contrib-compress), [grunt-wp-theme-check](https://github.com/ryelle/grunt-wp-theme-check), [grunt-wp-i18n](https://www.npmjs.org/package/grunt-wp-i18n)\n\nCheck out the [Gruntfile](https://github.com/ryelle/Grunt-Theme-Builder/blob/master/Gruntfile.js) to see the exact tasks, or one of the following projects where I use this:\n\n- [Museum's Gruntfile](https://github.com/ryelle/museum/blob/master/Gruntfile.js), modified for LESS (css preprocessor).\n- [Umbra's Gruntfile](https://github.com/ryelle/umbra/blob/master/Gruntfile.js) (actively in development, has both `dist` and `dev` targets for rapid building into src directory)\n\n###Requirements\n\n**For Sass**: [You'll need ruby and the sass gem installed](https://www.npmjs.org/package/grunt-contrib-sass#sass-task).\n\n**For Theme Check**: You'll need [my version of the Theme Check plugin](https://github.com/ryelle/theme-check), as it includes the WP-CLI command that the grunt task looks for.\n\n###The Tasks\n\n#### The `dev` tasks\n\nAll of my tasks have a 'dev' and a 'dist' version. The dev versions send processed files back to the src directory, which allows for rapid development without needing to rebuild the whole theme. I find that I use this during the first 85% of theme building, then switch my default task to 'build' for the next steps.\n\n#### The named tasks\n\n#### `build`\n\n\t'clean:all', 'copy:all', 'sass:dist', 'concat:dist', 'clean:dist'\n\nThis wipes the `BUILD_DIR`, copies all `SOURCE_DIR` files (with exceptions), processes the sass files into `style.css` and `editor-style.css`, concatenates the theme's javascript, then cleans up any remaining files that shouldn't be in build.\n\n#### `test`\n\n\twp_theme_check:dist\n\nRun Theme Check against the build directory.\n\n#### `publish`\n\n\t'build', 'makepot:dist', 'test', 'compress:main'\n\nThis does everything `build` does, generates the .POT file, then runs theme-check. If the theme passes (or if you `--force` it), runs compress, which builds the theme zip.\n\n#### `dev`\n\n\t'sass:dev', 'concat:dev', 'makepot:dev'\n\nThis runs the Sass process, concatenates the javascript, and generates a .POT file into the source directory.\n\n---\n\n##Why?\n\nMostly because I can. So I don't have to repeatedly try to create a zip file that magically doesn't have `.DS_Store` in it. Also, this ensures I also don't accidentally add any grunt config, `node_modules`, or sass/less files.\n\n##How do I use it?\n\n###Starter theme\n\nI usually start with [_s](https://github.com/Automattic/_s/) + the '_sassify!' option. Since `/sass/style.scss` is designed to compile down to your main `/style.css`, it makes sense to remove style.css in the source directory (it will be built with Grunt). In this case, however, we're building `src/sass/style.css` to `build/style.css`.\n\n###Directory Structure\n\nI assume the directory structure is:\n\n\ttheme-name/\n\t--- Gruntfile.js\n\t--- package.json\n\t--- node_modules/\n\t------- all the things\n\t--- src/\n\t------- your theme files, with sass/etc\n\t------- NO style.css\n\t--- build/\n\t------- your theme files, all compiled \u0026 ready to run.\n\t------- a compiled style.css\n\nSince WordPress is smart enough to look into folders for your theme, it'll find your theme's `style.css` in the build directory, and display that as the available theme. Activating the theme will run it out of the build directory (theme-name/build as your theme slug), and assuming you use the core functions for all your linking of things (`get_template_directory_uri`, etc), everything will work just fine.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryelle%2Ftheme-build-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryelle%2Ftheme-build-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryelle%2Ftheme-build-tools/lists"}