Skip to content

Commit

Permalink
Added paths.fonts in font task
Browse files Browse the repository at this point in the history
  • Loading branch information
Wtower committed Jan 13, 2017
1 parent 62c4eb7 commit 095f3f8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
CHANGELOG
=========

v0.3.2
v0.4.0
------

Date: upcoming
Date: Fri 13 Jan, 2017

- Fix #6: gulp-nsp error
- Added `paths.fonts` in font task

:warning: requires to add `paths.fonts` in existing gulpfiles if using the fonts task.

v0.3.1
------
Expand Down
5 changes: 4 additions & 1 deletion docs/tasks/fonts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ Syntax
Description
-----------

Download Google fonts specified in ``/fonts.list`` to ``paths.build`` ``/fonts`` and generate a stylesheet for them.
Download Google fonts specified in ``paths.fonts`` ``/fonts.list`` to ``paths.build`` ``/fonts`` and generate a
stylesheet for them.

Uses `gulp-google-webfonts`_.

.. _gulp-google-webfonts: https://www.npmjs.com/package/gulp-google-webfonts

**New in v0.4.0**: Now the ``fonts.list`` location needs to be specified in ``paths.fonts``.

Example
-------

Expand Down
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var paths = {
partials: [
'private/*javascripts/contest/**/*.html'
],
fonts: 'private/',
build: 'static/',
images: '',

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ var taskMethods = {
* Google web fonts
*/
fonts: function (paths) {
return gulp.src('./fonts.list')
return gulp.src(paths.fonts + './fonts.list')
.pipe(googleWebFonts())
.pipe(gulp.dest(paths.build + 'fonts/'));
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gulpfile-ninecms",
"version": "0.3.2",
"version": "0.4.0",
"description": "Front-end package management",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -45,7 +45,7 @@
"gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^3.0.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-sourcemaps": "^2.4.0",
"gulp-uglify": "^2.0.0",
"gulp-util": "^3.0.7",
"jasmine-core": "^2.5.2",
Expand Down

0 comments on commit 095f3f8

Please sign in to comment.