Skip to content

Commit 20d5587

Browse files
author
Pedro Reis
committed
Merged v3 into master
2 parents 54a1875 + 87e7ce0 commit 20d5587

69 files changed

Lines changed: 1299 additions & 587 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["env", "stage-2"],
3+
"comments": false,
4+
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
js/**/*.js
2+
node_modules/**/*.js

.eslintrc.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module.exports = {
2+
"root": true,
3+
"parserOptions": {
4+
"parser": "babel-eslint",
5+
"ecmaVersion": 2017,
6+
"sourceType": "module"
7+
},
8+
"env": {
9+
"browser": true,
10+
"node": true,
11+
"es6": true
12+
},
13+
"globals": {
14+
"window": true,
15+
"location": true
16+
},
17+
"extends": [
18+
"airbnb-base",
19+
],
20+
// custom rules here
21+
"rules": {
22+
// don"t require .vue extension when importing
23+
"import/extensions": ["error", "always", {
24+
"js": "never",
25+
"vue": "js",
26+
"mjs": "never"
27+
}],
28+
"no-param-reassign": ["error", {
29+
"props": true,
30+
"ignorePropertyModificationsFor": [
31+
"event", // for e.returnvalue
32+
"response", // for Express responses
33+
"item", // for item usually within each loops
34+
]
35+
}],
36+
// allow debugger during development
37+
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0
38+
}
39+
}

.gitattributes

100644100755
File mode changed.

.gitignore

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
.DS_Store
12
npm-debug.log
23
.sass-cache
34
node_modules
4-
bower_components
55
assets/sass/vendor
6-
tests
76
package-lock.json
87
*.map
98
**/*.map
9+
yarn.lock

.gitmodules

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "assets/sass/vendor/simple-grid"]
2-
path = assets/sass/vendor/simple-grid
1+
[submodule "assets/styles/vendor/simple-grid"]
2+
path = assets/styles/vendor/simple-grid
33
url = https://github.com/benchmarkstudios/simple-grid.git

CHANGELOG.md

100644100755
Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
11
# barebones changelog
2-
## 2.0.6
3-
* Add package-lock.json to gitignore for npm 5+
4-
5-
## 2.0.5
6-
* Use filetime() for asset revisions as it's more compatible and easier to support.
7-
8-
## 2.0.4
9-
* Better static asset revisioning using randomly generated hash when running gulp tasks.
10-
11-
## 2.0.3
12-
* update get_post_thumbnail_url function and add ability to get specific size.
13-
14-
## 2.0.2
15-
* Add dependencies that were missing while using yarn
16-
17-
## 2.0.1
18-
* Comment out example "add_image_size" as it can be easily forgotten which leaves you with extra unused image size.
19-
* Add CHANGELOG.MD to track changes
20-
* Tidy up formatting using PHP-CS-Fixer (mostly spacing)
21-
* Update README.MD dependencies
22-
23-
## 2.0.0
24-
* Refreshed tooling using Elixir with lots of improvements
2+
## 3.0
3+
* Refreshed simplified tooling, new feaatures and improvements

README.md

100644100755
Lines changed: 51 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ A lightweight and skeletal WordPress boilerplate theme for HTML5 and beyond. The
55
## Features
66

77
* Reset, normalisation and base font/form styles
8-
* Sass Boilerplate - semantically named files, organised by folders, all compiled into a single file
8+
* Scss Boilerplate - semantically named files, organised by folders, all compiled into a single file
99
* Semantic use of HTML5 elements, includes Google HTML5 shiv
1010
* WAI-ARIA role ready
11-
* Comes pre-bundled with cached CDN version of jQuery
1211
* jQuery plugin agnostic
13-
* Laravel Elixir to define/customize and run basic Gulp tasks
1412
* Basic template files
1513
* Customised functions.php adding theme support for high customisation
1614
* Minimised HTTP requests for high Web Performance
1715
* Localised strings for multiple language support
18-
* Sass compiling and watching, css minification and live reload support
16+
* Scss compiling and watching, css minification support
17+
* Rollup.js for js for smallest possible bundles
18+
* Image optimisation using imagemin.
19+
* Base mobile nav out of the box
1920

2021
## Installation
2122

@@ -31,38 +32,49 @@ To include all its optional submodules ([Simple Grid](https://github.com/benchma
3132

3233
#### Dependencies
3334

34-
* [Node.js](http://nodejs.org)
35-
* [Gulp](http://gulpjs.com)
36-
* [Gulp Imagemin](https://github.com/sindresorhus/gulp-imagemin)
37-
* [Laravel Elixir](https://github.com/laravel/elixir)
35+
Install Dependencies:
36+
```
37+
npm install
38+
```
3839

39-
### Using Gulp and Laravel Elixir
40+
.. or with yarn:
41+
```
42+
yarn
43+
```
44+
45+
### Using Gulp
4046

4147
Install Gulp as a global NPM package, if you don't have it already on your machine:
4248

4349
npm install --global gulp
4450

45-
Install Laravel Elixir:
51+
Install Dependencies, you have haven't done yet:
4652

4753
npm install
4854

49-
Edit your gulpfile.js adding the required tasks (check the [Laravel Elixir](http://laravel.com/docs/master/elixir) documentation for further information).
50-
5155
Then run:
5256

53-
gulp
57+
| Tasks | |
58+
|----------------|--------------------------------------------------------------------|
59+
| `gulp` | *to compile* (All tasks) |
60+
| `gulp watch` | *to watch* |
61+
| `gulp images` | *to optimise images* |
62+
| `gulp styles` | *to compile styles* |
63+
| `gulp scripts` | *to compile scripts* |
64+
| `gulp build` | *to create a build (minification, removes map files and comments)* |
5465

55-
*to compile*
66+
This will execute all the Gulp tasks on the gulpfile.babel.js.
5667

57-
gulp watch
68+
### Configuration for Gulp
5869

59-
*to watch*
70+
Some of the configuration can be done in `config.barebones.js` file, such as base source and public paths, along with scripts file paths for multiple bundles.
6071

61-
gulp --production
72+
Of course, feel free to modify gulpfile itself.
6273

63-
*to minify*
74+
### Images
6475

65-
This will execute all the Gulp tasks on the gulpfile.js.
76+
Drop all your images into assets/images. When running gulp tasks, they will be automatically
77+
optimised and output files will available in img folder in the root of the theme.
6678

6779
## WordPress Support
6880

@@ -75,3 +87,23 @@ Compatible with WordPress 3.2 and above, but always use the latest version.
7587
* Safari 4.0+
7688
* Chrome 14.0+
7789
* Opera 10.0+
90+
91+
## Tips & Tricks
92+
93+
### SVG Fallbacks
94+
95+
Most likely if you need to support IE8
96+
97+
*CSS*
98+
```
99+
...
100+
background-size: 120px 15px;
101+
background-image: url(/img/fallback.png);
102+
background-image: linear-gradient(transparent, transparent), url(/img/image.svg);
103+
...
104+
```
105+
106+
*HTML*
107+
```
108+
<img src="/img/logo.svg" onerror="this.src='/img/logo.png'" alt="image" />
109+
```

assets/icons/error.png

1.87 KB
Loading

0 commit comments

Comments
 (0)