Skip to content

Commit

Permalink
[2.0.1] fix tests, hosted issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdee committed Sep 18, 2017
1 parent 727c91e commit 7311f87
Show file tree
Hide file tree
Showing 8 changed files with 1,198 additions and 1,416 deletions.
15 changes: 7 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"no-irregular-whitespace": [2],
"no-unexpected-multiline": [2],
"no-multiple-empty-lines": [2],
"space-return-throw-case": [2],
"keyword-spacing": [2],
"no-constant-condition": [2],
"no-extra-boolean-cast": [2],
"no-inner-declarations": [2],
Expand All @@ -21,8 +21,8 @@
"space-before-blocks": [2],
"no-native-reassign": [2],
"no-trailing-spaces": [2],
"operator-linebreak": [2, "after"],
"consistent-return": [2],
"operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
// "consistent-return": [2],
"no-duplicate-case": [2],
"no-invalid-regexp": [2],
"no-negated-in-lhs": [2],
Expand Down Expand Up @@ -51,7 +51,7 @@
"no-func-assign": [2],
"no-unreachable": [2],
"accessor-pairs": [2],
"no-empty-label": [2],
"no-labels": [2],
"no-fallthrough": [2],
"no-path-concat": [2],
"no-new-require": [2],
Expand Down Expand Up @@ -87,16 +87,15 @@
"quote-props": [0],
"no-iterator": [2],
"no-new-func": [2],
"key-spacing": [2, { "align": "value" }],
// "key-spacing": [2, { "align": "value" }],
"complexity": [2],
"new-parens": [2],
"no-eq-null": [2],
"no-bitwise": [0],
"wrap-iife": [2],
"no-caller": [2],
"use-isnan": [2],
"no-labels": [2],
"no-shadow": [2],
// "no-shadow": [2],
"camelcase": [2],
"eol-last": [2],
"no-octal": [2],
Expand All @@ -111,7 +110,7 @@
"eqeqeq": [2],
"no-new": [2],
"quotes": [2, "single"],
"indent": [2, "space"],
"indent": ["error", 2],
"semi": [2, "always"],
"yoda": [2, "never"]
},
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 2.1.0 (2017-09-18)

Fixed: issue with `hosted` keys
Updated: tests via updates to google-fonts-complete
Updated: package.json, devDependencies chai, gulp-eslint, gulp-mocha
Updated: eslint rules

## 2.0.0 (2017-05-24)

Added: PostCSS 6 compatibility
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,22 @@ require('postcss-font-magician')({

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

You can also use the 'aliases' option with other options, i.g with the 'variants'


```js
require('postcss-font-magician')({
aliases: {
'sans-serif': 'Source Sans Pro'
},
variants: {
'sans-serif': {
'400': ['woff']
}
}
});
```

### async

Need to load the fonts asynchronously?
Expand Down
20 changes: 10 additions & 10 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ var gulp = require('gulp');
var files = ['index.js', 'test/*.js', 'gulpfile.js'];

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

return gulp.src(files)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError()).on('error', done);
return gulp.src(files)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError()).on('error', done);
});

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

return gulp.src('test/*.js', { read: false })
.pipe(mocha()).on('error', done);
return gulp.src('test/*.js', { read: false })
.pipe(mocha()).on('error', done);
});

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

gulp.task('watch', function() {
gulp.watch(files, ['lint', 'test']);
gulp.task('watch', function () {
gulp.watch(files, ['lint', 'test']);
});
Loading

0 comments on commit 7311f87

Please sign in to comment.