Updates before the Bristol Software meetup

This commit is contained in:
Oliver Davies 2023-02-16 11:39:19 +00:00
parent e392af7acf
commit 7dd48f3880
29 changed files with 1594 additions and 398 deletions

View file

@ -2,77 +2,32 @@
.. class:: centredtitle
Keeping Things Small: Controlling the File size
Keeping Things Small: Controlling the file size
.. page:: titlePage
.. class:: centredtitle
Disabling unused variants and core plugins
.. page:: standardPage
Default variants
================
.. code-block:: javascript
:include: code/15-variants-before.txt
Updated variants
================
.. code-block:: diff
:include: code/16-variants-after.txt
.. page:: titlePage
.. class:: centredtitle
Manually removing unused or unwanted classes
.. page:: standardPage
.. code-block:: javascript
:include: code/17-config-before.txt
.. page::
.. code-block:: diff
:include: code/18-config-after.txt
Just in Time (JIT mode)
.. raw:: pdf
TextAnnotation "Needs to be done manually"
.. page:: titlePage
.. class:: centredtitle
Automatically removing unused classes
.. page::
.. class:: centredtitle
Tailwind + PurgeCSS
TextAnnotation "Since the JIT mode was added and changed to be the default option, Tailwind only generates the classes that it needs to - i.e. only the classes in your HTML."
.. page:: standardPage
PurgeCSS configuration
======================
Content
=======
Tell Tailwind where it should look for utility classes.
|
.. code-block:: javascript
:include: code/19-purge-config.txt
:linenos:
:include: code/tailwind-config-content.js
.. page:: titlePage
.. raw:: pdf
.. class:: centredtitle
``npx encore dev``
.. page::
.. class:: centredtitle
``NODE_ENV=production
npx encore prod``
TextAnnotation "Tailwind will scan the files within the content array and "