Skip to content

Commit a9e839c

Browse files
Add contributing.txt files for npm usage
Co-authored-by: Aaron Jorbin <[email protected]>
1 parent 8ceb867 commit a9e839c

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
=== Contributing to Twenty Twenty-Five ===
2+
3+
= Minifying CSS =
4+
5+
Twenty Twenty-Five has a single stylesheet `style.css` which is enqueued in addition to the global styles coming from core. On a normal production site, when `SCRIPT_DEBUG` is disabled, then the minified version `style.min.css` will be enqueued instead. If you make a change to `style.css`, you'll need to re-minify the `style.min.css` using the built-in npm build tool. As always, it is preferable to use the Site Editor to supply Additional CSS instead of directly editing the theme stylesheet.
6+
7+
Installation instructions
8+
9+
1. Using a command line interface, go to the “twentytwentyfive” directory `cd /my-computer/local-wordpress-install/src/wp-content/themes/twentytwentyfive`.
10+
11+
2. Type `npm install` into the command line, and press the [return] key, to install all Node.js dependencies.
12+
13+
3. The dependencies may take a few minutes to download but once it completes, you’re done.
14+
15+
Usage instructions
16+
17+
1. After making a change to the `style.css` file, run `npm run build` from within the theme directory to regenerate `style.min.css` with your new changes.
18+
19+
2. You can also “watch” the theme directory for CSS changes and re-minify the CSS anytime a change occurs by running: `npm run watch`.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
=== Contributing to Twenty Twenty-Two ===
2+
3+
= Minifying CSS =
4+
5+
Twenty Twenty-Two has a single stylesheet `style.css` which is enqueued in addition to the global styles coming from core. On a normal production site, when `SCRIPT_DEBUG` is disabled, then the minified version `style.min.css` will be enqueued instead. If you make a change to `style.css`, you'll need to re-minify the `style.min.css` using the built-in npm build tool. As always, it is preferable to use the Site Editor to supply Additional CSS instead of directly editing the theme stylesheet.
6+
7+
Installation instructions
8+
9+
1. Using a command line interface, go to the “twentytwentytwo” directory `cd /my-computer/local-wordpress-install/src/wp-content/themes/twentytwentytwo`.
10+
11+
2. Type `npm install` into the command line, and press the [return] key, to install all Node.js dependencies.
12+
13+
3. The dependencies may take a few minutes to download but once it completes, you’re done.
14+
15+
Usage instructions
16+
17+
1. After making a change to the `style.css` file, run `npm run build` from within the theme directory to regenerate `style.min.css` with your new changes.
18+
19+
2. You can also “watch” the theme directory for CSS changes and re-minify the CSS anytime a change occurs by running: `npm run watch`.

0 commit comments

Comments
 (0)