laipower/wp-content/themes/twentynineteen/contributing.txt

20 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

=== Contributing to Twenty Nineteen ===
= Compiling SCSS =
Twenty Nineteen relies on Sass, which allows us to more easily share code between multiple stylesheets (style.css, style-editor.css, etc.). To compile Sass files (.scss), use the built-in npm build tool. The build tool will make sure that your compiled CSS code stays in sync and has the correct formatting.
Installation instructions
1. Using a command line interface, go to the “twentynineteen” directory `cd /my-computer/local-wordpress-install/src/wp-content/themes/twentynineteen`.
2. Type `npm install` into the command line, and press the [return] key, to install all Node.js dependencies.
3. The dependencies may take a few minutes to download but once it completes, youre done.
Usage instructions
1. After making a change to a .scss file, run `npm run build` from within the theme directory to build the CSS files with your new changes. You may need to run the build command twice to update style-rtl.css (because the RTL process might update from style.css before that is updated from Sass file changes).
2. You can also “watch” the theme directory for Sass changes and rebuild the CSS anytime a change occurs by running: `npm run watch`.