You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Gulp + WordPress
2
2
3
-
Version: 2.0.9
3
+
Version: 2.1.0
4
4
5
5
## Author
6
6
@@ -16,15 +16,15 @@ The theme has been built according to [WordPress Coding Standards](https://make.
16
16
17
17
*Gulp + WordPress* is packaged with Gulp v4 for watching, compiling, and minifying SCSS and JS files.
18
18
19
-
A selection of helpful mixins is also included, most of which are featured in [this useful article](http://zerosixthree.se/8-sass-mixins-you-must-have-in-your-toolbox/) by [@seb_ekstrom](https://twitter.com/seb_ekstrom).
19
+
Any SCSS files that are made alongside `core.scss` will be turned into individual CSS files, which could, for example, then be used for Gutenberg blocks.
20
20
21
21
You may also write your JavaScript in ES6 – The Gulp scripts task utilises [Babel](https://babeljs.io/), so you can use new syntax without worrying about browser support.
22
22
23
23
## Installation
24
24
25
25
Clone the project into `wp-content/themes` and rename it accordingly.
26
26
27
-
You’ll want to update `style.css` in the theme root with all the relevant bits of information, as well as `assets/package.json` (specifically `name` and `author`) and lastly `assets/gulpfile.js` (change the `themePrefix` variable accordingly).
27
+
You’ll want to update `style.css` in the theme root with all the relevant bits of information, as well as `assets/package.json` (specifically `name` and `author`).
28
28
29
29
Now, in Terminal, `cd` into the `assets` directory and install the Gulp packages (if you haven't already installed Gulp, you’ll need to [do so](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md) first):
30
30
@@ -34,9 +34,9 @@ Once you have installed the packages, in Terminal and while still in the `assets
34
34
35
35
SCSS files in `assets/scss/` are compiled and minified over to `assets/css`.
36
36
37
-
JavaScript files in `assets/js/scripts/` are uglified, concatenated and sent over to `assets/js/`.
38
-
39
-
> Note: If you would like to specify scripts per WordPress template (e.g. posts, pages etc.), you can tweak the `js` Gulp task to create separate JavaScript files.
37
+
JavaScript files in `assets/js/src` are packaged over to `assets/js/dist`.
38
+
It’s possible to add JS files to the `srcJsCoreFiles` var in `gulpfile.js`. These files will then be included in the packaged `core.min.js` file.
39
+
You can also add JS files in `assets/js/src/components`, however these will not be concatenated and will instead be minified into individual JS files – this is useful if you need to split out your JS for Gutenberg blocks, or, say, have JS load on a particular archive template.
0 commit comments