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
+5-94
Original file line number
Diff line number
Diff line change
@@ -12,105 +12,16 @@ Prelude uses Gulp to:
12
12
13
13
### WordPress Functions
14
14
Prelude has some nifty features built into `functions.php` to make developing a custom WordPress theme a little easier.
15
-
- Defer jQuery Parsing using the HTML5 defer property
16
-
- Customized Read More Links
17
-
-[Get Featured image as URL](https://github.com/factor1/prelude-wp/wiki/Get-Featured-Image-As-URL)
18
-
- Other various improvements to default WordPress functions that are too long and/or small to list here, check 'em out!
19
15
20
16
## Getting Started
21
17
Prelude requires that you have Node and npm installed on your machine. If you need help with that, please visit the [npm documentation](https://docs.npmjs.com/getting-started/installing-node).
22
18
23
-
1. Install Prelude into your project using `npm install prelude-wp --save` and copy all theme files to your root directory. **NOTE: As of `3.3.9` Prelude no longer automatically moves theme files into your root directory.**
24
-
2. Using the `theme` variable found in `gulpfile.js` name your theme. This is only used for packaging purposes and is not critical (Don't forget to also fill out the theme information found in `style.css` in the root)
25
-
3. Run the default Gulp task while editing files using `gulp` or `gulp default`
19
+
**Via npm:**
20
+
`npm install prelude-wp --save`
26
21
27
-
28
-
## File Structure
29
-
You can modify the file structure however you like as long as it is also updated in `gulpfile.js`. Of course your project files may vary. By default it is as follows:
30
-
31
-
```
32
-
.
33
-
├── .editorconfig
34
-
├── .gitignore
35
-
├── .jshintrc
36
-
├── 404.php
37
-
├── CHANGELOG.md
38
-
├── README.md
39
-
├── archive.php
40
-
├── /assets
41
-
| ├── /js
42
-
| | └── theme.js
43
-
| └── /scss
44
-
| ├── /components
45
-
| | ├── _footer.scss
46
-
| | ├── _header.scss
47
-
| | └── _social-menu.scss
48
-
| ├── /globals
49
-
| | ├── _global.scss
50
-
| | ├── _typography.scss
51
-
| | └── _wordpress.scss
52
-
| ├── /mixins
53
-
| | └── _sugar.scss
54
-
| ├── /plugins
55
-
| | └── _overrides.scss
56
-
| ├── /settings
57
-
| | └── _variables.scss
58
-
| └── theme.scss
59
-
├── footer.php
60
-
├── functions.php
61
-
├── gulpfile.js
62
-
├── header.php
63
-
├── /inc
64
-
| ├── custom-post-types.php
65
-
| ├── enqueues.php
66
-
| ├── menus.php
67
-
| ├── shortcodes.php
68
-
| ├── thumbnails.php
69
-
| ├── tweaks.php
70
-
| └── widgets.php
71
-
├── index.php
72
-
├── package.json
73
-
├── page.php
74
-
├── /parts
75
-
| ├── meta.php
76
-
| └── post-nav.php
77
-
├── screenshot.png
78
-
├── search.php
79
-
├── sidebar.php
80
-
├── single.php
81
-
└── style.css
82
-
```
83
-
84
-
## Setting your default compile paths in Gulp
85
-
We have created variables to hold an array of your desired paths. This makes it so that you only need to update paths in one location. These variables are then passed into the Gulp tasks for processing.
86
-
87
-
The variables are:
88
-
-`phpFiles` - accepts an array of .php files
89
-
-`htmlFiles` - accepts an array of .html files
90
-
-`cssFiles` - accepts an array of .css file
91
-
-`sassFiles` - accepts an array of .scss/.sass files
92
-
-`styleFiles` - uses both `cssFiles` & `sassFiles` paths for watching purposes (avoids loop issues)
93
-
-`jsFiles` - accepts an array of .js files
94
-
-`imageFiles` - accepts an array of image files (.jpg, .png, .gif, etc)
95
-
-`concatFiles` - accepts an array of .js files. These are used to concatenate your .js files into one file, and as such the files must be listed in the order you desire
96
-
-`copyFiles` - accepts an array of files
97
-
-`url` - accepts a string to use as the BrowserSync proxy
98
-
99
-
## List Of Gulp Tasks
100
-
Below are a list of the default gulp tasks.
101
-
-`gulp serve` - creates a local development server with live reloading and CSS injection via [BrowserSync](https://www.browsersync.io/docs/)
102
-
-`gulp sass` - compiles Sass/SCSS files into CSS, adds vendor prefixes, and creates a sourcemap
103
-
-`gulp minify-css` - ensures all Sass/SCSS is compiled to CSS and minifies them
104
-
-`gulp styles` - runs the `sass` and `minify-css` tasks, in that order
105
-
-`gulp lint` - a JavaScript helper to find and catch errors, and creates a sourcemap
106
-
-`gulp scripts` - concatenates and minifies JS files (in the order you declare)
107
-
-`gulp images` - compresses images
108
-
-`gulp watch` - watches files for changes and runs tasks based on what was updated
109
-
-`gulp version` - updates WordPress theme version by passing one of three flags, `--major, --minor, --patch`. Alternatively you can also check version by passing no flags to the task.
110
-
-`gulp package` - creates a production ready `.zip` file based on your production theme folder
111
-
-`gulp build` - runs all tasks except `serve` and `watch`
112
-
113
-
Running `gulp` or `gulp default` will run all tasks except `package`.
22
+
## Documentation
23
+
Our new documentation site is coming soon, until then please view the markdown
24
+
files in `/documentation/`
114
25
115
26
## Bugs, Contributions & Questions
116
27
We are always looking for ways to improve. If you find a bug, have a question, or wish to add a contribution please open an issue.
Prelude gives you most of the gulp tasks you'll need to successfully develop and
3
+
deploy a WordPress theme.
4
+
5
+
## List of Gulp Tasks
6
+
Below are a list of the default gulp tasks.
7
+
-`gulp serve` - creates a local development server with live reloading and CSS injection via [Browsersync](https://www.browsersync.io/docs/)
8
+
-`gulp sass` - compiles Sass/SCSS files into CSS, adds vendor prefixes, and creates a sourcemap
9
+
-`gulp minify-css` - ensures all Sass/SCSS is compiled to CSS (runs `gulp sass` before running itself) and minifies them
10
+
-`gulp styles` - runs the `sass` and `minify-css` tasks, in that order
11
+
-`gulp lint` - a JavaScript helper to find and catch errors with [ESLint](https://eslint.org/)
12
+
-`gulp scripts` - concatenates and minifies JS files (in the order you declare via the [`concatFiles` array](gulpfile-customization.md))
13
+
-`gulp images` - compresses images in as defined in the [`imageFiles` array](gulpfile-customization.md)
14
+
-`gulp watch` - watches files for changes and runs tasks based on what file changes
15
+
-`gulp version` - updates WordPress theme version by passing one of three flags, `--major, --minor, --patch`. Alternatively you can also check version by passing no flags to the task.
16
+
-`gulp package` - creates a production ready `.zip` file based on your production theme folder
17
+
-`gulp build` - runs all tasks except `serve` and `watch`
18
+
19
+
Running `gulp` or `gulp default` will run all tasks except `package`.
0 commit comments