Skip to content

Commit 7311f87

Browse files
committed
[2.0.1] fix tests, hosted issue
1 parent 727c91e commit 7311f87

File tree

8 files changed

+1198
-1416
lines changed

8 files changed

+1198
-1416
lines changed

.eslintrc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"no-irregular-whitespace": [2],
77
"no-unexpected-multiline": [2],
88
"no-multiple-empty-lines": [2],
9-
"space-return-throw-case": [2],
9+
"keyword-spacing": [2],
1010
"no-constant-condition": [2],
1111
"no-extra-boolean-cast": [2],
1212
"no-inner-declarations": [2],
@@ -21,8 +21,8 @@
2121
"space-before-blocks": [2],
2222
"no-native-reassign": [2],
2323
"no-trailing-spaces": [2],
24-
"operator-linebreak": [2, "after"],
25-
"consistent-return": [2],
24+
"operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
25+
// "consistent-return": [2],
2626
"no-duplicate-case": [2],
2727
"no-invalid-regexp": [2],
2828
"no-negated-in-lhs": [2],
@@ -51,7 +51,7 @@
5151
"no-func-assign": [2],
5252
"no-unreachable": [2],
5353
"accessor-pairs": [2],
54-
"no-empty-label": [2],
54+
"no-labels": [2],
5555
"no-fallthrough": [2],
5656
"no-path-concat": [2],
5757
"no-new-require": [2],
@@ -87,16 +87,15 @@
8787
"quote-props": [0],
8888
"no-iterator": [2],
8989
"no-new-func": [2],
90-
"key-spacing": [2, { "align": "value" }],
90+
// "key-spacing": [2, { "align": "value" }],
9191
"complexity": [2],
9292
"new-parens": [2],
9393
"no-eq-null": [2],
9494
"no-bitwise": [0],
9595
"wrap-iife": [2],
9696
"no-caller": [2],
9797
"use-isnan": [2],
98-
"no-labels": [2],
99-
"no-shadow": [2],
98+
// "no-shadow": [2],
10099
"camelcase": [2],
101100
"eol-last": [2],
102101
"no-octal": [2],
@@ -111,7 +110,7 @@
111110
"eqeqeq": [2],
112111
"no-new": [2],
113112
"quotes": [2, "single"],
114-
"indent": [2, "space"],
113+
"indent": ["error", 2],
115114
"semi": [2, "always"],
116115
"yoda": [2, "never"]
117116
},

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2.1.0 (2017-09-18)
2+
3+
Fixed: issue with `hosted` keys
4+
Updated: tests via updates to google-fonts-complete
5+
Updated: package.json, devDependencies chai, gulp-eslint, gulp-mocha
6+
Updated: eslint rules
7+
18
## 2.0.0 (2017-05-24)
29

310
Added: PostCSS 6 compatibility

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,22 @@ require('postcss-font-magician')({
264264

265265
The `@font-face` rule will be updated so that your alias key is the new name of the font family.
266266

267+
You can also use the 'aliases' option with other options, i.g with the 'variants'
268+
269+
270+
```js
271+
require('postcss-font-magician')({
272+
aliases: {
273+
'sans-serif': 'Source Sans Pro'
274+
},
275+
variants: {
276+
'sans-serif': {
277+
'400': ['woff']
278+
}
279+
}
280+
});
281+
```
282+
267283
### async
268284

269285
Need to load the fonts asynchronously?

gulpfile.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ var gulp = require('gulp');
33
var files = ['index.js', 'test/*.js', 'gulpfile.js'];
44

55
gulp.task('lint', function (done) {
6-
var eslint = require('gulp-eslint');
6+
var eslint = require('gulp-eslint');
77

8-
return gulp.src(files)
9-
.pipe(eslint())
10-
.pipe(eslint.format())
11-
.pipe(eslint.failAfterError()).on('error', done);
8+
return gulp.src(files)
9+
.pipe(eslint())
10+
.pipe(eslint.format())
11+
.pipe(eslint.failAfterError()).on('error', done);
1212
});
1313

1414
gulp.task('test', function (done) {
15-
var mocha = require('gulp-mocha');
15+
var mocha = require('gulp-mocha');
1616

17-
return gulp.src('test/*.js', { read: false })
18-
.pipe(mocha()).on('error', done);
17+
return gulp.src('test/*.js', { read: false })
18+
.pipe(mocha()).on('error', done);
1919
});
2020

2121
gulp.task('default', ['lint', 'test']);
2222

23-
gulp.task('watch', function() {
24-
gulp.watch(files, ['lint', 'test']);
23+
gulp.task('watch', function () {
24+
gulp.watch(files, ['lint', 'test']);
2525
});

0 commit comments

Comments
 (0)