<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andrew Del Prete on Medium]]></title>
        <description><![CDATA[Stories by Andrew Del Prete on Medium]]></description>
        <link>https://medium.com/@AndrewDelPrete?source=rss-fe78e0219068------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QGCVaBVbGh78QZ7EMJ1Wtg.png</url>
            <title>Stories by Andrew Del Prete on Medium</title>
            <link>https://medium.com/@AndrewDelPrete?source=rss-fe78e0219068------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 19:56:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@AndrewDelPrete/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Outcomes over Outputs — Book Review]]></title>
            <link>https://medium.com/@AndrewDelPrete/outcomes-over-outputs-book-review-99be1dc31bd?source=rss-fe78e0219068------2</link>
            <guid isPermaLink="false">https://medium.com/p/99be1dc31bd</guid>
            <dc:creator><![CDATA[Andrew Del Prete]]></dc:creator>
            <pubDate>Fri, 06 Mar 2020 23:42:22 GMT</pubDate>
            <atom:updated>2020-10-04T23:31:12.375Z</atom:updated>
            <content:encoded><![CDATA[<h3>Outcomes over Output— Book Review</h3><p>Post moved to my personal blog: <a href="https://www.andrewdelprete.dev/posts/outcomes-over-outputs-book-review">https://www.andrewdelprete.dev/posts/outcomes-over-outputs-book-review</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99be1dc31bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Holistic 1-on-1s]]></title>
            <link>https://medium.com/@AndrewDelPrete/holistic-1-on-1s-89180a053910?source=rss-fe78e0219068------2</link>
            <guid isPermaLink="false">https://medium.com/p/89180a053910</guid>
            <dc:creator><![CDATA[Andrew Del Prete]]></dc:creator>
            <pubDate>Fri, 31 Jan 2020 22:16:26 GMT</pubDate>
            <atom:updated>2020-10-04T23:32:52.004Z</atom:updated>
            <content:encoded><![CDATA[<p>Post moved to my personal blog:<br><a href="https://www.andrewdelprete.dev/posts/holistic-1-on-1s">https://www.andrewdelprete.dev/posts/holistic-1-on-1s</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89180a053910" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Infinite Game — Book Review]]></title>
            <link>https://medium.com/@AndrewDelPrete/the-infinite-game-book-review-b911aff50ebf?source=rss-fe78e0219068------2</link>
            <guid isPermaLink="false">https://medium.com/p/b911aff50ebf</guid>
            <category><![CDATA[simon-sinek]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Andrew Del Prete]]></dc:creator>
            <pubDate>Fri, 24 Jan 2020 20:12:21 GMT</pubDate>
            <atom:updated>2020-10-04T23:34:16.056Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Infinite Game — Book Review</h3><p>This post has been moved to my personal blog:<br><a href="https://www.andrewdelprete.dev/posts/the-infinite-game-book-review">https://www.andrewdelprete.dev/posts/the-infinite-game-book-review</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b911aff50ebf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Refactoring — Book Review]]></title>
            <link>https://medium.com/@AndrewDelPrete/refactoring-book-review-2d5ce6cd6f97?source=rss-fe78e0219068------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d5ce6cd6f97</guid>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Andrew Del Prete]]></dc:creator>
            <pubDate>Sat, 04 Jan 2020 05:18:52 GMT</pubDate>
            <atom:updated>2020-10-04T23:34:55.396Z</atom:updated>
            <content:encoded><![CDATA[<h3>Refactoring — Book Review</h3><p>This post has been moved to my personal blog:<br><a href="https://www.andrewdelprete.dev/posts/refactoring-book-review">https://www.andrewdelprete.dev/posts/refactoring-book-review</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d5ce6cd6f97" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reframing Worry]]></title>
            <link>https://medium.com/@AndrewDelPrete/reframing-worry-8691004466f?source=rss-fe78e0219068------2</link>
            <guid isPermaLink="false">https://medium.com/p/8691004466f</guid>
            <category><![CDATA[life-lessons]]></category>
            <dc:creator><![CDATA[Andrew Del Prete]]></dc:creator>
            <pubDate>Thu, 02 Jan 2020 14:56:11 GMT</pubDate>
            <atom:updated>2020-10-04T23:35:53.455Z</atom:updated>
            <content:encoded><![CDATA[<p>This post has been moved to my personal blog:<br><a href="https://www.andrewdelprete.dev/posts/reframing-worry">https://www.andrewdelprete.dev/posts/reframing-worry</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8691004466f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Radical Candor]]></title>
            <link>https://medium.com/andrewdelprete/radical-candor-48e2655ba9c6?source=rss-fe78e0219068------2</link>
            <guid isPermaLink="false">https://medium.com/p/48e2655ba9c6</guid>
            <category><![CDATA[management]]></category>
            <category><![CDATA[radical-candor]]></category>
            <dc:creator><![CDATA[Andrew Del Prete]]></dc:creator>
            <pubDate>Fri, 14 Dec 2018 23:16:32 GMT</pubDate>
            <atom:updated>2020-10-04T23:37:02.515Z</atom:updated>
            <content:encoded><![CDATA[<p>This post has been moved to my personal blog:<br><a href="https://www.andrewdelprete.dev/posts/radical-candor-book-review">https://www.andrewdelprete.dev/posts/radical-candor-book-review</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48e2655ba9c6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewdelprete/radical-candor-48e2655ba9c6">Radical Candor</a> was originally published in <a href="https://medium.com/andrewdelprete">andrewdelprete</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finding my Strengths]]></title>
            <link>https://medium.com/andrewdelprete/finding-my-strengths-5dc3e4215587?source=rss-fe78e0219068------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dc3e4215587</guid>
            <dc:creator><![CDATA[Andrew Del Prete]]></dc:creator>
            <pubDate>Wed, 28 Nov 2018 00:30:02 GMT</pubDate>
            <atom:updated>2020-10-04T23:38:02.587Z</atom:updated>
            <content:encoded><![CDATA[<p>This post has been moved to my personal blog:<br><a href="https://www.andrewdelprete.dev/posts/finding-my-strengths">https://www.andrewdelprete.dev/posts/finding-my-strengths</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dc3e4215587" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewdelprete/finding-my-strengths-5dc3e4215587">Finding my Strengths</a> was originally published in <a href="https://medium.com/andrewdelprete">andrewdelprete</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using TailwindCSS with CSS-in-JS]]></title>
            <link>https://medium.com/andrewdelprete/using-tailwindcss-with-css-in-js-32ae6796f95c?source=rss-fe78e0219068------2</link>
            <guid isPermaLink="false">https://medium.com/p/32ae6796f95c</guid>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css-in-js]]></category>
            <category><![CDATA[babel]]></category>
            <category><![CDATA[atomic-css]]></category>
            <dc:creator><![CDATA[Andrew Del Prete]]></dc:creator>
            <pubDate>Mon, 27 Nov 2017 23:03:38 GMT</pubDate>
            <atom:updated>2017-12-04T02:06:26.272Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XMWEKiE65Zr03h8Z1hnhVg.jpeg" /></figure><h3>Update 2— Dec 3, 2017</h3><p>After a bit of exploration, it looks like <a href="https://github.com/andrewdelprete/babel-plugin-tailwind">babel-plugin-tailwind</a> does indeed work with Vue! The problem stemmed from how Glamor injects styles. <a href="https://github.com/emotion-js/emotion">Emotion</a> and <a href="https://github.com/typestyle/csx">CSX</a> seem to work fine!</p><p>Obviously this isn’t the native &lt;style&gt;&lt;/style&gt; syntax that comes with Vue, but it’s an option if you want to pull in Tailwind in via CSS-in-JS.</p><p>Template:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/22fb261cbdb6056ba71170e25062add5/href">https://medium.com/media/22fb261cbdb6056ba71170e25062add5/href</a></iframe><p>JSX:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ebeec40fdea890a9fcb57cd4a571f99e/href">https://medium.com/media/ebeec40fdea890a9fcb57cd4a571f99e/href</a></iframe><h3>Update — Dec 1, 2017</h3><p>In my post, I mentioned <a href="https://github.com/andrewdelprete/babel-plugin-tailwind">babel-plugin-tailwind</a> doesn’t work with Emotion or <a href="https://github.com/styled-components/styled-components">Styled Components</a> yet. However, it looks like <a href="https://github.com/emotion-js/emotion">Emotion</a> has the ability to use JavaScript objects and works fine with the plugin.</p><p>I’ve added an example of how to do this in the repo using <a href="https://github.com/emotion-js/emotion/tree/master/packages/react-emotion">react-emotion</a>.</p><p><a href="https://github.com/andrewdelprete/babel-plugin-tailwind/blob/master/example/src/App.js#L20">https://github.com/andrewdelprete/babel-plugin-tailwind/blob/master/example/src/App.js#L20</a></p><p>At the beginning of 2017 I put together a small list of technologies I wanted to explore and grow in. Topics like Performance, PWAs, Vue, AdonisJS, Webpack, CSS-in-JS, and many more.</p><p>JavaScript is never ending.</p><p>One of the items on my list is to write a <a href="https://www.babeljs.io/">Babel</a> plugin. I didn’t have any ideas during the year but it dawned on me when writing my previous post <a href="https://medium.com/@AndrewDelPrete/using-purifycss-to-remove-unused-tailwind-css-classes-173b3ee8ee01">Using PurifyCSS to Remove Unused TailwindCSS Classes</a> that I should try to convert <a href="https://tailwindcss.com/">TailwindCSS</a> to something we can leverage with a CSS-in-JS library such as <a href="https://github.com/paypal/glamorous">Glamorous</a>.</p><p>If you haven’t heard some of the benefits of CSS-in-JS checkout this amazing writeup by <a href="https://medium.com/u/d7225e72eea">Mark Dalgleish</a>:</p><p><a href="https://medium.com/seek-blog/a-unified-styling-language-d0c208de2660">https://medium.com/seek-blog/a-unified-styling-language-d0c208de2660</a></p><h3>Earlier this year…</h3><p>In early 2017, I created an Atomic CSS-in-JS utility library based on <a href="http://buildwithbeard.com/">BeardCSS</a> called <a href="https://www.neckbeardjs.com/">NeckbeardJS</a>.</p><p>Neckbeard was my first experiment with trying to merge Atomic CSS and CSS-in-JS. I actually spent a lot of time on it upfront but it doesn’t get much of my attention anymore.</p><p>Using React it would look something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/69b70c8ccf207e40ec25345d13f82806/href">https://medium.com/media/69b70c8ccf207e40ec25345d13f82806/href</a></iframe><p>The solution was pretty elegant IMO, but the approach I took with Neckbeard had the downside of a very heavy runtime. The library generates an object of around 10,000 selector properties on page load and has a function to reference each selector.</p><p>The problem is that this object has to be created by the browser and stored in memory to be referenced by the <strong>nb(classes)</strong> function. This defeats one of the many benefits of CSS-in-JS, which is to only load the styles used on the page.</p><p>Just like the performance hit of having 10,000 unused CSS selectors, I was running into the same issue with Neckbeard, but in JavaScript instead.</p><p>It needed to be better if it was going to be usable so instead of trying to rewrite Neckbeard, I decided to take a different approach with TailwindCSS instead.</p><h3>Introducing babel-plugin-tailwind</h3><p>After digging through the <a href="https://github.com/thejameskyle/babel-handbook">babel-handbook</a> and reviewing lots of <a href="https://github.com/babel/awesome-babel">awesome examples</a>, I finally felt like I could grasp Babel and ASTs enough to convert a string of TailwindCSS classes to a corresponding style object at build time. In other words, we wouldn’t make the browser generate all the necessary styles properties, but we would do it upfront at build time with a Babel plugin.</p><p><a href="https://github.com/andrewdelprete/babel-plugin-tailwind">https://github.com/andrewdelprete/babel-plugin-tailwind</a></p><h4>Example using Glamor 💅</h4><p><strong>Before build</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe99c3d9215f1c471db0129b86736663/href">https://medium.com/media/fe99c3d9215f1c471db0129b86736663/href</a></iframe><p><strong>After build</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/960ef5c75c9d2d9d4271d5d589c5dead/href">https://medium.com/media/960ef5c75c9d2d9d4271d5d589c5dead/href</a></iframe><p>The babel plugin will look for the function <strong>tw(classes), </strong>reference the corresponding TailwindCSS style properties, and replace the whole expression with an object to serve to the user. In this example I use Glamor but you could easily use Glamorous or other CSS-in-JS library that utilizes the same object syntax for styles.</p><h4>Example using Glamorous 💄</h4><p><strong>Before build</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4eacec79e590de1dd5bcf6af0d091600/href">https://medium.com/media/4eacec79e590de1dd5bcf6af0d091600/href</a></iframe><p><strong>After build</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1156e369ead03b11ead4e3eca755cbf0/href">https://medium.com/media/1156e369ead03b11ead4e3eca755cbf0/href</a></iframe><p>Pretty nifty right? I felt like a JavaScript demigod once I figured out how ASTs work. This approach allows us to leverage the utility class power TailwindCSS provides but only serve the user what is being used on the page. It also allows us to use these great component based tools like Glamorous for making our code more explicit.</p><p>Here’s a slightly more complicated component I borrowed from the TailwindCSS docs and built using Glamorous and babel-plugin-tailwind.</p><p><strong>Example</strong>: <a href="https://dist-zzostutvon.now.sh/">https://dist-zzostutvon.now.sh/</a><br><strong>Code</strong>: <a href="https://github.com/andrewdelprete/babel-plugin-tailwind/blob/master/example/src/App.js">https://github.com/andrewdelprete/babel-plugin-tailwind/blob/master/example/src/App.js</a></p><h3>Installation</h3><p>I provided some brief instructions on how to get started with the <strong>babel-plugin-tailwind </strong>over at <a href="https://github.com/andrewdelprete/babel-plugin-tailwind">https://github.com/andrewdelprete/babel-plugin-tailwind</a>. There are a few undocumented features I still need to write about and will be sure to let everyone know once they’re fleshed out.</p><h3>Contributions</h3><p>There are a few technical hurdles to figure out:</p><p>The babel plugin converts a string of TailwindCSS classes to an object. However, libraries like *<a href="https://github.com/emotion-js/emotion">emotion</a> (See update above) and <a href="https://github.com/styled-components/styled-components">styled components</a> require a string of traditional CSS properties to work properly.</p><p>I also haven’t figured out how to make this work with Vue yet. Vue has it’s own way of doing CSS-in-JS which I’m not sure if it can be leveraged or not.</p><p>Server-side Rendering is another item on the list. I believe this shouldn’t be too difficult as long as the source is ran through babel first.</p><p>If you’d like to contribute to the project, please say hello and open a PR!</p><h3>Closing thoughts</h3><p>I believe the ability to inject Tailwind’s predefined classes in CSS-in-JS can be a huge win. Having consistent font sizes, grid widths, spacing, colors, and breakpoints can help make your codebase more uniformed. Plus, the added bonus of these classes being replaced with an object at build time makes things nice and snappy for the end-user.</p><h3>Shameless Plug</h3><p>I’ve recently recorded a few video series covering JavaScript Promises and Async / Await. Please feel free to check them out at <a href="http://www.fivemindev.com/">www.fivemindev.com</a>! There’s a 50% off sale until the end of November, 2017.</p><p>Also, If you’re interested in learning more about some easy performance wins, I’ve written a few articles on <a href="http://www.learnperf.com/">www.learnperf.com</a>.</p><p>Thanks for reading!<br>-Andrew Del Prete</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32ae6796f95c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewdelprete/using-tailwindcss-with-css-in-js-32ae6796f95c">Using TailwindCSS with CSS-in-JS</a> was originally published in <a href="https://medium.com/andrewdelprete">andrewdelprete</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using PurifyCSS to remove unused Tailwind CSS classes]]></title>
            <link>https://medium.com/andrewdelprete/using-purifycss-to-remove-unused-tailwind-css-classes-173b3ee8ee01?source=rss-fe78e0219068------2</link>
            <guid isPermaLink="false">https://medium.com/p/173b3ee8ee01</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <dc:creator><![CDATA[Andrew Del Prete]]></dc:creator>
            <pubDate>Sat, 18 Nov 2017 05:45:07 GMT</pubDate>
            <atom:updated>2017-11-27T17:37:04.559Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rgEN8Y39WCponFprHx9IYQ.jpeg" /></figure><h3>Update 2! — Nov 19, 2017</h3><p>Good news! After some digging around, I found another library called <a href="https://github.com/FullHuman/purgecss">PurgeCSS</a> that is more flexible and frequently maintained than PurifyCSS. It allows for custom “Extractors” which lets us write some regex to work with Tailwind CSS classes. A shout to the <a href="https://github.com/FullHuman">author</a> who made some <a href="https://github.com/FullHuman/purgecss/issues/15">quick fixes</a> to make this work with Tailwind CSS style syntax.</p><p><strong>Laravel Mix Example:</strong> <a href="https://gist.github.com/andrewdelprete/277a5a2af33aea2481c54a6a8b35d6c3">https://gist.github.com/andrewdelprete/277a5a2af33aea2481c54a6a8b35d6c3</a></p><p><strong>Webpack Example:<br></strong><a href="https://gist.github.com/andrewdelprete/d2f44d0c7f120aae1b8bd87cbf0e3bc8">https://gist.github.com/andrewdelprete/d2f44d0c7f120aae1b8bd87cbf0e3bc8</a></p><h3><strong>Update! — </strong>Nov 18, 2017</h3><p><strong>PurifyCSS has an issue where classes containing numbers appended to the end and special characters like : are not cleaned up / purified.</strong></p><p>In my original post, I only used the handful of classes found in the Tailwind webpack-starter index.html file. There was a huge reduction in CSS size but once you utilize more classes in your HTML that figure quickly diminishes.</p><p><strong>Issue</strong>: <a href="https://github.com/purifycss/purifycss/issues/147">https://github.com/purifycss/purifycss/issues/147</a></p><p>There is a PurifyCSS fork called purifycss-extended which fixes this issue but can only be used via the CLI at the moment. Hopefully the purifycss maintainer fixes the issue for us!</p><p><strong>Fork</strong>: <a href="https://github.com/HapLifeMan/purifycss-extended">https://github.com/HapLifeMan/purifycss-extended</a></p><p>If you’ve jumped on the Atomic CSS bandwagon you’re probably enjoying the flexibility of those tiny magical helper classes. There are many great libraries out there: <a href="http://tachyons.io/">Tachyons</a>, <a href="http://basscss.com/">BassCSS</a>, <a href="http://buildwithbeard.com/">BeardCSS</a>, to name a few, and the newest kid on the block, <a href="https://tailwindcss.com/">TailwindCSS</a>, which we’ll be using during this post.</p><p>Something often overlooked is the sheer amount of utility classes which these libraries output. There is literally a class for almost everything imaginable; various font sizes, colors, spacing, etc… and most of these utilities come with media query variations.</p><p>Tailwind, like many utility class approaches, is nearly 15,000 lines of CSS and is about 217kb in size (unzipped + un-minified).</p><blockquote>The majority of the CSS you send to the user will never be seen even though they still have to download and parse it.</blockquote><p>Unused CSS may not be a big deal for your target market, but if you get a lot of mobile traffic I highly suggest the following approach to help clean up some of those unused classes.</p><h3>Enter PurifyCSS* (See updates above)</h3><blockquote>A function that takes content (HTML/JS/PHP/etc) and CSS, and returns only the used CSS. -purifycss</blockquote><p><a href="https://github.com/purifycss/purifycss">https://github.com/purifycss/purifycss</a></p><p>PurifyCSS is a great tool for cleaning up your CSS. It can be used with most common build tools such as Gulp, Grunt, Webpack, Laravel Mix, or via the CLI.</p><p>For this post, I’m using the Tailwind <a href="https://github.com/tailwindcss/webpack-starter">webpack-starter</a> and adding the <a href="https://github.com/webpack-contrib/purifycss-webpack">purifycss-webpack</a> plugin to my `webpack.config.js` file that comes with the starter.</p><pre>// webpack.config.js</pre><pre>plugins: [<br>  new ExtractTextPlugin(&quot;styles.css&quot;),<br>  new PurifyCSSPlugin({<br>     paths: glob.sync([path.join(__dirname, &quot;/dist/*.html&quot;)])<br>  })<br>]</pre><p>When using Webpack, PurifyCSS will take the full utility class output of styles.css and compare it with the set of files you specify. You can use the glob-all NPM module to pass an array of file glob types. If you’re using templating language Laravel Blade, you could pass a glob of your *.blade.php files.</p><p>As the PurifyCSS documentation indicates, you can pass many file types to the plugin and it magically filters out what you’re not using. <strong>It even works with dynamically created classes in your Javascript files.</strong></p><p>Here’s what it might look like with Laravel Mix:</p><pre>// webpack.mix.js<br>mix.options({ purifyCss: true });</pre><h3><strong>Size Comparison</strong></h3><p>After running PurifyCSS on the Tailwind starter:</p><p><strong>Before</strong> — 15,000 lines and 217kb (unzipped + un-minified)<br><strong>After</strong> — 3,500 lines at 51kb (unzipped + un-minified)</p><p>That’s about 4x smaller!</p><h3>Summary</h3><p>As web developers, our job is not only to provide a beautiful application to our users but to make sure we’re delivering a “silky smooth” experience.</p><p>Limiting the amount of CSS we’re sending down the wire is one way to speed up initial render time (less to download + parse). Tools like Tailwind provide a ton of amazing helper classes to help us develop rapidly. PurifyCSS is there to clean up the excess unused classes.</p><h3>Shameless Plug</h3><p>I’ve recently recorded a few video series covering JavaScript Promises and Async / Await. Please feel free to check them out at <a href="http://www.fivemindev.com/">www.fivemindev.com</a>!</p><p>Also, If you’re interested in learning more about some easy performance wins, I’ve written a few articles on <a href="http://www.learnperf.com/">www.learnperf.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=173b3ee8ee01" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewdelprete/using-purifycss-to-remove-unused-tailwind-css-classes-173b3ee8ee01">Using PurifyCSS to remove unused Tailwind CSS classes</a> was originally published in <a href="https://medium.com/andrewdelprete">andrewdelprete</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Async / Await — Coming Oct 23, 2017!]]></title>
            <link>https://medium.com/andrewdelprete/async-await-coming-oct-23-2017-2bab8d3f087e?source=rss-fe78e0219068------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bab8d3f087e</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Andrew Del Prete]]></dc:creator>
            <pubDate>Thu, 19 Oct 2017 07:00:00 GMT</pubDate>
            <atom:updated>2018-04-29T19:40:55.684Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m excited to announce that my Async / Await video series is nearing completion and will launch October 23! I’m very happy on how it’s turning out and I think there is something for everybody in there.</p><p>I’ve learned a ton about Promises while also advancing my understanding of recording great screencasts. I took the feedback from many of you and applied it to my latest series on Async / Await. My hope as always is that you’ll come away with something you can utilize immediately.</p><p>There are a few misconceptions about Async / Await in that some believe it replaces Promises altogether. Async / Await actually uses Promises under the hood and you should have a fundamental understanding of Promises before jumping into Async / Await head first.</p><p>I definitely recommend checking out the <a href="http://fivemindev.com/">Promises Series</a> before watching the Async / Await series</p><p><strong>Purchase at </strong><a href="http://www.fivemindev.com/"><strong>fivemindev.com</strong></a></p><p>Thanks,<br> Andrew</p><p><em>Originally published at </em><a href="http://andrewdelprete.com/blog/async-await-prelaunch/"><em>andrewdelprete.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bab8d3f087e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewdelprete/async-await-coming-oct-23-2017-2bab8d3f087e">Async / Await — Coming Oct 23, 2017!</a> was originally published in <a href="https://medium.com/andrewdelprete">andrewdelprete</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>