{"id":869,"date":"2015-08-24T00:17:12","date_gmt":"2015-08-23T19:17:12","guid":{"rendered":"https:\/\/ahmadawais.com\/?p=869"},"modified":"2023-08-16T05:45:05","modified_gmt":"2023-08-16T12:45:05","slug":"my-advanced-gulp-workflow-for-wordpress-themes","status":"publish","type":"post","link":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/","title":{"rendered":"My Advanced Gulp Workflow for WordPress Themes"},"content":{"rendered":"<blockquote><p>If you are an absolute beginner when it comes to Gulp, you might want to read <a href=\"https:\/\/ahmadawais.com\/introducing-wpgulp-an-easy-to-use-wordpress-gulp-boilerplate\/\" target=\"_blank\" rel=\"noopener\">Introducing WPGulp: An Easy to Use WordPress Gulp Boilerplate<\/a>. Moreover, this post is just an article, which hasn&#8217;t been updated in a long time. I maintain this workflow under <a href=\"https:\/\/github.com\/ahmadawais\/WPGulp\">WPGulp<\/a> repository. I suggest you all to read this post to get an idea and use WPGulp instead.<\/p><\/blockquote>\n<p>If you are not using Gulp or any task runner, believe me when I say that you are missing out on all the front-end fun stuff. Today, I intend to share my advanced Gulp based automated workflow for building WordPress themes, with the community.<\/p>\n<p>I remember the time when I had to minify CSS and JS files, compress the images and the fuss of testing my designs across different browsers let alone devices \u2014 oh my. If my recollection of lost isn&#8217;t misleading me then I used to spend like 30% of my productive hours on this stuff.<\/p>\n<blockquote><p><em>JUST A NOTE!<\/em><br \/>\n\ud83d\udc68\u200d\ud83d\udcbb I&#8217;m teaching thousands of devs how to become <a href=\"https:\/\/VSCode.pro\/\" target=\"_blank\" rel=\"noopener\">VSCode Power Users<\/a> \u2192<br \/>\n\u2705 This site is super fast?! <a href=\"https:\/\/kinsta.com\/?kaid=WMDAKYHJLNJX&amp;utm_source=TheDevCouple&amp;utm_medium=Partner\">It&#8217;s hosted with Kinsta on Google servers \u2192<\/a><\/p><\/blockquote>\n<p>Thankfully, someone wrote a piece about DRY (Don&#8217;t Repeat Yourself) and it got me thinking about the flaws in my workflow. I believe a tweet from Chris Coyer led me to start using <a href=\"http:\/\/gruntjs.com\/\">Grunt<\/a> in 2012 or a little later. I used it for over a year and boy it was a fun ride.<\/p>\n<h2 id=\"why-gulp\">Why Gulp?<a href=\"#why-gulp\" class=\"heading-link\">#<\/a><\/h2>\n<p>While Grunt took care of optimizing images, compressing scripts, and compiling Sass, I never really enjoyed writing Grunt files. Then in Dec 2013, I heard about this new task runner called <a href=\"http:\/\/gulpjs.com\/\">Gulp<\/a>. On a Sunday morning, I thought to create a dummy project and try Gulp, to say that I was hooked would be an understatement.<\/p>\n<h3 id=\"why-do-i-like-gulp\">Why Do I Like Gulp?<a href=\"#why-do-i-like-gulp\" class=\"heading-link\">#<\/a><\/h3>\n<p>At that time, there was hardly any documentation available for using Gulp with WordPress, but thanks to the awesome helping community at <a href=\"https:\/\/ahmadawais.com\/get-free-support-wordpress-questions\/\">Stack Exchange<\/a>, I was able to make it work. I found Gulp to be a lot better than Grunt. Here is why:<\/p>\n<ul>\n<li>Gulp is <a href=\"https:\/\/gist.github.com\/ahmadawais\/260721bbd3e1d5167127\">easier to understand and more efficient<\/a><\/li>\n<li>Gulp has a JavaScript syntax unlike JSON syntax of Grunt<\/li>\n<li>Gulp is faster than Grunt (One of my theme&#8217;s compile time went from 12secs to 300ms)<\/li>\n<li>Gulp is intuitive and gets 20K-25k downloads a day, which is equal to or great than Grunt downloads<\/li>\n<li>Gulp\u2019s code-over-configuration makes it not only easy to write tasks for, but also much easier to read and maintain<\/li>\n<\/ul>\n<p>That said, let&#8217;s leave the story for now and see what it is like to be using Gulp with WordPress.<\/p>\n<h3 id=\"do-i-need-to-use-gulp\">Do I Need to Use Gulp?<a href=\"#do-i-need-to-use-gulp\" class=\"heading-link\">#<\/a><\/h3>\n<p>Are you a web developer? Do you program in HTML\/CSS sometimes?<\/p>\n<p><em>\u2014 Yes!<\/em><\/p>\n<p>Did you ever use a task-runner? Feel like you belong to the stone age while all the crazy kids in town are using awesome advanced workflows?<\/p>\n<p><em><em>\u2014 <\/em>Yes! :(.<\/em><\/p>\n<p>OK! let&#8217;s get you started then.<\/p>\n<p>Since this article is about an advanced Gulp based workflow, explaining how to do basic Gulp related stuff is out of the scope. But instead of leaving you (beginners) in the middle of nowhere, I&#8217;d like to suggest a few articles to help you get started.<\/p>\n<ul>\n<li>Basic: Learn what is Gulp and How to use it (https:\/\/www.digitalocean.com\/community\/tutorials\/automate-your-tasks-easily-with-gulp-js)<\/li>\n<li>Detailed: Building with Gulp (https:\/\/www.smashingmagazine.com\/2014\/06\/building-with-gulp\/)<\/li>\n<\/ul>\n<p>If having a basic Gulp workflow is nothing new for you, then maybe you&#8217;ll enjoy reading my advanced gulp workflow.<\/p>\n<h2 id=\"advanced-gulp-wordpress-workflow\">Advanced Gulp WordPress Workflow<a href=\"#advanced-gulp-wordpress-workflow\" class=\"heading-link\">#<\/a><\/h2>\n<p>While building premium themes for WordPress, I end up with a lot of grunt work which includes<\/p>\n<ul>\n<li>Minifying &amp; optimizing CSS with stylesheets and Sass<\/li>\n<li>Custom JavaScripts and 3rd Party Scripts via <a href=\"http:\/\/bower.io\/\">Bower<\/a><\/li>\n<li>Synced cross-browser design testing on different devices<\/li>\n<li>Tunneling my localhost dev branch to a random public URL for public access<\/li>\n<li>Building an installable zip theme file without any node modules, cache files or .Dot files data in it<\/li>\n<\/ul>\n<p>Let&#8217;s explore how I get all this stuff done with Gulp.<\/p>\n<p>I have set up a Github repository called <a href=\"https:\/\/github.com\/ahmadawais\/advanced-gulp-wordpress\">Advanced Gulp WordPress<\/a>. You can check out the structure of files inside it for better understanding.<\/p>\n<\/section>\n<div class=\"postcontents full\">\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-890\" src=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/advanced_gulp_file_structure-red.jpg\" alt=\"advanced_gulp_file_structure-red\" width=\"2213\" height=\"2408\" srcset=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/advanced_gulp_file_structure-red.jpg 2213w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/advanced_gulp_file_structure-red-276x300.jpg 276w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/advanced_gulp_file_structure-red-941x1024.jpg 941w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/advanced_gulp_file_structure-red-1680x1828.jpg 1680w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/advanced_gulp_file_structure-red-860x936.jpg 860w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/advanced_gulp_file_structure-red-680x740.jpg 680w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/advanced_gulp_file_structure-red-400x435.jpg 400w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/advanced_gulp_file_structure-red-50x54.jpg 50w\" sizes=\"auto, (max-width: 2213px) 100vw, 2213px\" \/>\n<\/div>\n<section class=\"postcontents wrapper\">\n<h2 id=\"a-look-at-gulpfile-js\">A Look at gulpfile.js<a href=\"#a-look-at-gulpfile-js\" class=\"heading-link\">#<\/a><\/h2>\n<p>Now let&#8217;s take a look at <a href=\"https:\/\/github.com\/ahmadawais\/advanced-gulp-wordpress\/blob\/master\/gulpfile.js\" target=\"_blank\" rel=\"noopener\">gulpfile.js<\/a> which is present in the root folder of our theme. I will explain each task one by one to make it easier for you to understand. You&#8217;ll find completed gulpfile.js at the end of this post.<\/p>\n<blockquote><p>Since I assume you already know how Gulp works, I will not be explaining how to put all the plugins\/packages in package.json file and other basic setup related steps.<\/p><\/blockquote>\n<h3 id=\"step-1-setting-up-the-variables\">Step #1: Setting Up the Variables<a href=\"#step-1-setting-up-the-variables\" class=\"heading-link\">#<\/a><\/h3>\n<p>Firs of all I am going to set up certain variables so that I don&#8217;t have to change everything for every other theme I create. Let&#8217;s review the code<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/ahmadawais\/84d99f6841426d6efcaf.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/ahmadawais\/84d99f6841426d6efcaf\">Gist<\/a>.<\/noscript><\/div>\n<p>I&#8217;ve set up variables for<\/p>\n<ul>\n<li>L#12 Project name<\/li>\n<li>L#13 Project URL at localhost<\/li>\n<li>L#14 Path to folder of Bower Components<\/li>\n<li>L#15 Name of the folder which will be created for building an installable theme zip file<\/li>\n<li>L#16 Variable <code>buildInclude<\/code> contains the paths to files or folders which are to be included and excluded in while building a clean theme inside <code>buildTheme<\/code> folder for creating a zip file<\/li>\n<\/ul>\n<h3 id=\"step-2-loading-gulp-plugins\">Step #2: Loading Gulp Plugins<a href=\"#step-2-loading-gulp-plugins\" class=\"heading-link\">#<\/a><\/h3>\n<p>I am using quite a few gulp plugins to help manage everything we discussed above.<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/7781b8b0b0bd5706dfc1.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/7781b8b0b0bd5706dfc1\">Gist<\/a>.<\/noscript><\/div>\n<p>The plugins I am using to are as follows<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/gulpjs\/gulp\">Gulp<\/a> \u2014 Pretty much self-explanatory<\/li>\n<li><a href=\"http:\/\/www.browsersync.io\/\">BrowserSyn<\/a> \u2014 Amazing Time-saving synchronized browser testing<\/li>\n<li><a href=\"https:\/\/github.com\/sindresorhus\/gulp-autoprefixer\">AutoPrefixer<\/a> \u2014 Auto prefix CSS for legacy browsers<\/li>\n<li><a href=\"https:\/\/github.com\/rezzza\/gulp-uglifycss\">UglifyCSS<\/a> \u2014 For CSS Minification<\/li>\n<li><a href=\"https:\/\/github.com\/sindresorhus\/gulp-filter\">Filter<\/a> \u2014 Enables you to work on a subset of the original files by filtering them using globbing.<\/li>\n<li><a href=\"https:\/\/github.com\/terinjokes\/gulp-uglify\">UglifyJS<\/a> \u2014 Minifies JS files<\/li>\n<li><a href=\"https:\/\/github.com\/sindresorhus\/gulp-imagemin\">ImageMin<\/a> \u2014 Minifies PNG, JPEG, GIF and SVG images<\/li>\n<li><a href=\"https:\/\/github.com\/tschaub\/gulp-newer\">Newer<\/a> \u2014 For passing through only those source files that are newer than corresponding destination files.<\/li>\n<li><a href=\"https:\/\/github.com\/hparra\/gulp-rename\">Rename<\/a> \u2014 To easily rename files<\/li>\n<li><a href=\"https:\/\/github.com\/wearefractal\/gulp-concat\">Concat<\/a> \u2014 To concatenate JS files<\/li>\n<li><a href=\"https:\/\/github.com\/mikaelbr\/gulp-notify\">Notify<\/a> \u2014 To send notification to OS based on node notifier module<\/li>\n<li><a href=\"https:\/\/github.com\/konitter\/gulp-combine-media-queries\">Combine Media Queries<\/a> \u2014 To combine repetitive media queries after Sass or Less<\/li>\n<li><a href=\"https:\/\/github.com\/OverZealous\/run-sequence\">Run Sequence<\/a> \u2014 Run a series of dependent gulp tasks in order<\/li>\n<li><a href=\"https:\/\/github.com\/dlmanning\/gulp-sass\">Gulp Sass<\/a> \u2014 Gulp plugin for Sass which is based on libSass<\/li>\n<li><a href=\"https:\/\/github.com\/jackfranklin\/gulp-load-plugins\">Load Plugins<\/a> \u2014 To automatically load in gulp plugins<\/li>\n<li><a href=\"https:\/\/github.com\/robrich\/gulp-ignore\">Ignore<\/a> \u2014 To ignore files in the stream based on file characteristics<\/li>\n<li><a href=\"https:\/\/github.com\/sindresorhus\/gulp-zip\">Zip<\/a> \u2014 To zip or compress files<\/li>\n<li><a href=\"https:\/\/github.com\/floatdrop\/gulp-plumber\">Plumber<\/a> \u2014 Fix node pipes, prevent them from breaking due to an error<\/li>\n<li><a href=\"https:\/\/github.com\/jgable\/gulp-cache\">Cache<\/a> \u2014 A cache proxy task for Gulp<\/li>\n<li><a href=\"https:\/\/github.com\/floridoo\/gulp-sourcemaps\">Source Maps<\/a> \u2014 Source map support for CSS partial files<\/li>\n<\/ul>\n<p>Phew! That was a lot. Well, at the end of the day, it&#8217;s all worth the effort.<\/p>\n<h3 id=\"step-3-task-to-setup-browser-sync\">Step #3: Task to Setup Browser Sync<a href=\"#step-3-task-to-setup-browser-sync\" class=\"heading-link\">#<\/a><\/h3>\n<p>Let&#8217;s dive a little deeper and create some awesome tasks to automate our workflow. Browsersync is one of my favorite plugins.<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/77a825324667e0bfe076.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/77a825324667e0bfe076\">Gist<\/a>.<\/noscript><\/div>\n<p>I used to have <a href=\"http:\/\/livereload.com\/\" target=\"_blank\" rel=\"noopener\">LiveReload<\/a> in my workflow, which would reload the web page whenever a file gets edited and saved. But when <a href=\"http:\/\/www.browsersync.io\/\">Browsersync<\/a> was introduced, it helped me cut down half of the shitty things I had to do in order to automate syncing between different browsers. Browsersync helps me with the following stuff;<\/p>\n<ul>\n<li>Injecting CSS changes without any web page getting reloaded<\/li>\n<li>Change the port and set up a tunnel through a random public URL, which means my teammates can access the dev branch live at my localhost in a matter of minutes<\/li>\n<li>Synced testing across different browsers, where I open the given URL at my Desktop, Laptop, Tab, and mobile to test same features in a single go with synced scroll, clicks, form inputs, etc. Watch the video at <a href=\"http:\/\/www.browsersync.io\/\">Browsersync<\/a>.<\/li>\n<\/ul>\n<h3 id=\"step-4-gulp-style-task\">Step #4: Gulp Style Task<a href=\"#step-4-gulp-style-task\" class=\"heading-link\">#<\/a><\/h3>\n<p>Let&#8217;s take a look at the <code>styles<\/code> task I built. In this task, there is a lot going on. We are compiling Sass, creating minified CSS and optimizing media queries.<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/78f19ed93102dfe6c3ef.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/78f19ed93102dfe6c3ef\">Gist<\/a>.<\/noscript><\/div>\n<p>Let me explain line by line, what&#8217;s going on in there<\/p>\n<ul>\n<li>L#1 &#8211; L#8 \u2014 I created the <code>styles<\/code> task<\/li>\n<li>L#9 \u2014 Here I provided the source of Sass file, which is a style.scss file present at <code>.\/assets\/css\/style.scss<\/code><\/li>\n<li>L#10 \u2014 Initiated plumber to avoid pipe breaking due to minor CSS errors when I save a file<\/li>\n<li>L#11 \u2014 Sourcemaps got initiated. A source map provides a way of mapping code within a compressed file back to its original position in a source file. This means that \u2013 with the help of a bit of software \u2013 you can easily debug your applications even after your assets have been optimized. The Chrome and Firefox developer tools both ship with built-in support for source maps.<\/li>\n<li>L#12 &#8211; L#20 \u2014 Sass is being compiled in compact format, you can read about <a href=\"https:\/\/web-design-weekly.com\/2014\/06\/15\/different-sass-output-styles\/\">Sass formats here<\/a><\/li>\n<li>L#23 \u2014 I am prefixing CSS with autoprefixer. The legacy browsers which should be supported are mentioned inside the arguments array<\/li>\n<li>L#26 \u2014 Here I have saved the final compiled CSS file for our WordPress theme in the root directory. Since style.scss was being compiled, the output will be <code>style.css<\/code> file. Now all you need to do is make sure you use a &#8220;!&#8221; in the comments at the top of the style.scss file so that, even when the compiling\/compressing happens, the comment remains: i.e. <code>\/*! Theme Name: Your Theme etc... *\/<\/code><\/li>\n<li>L#27 \u2014 I filtered all the .css files in the root directory, which at the moment is one <code>style.css<\/code> file<\/li>\n<li>L#28 \u2014 Combined the media queries inside selected files<\/li>\n<li>L#30 \u2014 Renamed the file to style.min.css<\/li>\n<li>L#31 &#8211; L#33 \u2014 Minified the style.min.css file<\/li>\n<li>L#34 \u2014 Output was saved as a style.min.css file in the root of WP theme folder<\/li>\n<\/ul>\n<h3 id=\"step-5-scripts-minification-and-concatenation\">Step #5: Scripts Minification and Concatenation<a href=\"#step-5-scripts-minification-and-concatenation\" class=\"heading-link\">#<\/a><\/h3>\n<p>Now to deal with custom JavaScript files and 3rd Party JS files, I have created two tasks called <code>vendorsJs<\/code> and <code>scriptsJs<\/code>. They both are pretty much similar. Let&#8217;s review the code.<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/ahmadawais\/48ec5b8737ae6a525b16.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/ahmadawais\/48ec5b8737ae6a525b16\">Gist<\/a>.<\/noscript><\/div>\n<p>Here is what&#8217;s happening in there<\/p>\n<ul>\n<li>I selected the vendor JS files paths with bower path at L#7 and the custom JS files paths at L#27<\/li>\n<li>Concatenated the files to two single files called vendors.js and custom.js<\/li>\n<li>Saved the output in <code>.\/assets\/js\/<\/code> folder<\/li>\n<li>Renamed the files to with .min suffix<\/li>\n<li>Minified\/uglified the files<\/li>\n<li>And saved two more files called <code>vendors.min.js<\/code> and <code>custom.js<\/code><\/li>\n<\/ul>\n<h3 id=\"step-6-image-optimization-task\">Step #6: Image Optimization Task<a href=\"#step-6-image-optimization-task\" class=\"heading-link\">#<\/a><\/h3>\n<p>There nothing new in the image optimization task. Look at the code below.<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/ahmadawais\/3d7dc71cd762508be58a.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/ahmadawais\/3d7dc71cd762508be58a\">Gist<\/a>.<\/noscript><\/div>\n<ul>\n<li>I selected the <code>.\/assets\/img\/raw\/**\/*.{png,jpg,gif}<\/code> path as a source<\/li>\n<li>Optimized the images and placed them in <code>.\/assets\/img\/<\/code> folder<\/li>\n<\/ul>\n<h3 id=\"step-7-building-a-clean-installable-theme-zip-file\">Step #7: Building a Clean Installable Theme Zip File<a href=\"#step-7-building-a-clean-installable-theme-zip-file\" class=\"heading-link\">#<\/a><\/h3>\n<p>This is a group of tasks which are responsible for creating a clean copy of installable theme zip file. Take a quick look at the code. There is nothing much to it, it is all basic copy pasting and deleting or ignoring of files\/folders.<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/ahmadawais\/b5059b1f17bf12c4f891.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/ahmadawais\/b5059b1f17bf12c4f891\">Gist<\/a>.<\/noscript><\/div>\n<p>This task will run only when I will use <code>gulp build<\/code> command. Let&#8217;s review what happens when this command is run<\/p>\n<ul>\n<li><strong>clear: <\/strong>Task to clear the gulp cache<\/li>\n<li><strong>cleanup: <\/strong>Task to remove sass-cache, bower_components and .DS_Store files in the stream. It also ignores the node_modules folder<\/li>\n<li><strong>cleanupFinal: <\/strong>Another cleanup task to be run at the end of build sequence. It may or may not have any difference from <code>cleanup<\/code> task<\/li>\n<li><strong>buildFiles: <\/strong>Build task that moves essential theme files to the buildTheme folder<\/li>\n<li><strong>buildImages: <\/strong>Task to build and copy the final set of images to the buildTheme folder<\/li>\n<li><strong>buildZip: <\/strong> Task to create an installable Zip file of the buildTheme folder<\/li>\n<li><strong>build: <\/strong>Main task which runs styles task to compile CSS then cleans up everything with a cleanup task. After that, it runs all the scripts related and build related tasks and a final cleanup task at the end to produce a theme zip file via buildTheme folder.<\/li>\n<\/ul>\n<h3 id=\"step-8-watch-task\">Step #8: Watch Task<a href=\"#step-8-watch-task\" class=\"heading-link\">#<\/a><\/h3>\n<p>Finally, there is a watch task which helps in automatically running the styles, scripts, images and browser-sync related tasks in case of any change that occurs in the below-mentioned folder.<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/ahmadawais\/d4a30d4f4179211feeac.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/ahmadawais\/d4a30d4f4179211feeac\">Gist<\/a>.<\/noscript><\/div>\n<h3 id=\"final-gulpfile-js\">Final gulpfile.js<a href=\"#final-gulpfile-js\" class=\"heading-link\">#<\/a><\/h3>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/ef1a2c390045c2bca9f5.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/ef1a2c390045c2bca9f5\">Gist<\/a>.<\/noscript><\/div>\n<h2 id=\"what-about-you\">What About You?<a href=\"#what-about-you\" class=\"heading-link\">#<\/a><\/h2>\n<p>Well, that&#8217;s about it. I&#8217;d love to see how you people use Gulp to automate front-end related grunt work. If you have any questions or any suggestions, let me know in the comment section below.<\/p>\n<p>I&#8217;d also like to mention and thank <a href=\"https:\/\/twitter.com\/chriscoyier\">Chris Coyer<\/a>, <a href=\"https:\/\/twitter.com\/alexjvasquez\">Alex Vasquez<\/a>, <a href=\"https:\/\/twitter.com\/mattbanks\">Matt Banks<\/a> and all the <a href=\"https:\/\/github.com\/gulpjs\/gulp\/graphs\/contributors\">Gulp contributors<\/a>, who have helped me along the way with their GPL\/MIT based code and contributions. Pull requests are welcomed.<\/p>\n<p>Did you like what you read? Tweet About <a href=\"https:\/\/twitter.com\/mrahmadawais\/status\/635616046498598912\" target=\"_blank\" rel=\"noopener\">Advanced Gulp Workflow for WordPress<\/a>.<\/p>\n<blockquote><p><em>JUST A NOTE!<\/em><br \/>\n\ud83d\udc68\u200d\ud83d\udcbb I&#8217;m teaching thousands of devs how to become <a href=\"https:\/\/VSCode.pro\/\" target=\"_blank\" rel=\"noopener\">VSCode Power Users<\/a> \u2192<br \/>\n\u2705 This site is super fast?! <a href=\"https:\/\/kinsta.com\/?kaid=WMDAKYHJLNJX&amp;utm_source=TheDevCouple&amp;utm_medium=Partner\">It&#8217;s hosted with Kinsta on Google servers \u2192<\/a><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>If you are an absolute beginner when it comes to Gulp, you might want to read Introducing WPGulp: An Easy to Use WordPress Gulp Boilerplate. Moreover, this post is just an article, which hasn&#8217;t been updated in a long time. I maintain this workflow under WPGulp repository. I suggest you all to read this post to get an idea and use WPGulp instead. If you are not using Gulp or any task runner, believe me when I say that you are missing out on all the front-end fun stuff. Today, I intend to share my advanced Gulp based automated workflow [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":884,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[181,10],"tags":[95,94,42],"class_list":["post-869","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","category-wordpress","tag-front-end-wp","tag-gulp","tag-wordpress-theme"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>My Advanced Gulp Workflow for WordPress Themes<\/title>\n<meta name=\"description\" content=\"Learn how an Advanced Gulp WordPress Workflow for themes can help you automate minification, concatenation and optimization of scripts.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"My Advanced Gulp Workflow for WordPress Themes\" \/>\n<meta property=\"og:description\" content=\"Learn how an Advanced Gulp WordPress Workflow for themes can help you automate minification, concatenation and optimization of scripts.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/\" \/>\n<meta property=\"og:site_name\" content=\"Ahmad Awais\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/AhmadAwais\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/AhmadAwais\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-23T19:17:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-16T12:45:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1439\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ahmad Awais\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MrAhmadAwais\" \/>\n<meta name=\"twitter:site\" content=\"@MrAhmadAwais\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ahmad Awais\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/\"},\"author\":{\"name\":\"Ahmad Awais\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"headline\":\"My Advanced Gulp Workflow for WordPress Themes\",\"datePublished\":\"2015-08-23T19:17:12+00:00\",\"dateModified\":\"2023-08-16T12:45:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/\"},\"wordCount\":2173,\"commentCount\":67,\"publisher\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"image\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg\",\"keywords\":[\"front-end wp\",\"gulp\",\"WordPress Theme\"],\"articleSection\":[\"JavaScript\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/\",\"name\":\"My Advanced Gulp Workflow for WordPress Themes\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg\",\"datePublished\":\"2015-08-23T19:17:12+00:00\",\"dateModified\":\"2023-08-16T12:45:05+00:00\",\"description\":\"Learn how an Advanced Gulp WordPress Workflow for themes can help you automate minification, concatenation and optimization of scripts.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg\",\"contentUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg\",\"width\":1439,\"height\":800,\"caption\":\"Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/my-advanced-gulp-workflow-for-wordpress-themes\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ahmadawais.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"My Advanced Gulp Workflow for WordPress Themes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#website\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/\",\"name\":\"Ahmad Awais\",\"description\":\"Founder &amp; CEO of CommandCode.ai f\\\/k\\\/a Langbase | Google Developers Advisory Board (gDAB) founding member\",\"publisher\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ahmadawais.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\",\"name\":\"Ahmad Awais\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"contentUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"width\":2299,\"height\":1705,\"caption\":\"Ahmad Awais\"},\"logo\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\"},\"description\":\"Founder & CEO of \u2318 Command Code coding agent with taste. Founded Langbase.com, AI cloud to build, deploy, and scale AI agents with tools & memory \u00b7 Creator of Command.new. \\\"Awais is an awesome example for developers\\\" \u2014 Satya Nadella, CEO of Microsoft. NASA Mars Ingenuity Helicopter mission code contributor 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer). Google Developers Expert Web DevRel. Ex VP Eng (DevTools & DevRel) Rapid \u00b7 Google Developers Advisory Board (gDAB) founding member \u00b7 AI\\\/ML\\\/DevTools Angel Investor (Replit, Resend, Daytona, Gumroad and you?) \u276f AI\\\/ML Advisory Board San Francisco, DevNetwork. Award-winning Open Source Engineering leader authored hundreds of open-source dev-tools and software libraries used by millions of developers, including Shades of Purple code theme and corona-cli. Linux Foundation (Node.js Committee Lead), OpenAPI Business Governing Board. Taught 108K+ developers via NodeCLI.com and VSCode.pro course. 274 million views, blogging for 24 yrs. \u276f Read more about Ahmad Awais or come say hi on \ud835\udd4f @MrAhmadAwais.\",\"sameAs\":[\"https:\\\/\\\/AhmadAwais.com\\\/\",\"https:\\\/\\\/facebook.com\\\/AhmadAwais\",\"https:\\\/\\\/instagram.com\\\/MrAhmadAwais\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/MrAhmadAwais\\\/\",\"https:\\\/\\\/x.com\\\/MrAhmadAwais\",\"https:\\\/\\\/youtube.com\\\/AhmadAwais\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"My Advanced Gulp Workflow for WordPress Themes","description":"Learn how an Advanced Gulp WordPress Workflow for themes can help you automate minification, concatenation and optimization of scripts.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/","og_locale":"en_US","og_type":"article","og_title":"My Advanced Gulp Workflow for WordPress Themes","og_description":"Learn how an Advanced Gulp WordPress Workflow for themes can help you automate minification, concatenation and optimization of scripts.","og_url":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/","og_site_name":"Ahmad Awais","article_publisher":"https:\/\/facebook.com\/AhmadAwais","article_author":"https:\/\/facebook.com\/AhmadAwais","article_published_time":"2015-08-23T19:17:12+00:00","article_modified_time":"2023-08-16T12:45:05+00:00","og_image":[{"width":1439,"height":800,"url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg","type":"image\/jpeg"}],"author":"Ahmad Awais","twitter_card":"summary_large_image","twitter_creator":"@MrAhmadAwais","twitter_site":"@MrAhmadAwais","twitter_misc":{"Written by":"Ahmad Awais","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/#article","isPartOf":{"@id":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/"},"author":{"name":"Ahmad Awais","@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"headline":"My Advanced Gulp Workflow for WordPress Themes","datePublished":"2015-08-23T19:17:12+00:00","dateModified":"2023-08-16T12:45:05+00:00","mainEntityOfPage":{"@id":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/"},"wordCount":2173,"commentCount":67,"publisher":{"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"image":{"@id":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/#primaryimage"},"thumbnailUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg","keywords":["front-end wp","gulp","WordPress Theme"],"articleSection":["JavaScript","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/","url":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/","name":"My Advanced Gulp Workflow for WordPress Themes","isPartOf":{"@id":"https:\/\/ahmadawais.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/#primaryimage"},"image":{"@id":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/#primaryimage"},"thumbnailUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg","datePublished":"2015-08-23T19:17:12+00:00","dateModified":"2023-08-16T12:45:05+00:00","description":"Learn how an Advanced Gulp WordPress Workflow for themes can help you automate minification, concatenation and optimization of scripts.","breadcrumb":{"@id":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/#primaryimage","url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg","contentUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg","width":1439,"height":800,"caption":"Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend"},{"@type":"BreadcrumbList","@id":"https:\/\/ahmadawais.com\/my-advanced-gulp-workflow-for-wordpress-themes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ahmadawais.com\/"},{"@type":"ListItem","position":2,"name":"My Advanced Gulp Workflow for WordPress Themes"}]},{"@type":"WebSite","@id":"https:\/\/ahmadawais.com\/#website","url":"https:\/\/ahmadawais.com\/","name":"Ahmad Awais","description":"Founder &amp; CEO of CommandCode.ai f\/k\/a Langbase | Google Developers Advisory Board (gDAB) founding member","publisher":{"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ahmadawais.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b","name":"Ahmad Awais","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","contentUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","width":2299,"height":1705,"caption":"Ahmad Awais"},"logo":{"@id":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg"},"description":"Founder & CEO of \u2318 Command Code coding agent with taste. Founded Langbase.com, AI cloud to build, deploy, and scale AI agents with tools & memory \u00b7 Creator of Command.new. \"Awais is an awesome example for developers\" \u2014 Satya Nadella, CEO of Microsoft. NASA Mars Ingenuity Helicopter mission code contributor 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer). Google Developers Expert Web DevRel. Ex VP Eng (DevTools & DevRel) Rapid \u00b7 Google Developers Advisory Board (gDAB) founding member \u00b7 AI\/ML\/DevTools Angel Investor (Replit, Resend, Daytona, Gumroad and you?) \u276f AI\/ML Advisory Board San Francisco, DevNetwork. Award-winning Open Source Engineering leader authored hundreds of open-source dev-tools and software libraries used by millions of developers, including Shades of Purple code theme and corona-cli. Linux Foundation (Node.js Committee Lead), OpenAPI Business Governing Board. Taught 108K+ developers via NodeCLI.com and VSCode.pro course. 274 million views, blogging for 24 yrs. \u276f Read more about Ahmad Awais or come say hi on \ud835\udd4f @MrAhmadAwais.","sameAs":["https:\/\/AhmadAwais.com\/","https:\/\/facebook.com\/AhmadAwais","https:\/\/instagram.com\/MrAhmadAwais\/","https:\/\/www.linkedin.com\/in\/MrAhmadAwais\/","https:\/\/x.com\/MrAhmadAwais","https:\/\/youtube.com\/AhmadAwais"]}]}},"jetpack_featured_media_url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2015\/08\/Advanced_Gulp_WordPress_Workflow_Ahmad-Awais-full-stack-dev-frontend.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/comments?post=869"}],"version-history":[{"count":5,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/869\/revisions"}],"predecessor-version":[{"id":7972,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/869\/revisions\/7972"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/media\/884"}],"wp:attachment":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/media?parent=869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/categories?post=869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/tags?post=869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}