Socket
Socket
Sign inDemoInstall

webpack-webfont

Package Overview
Dependencies
219
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1-alpha.7 to 0.0.1-alpha.8

36

CHANGELOG.md

@@ -7,37 +7,41 @@ # Change Log

# 0.0.1.-alpha.8 - 2017-08-29
- Added: config option `dest.outputFilename`.
# 0.0.1-alpha.7 - 2016-12-11
- Fixed: used `run` and `watch-run` events for the compilation fonts and styles, for avoid endless compilation
in watch mode.
- Fixed: used `run` and `watch-run` events for the compilation fonts and styles, for avoid endless compilation
in watch mode.
# 0.0.1-alpha.6 - 2016-12-11
- Fixed: used the `webpack` watch system for watching changes.
- Fixed: used the `webpack` watch system for watching changes.
# 0.0.1-alpha.5 - 2016-12-11
- Fixed: used the `make` event for the compilation fonts and styles.
- Fixed: used the `make` event for the compilation fonts and styles.
# 0.0.1-alpha.4 - 2016-11-09
- Fixed: flush `errors` on every compilation.
- Chore: minimum required `webfont` version is now `^7.0.0`.
- Chore: minimum required `eslint-plugin-import` version is now `^2.2.0`.
- Chore: minimum required `eslint-plugin-itgalaxy` version is now `^26.0.0`.
- Chore: minimum required `eslint-plugin-jsx-a11y` version is now `^3.0.0`.
- Chore: minimum required `eslint-plugin-react` version is now `^6.6.0`.
- Chore: refactored for new `webfont` version.
- Chore: improved tests.
- Fixed: flush `errors` on every compilation.
- Chore: minimum required `webfont` version is now `^7.0.0`.
- Chore: minimum required `eslint-plugin-import` version is now `^2.2.0`.
- Chore: minimum required `eslint-plugin-itgalaxy` version is now `^26.0.0`.
- Chore: minimum required `eslint-plugin-jsx-a11y` version is now `^3.0.0`.
- Chore: minimum required `eslint-plugin-react` version is now `^6.6.0`.
- Chore: refactored for new `webfont` version.
- Chore: improved tests.
# 0.0.1-alpha.3 - 2016-11-08
- Chore: refactoring code.
- Chore: refactoring tests.
- Chore: refactoring code.
- Chore: refactoring tests.
# 0.0.1-alpha.2 - 2016-11-07
- Fixed: problems with `watch`.
- Fixed: problems with `watch`.
# 0.0.1-alpha.1 - 2016-10-31
- Chore: initial public release.
- Chore: initial public release.

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -9,19 +9,19 @@ Object.defineProperty(exports, "__esModule", {

var _fsExtra = require('fs-extra');
var _fsExtra = require("fs-extra");
var _fsExtra2 = _interopRequireDefault(_fsExtra);
var _globParent = require('glob-parent');
var _globParent = require("glob-parent");
var _globParent2 = _interopRequireDefault(_globParent);
var _nodeify = require('nodeify');
var _nodeify = require("nodeify");
var _nodeify2 = _interopRequireDefault(_nodeify);
var _path = require('path');
var _path = require("path");
var _path2 = _interopRequireDefault(_path);
var _webfont = require('webfont');
var _webfont = require("webfont");

@@ -41,7 +41,7 @@ var _webfont2 = _interopRequireDefault(_webfont);

if (!options.files) {
throw new Error('Require `files` options');
throw new Error("Require `files` options");
}
if (!options.dest) {
throw new Error('Require `dest` options');
throw new Error("Require `dest` options");
}

@@ -54,13 +54,13 @@

_createClass(WebfontPlugin, [{
key: 'apply',
key: "apply",
value: function apply(compiler) {
var _this = this;
compiler.plugin('run', function (compilation, callback) {
compiler.plugin("run", function (compilation, callback) {
return _this.compile(callback);
});
compiler.plugin('watch-run', function (compilation, callback) {
compiler.plugin("watch-run", function (compilation, callback) {
return _this.compile(callback);
});
compiler.plugin('after-emit', function (compilation, callback) {
compiler.plugin("after-emit", function (compilation, callback) {
return _this.watch(compilation, callback);

@@ -70,3 +70,3 @@ });

}, {
key: 'compile',
key: "compile",
value: function compile(callback) {

@@ -95,5 +95,7 @@ var _this2 = this;

if (result.usedBuildInStylesTemplate) {
destStyles = _path2.default.join(destStyles, result.config.fontName + '.' + result.config.template);
destStyles = _path2.default.join(destStyles, result.config.fontName + "." + result.config.template);
} else if (_this2.options.dest.outputFilename) {
destStyles = _path2.default.join(destStyles, _this2.options.dest.outputFilename);
} else {
destStyles = _path2.default.join(destStyles, _path2.default.basename(result.config.template).replace('.njk', ''));
destStyles = _path2.default.join(destStyles, _path2.default.basename(result.config.template).replace(".njk", ""));
}

@@ -103,3 +105,3 @@ }

return Promise.all(Object.keys(result).map(function (type) {
if (type === 'config' || type === 'usedBuildInStylesTemplate') {
if (type === "config" || type === "usedBuildInStylesTemplate") {
return Promise.resolve();

@@ -111,4 +113,4 @@ }

if (type !== 'styles') {
destFilename = _path2.default.resolve(_path2.default.join(dest, fontName + '.' + type));
if (type !== "styles") {
destFilename = _path2.default.resolve(_path2.default.join(dest, fontName + "." + type));
} else {

@@ -133,5 +135,5 @@ destFilename = _path2.default.resolve(destStyles);

}, {
key: 'watch',
key: "watch",
value: function watch(compilation, callback) {
var globPatterns = typeof this.options.files === 'string' ? [this.options.files] : this.options.files;
var globPatterns = typeof this.options.files === "string" ? [this.options.files] : this.options.files;

@@ -138,0 +140,0 @@ globPatterns.forEach(function (globPattern) {

{
"name": "webpack-webfont",
"version": "0.0.1-alpha.7",
"version": "0.0.1-alpha.8",
"description": "Webpack plugin for webfont package",

@@ -52,3 +52,3 @@ "license": "MIT",

"webfont": "^7.0.0",
"fs-extra": "^1.0.0",
"fs-extra": "^4.0.0",
"nodeify": "^1.0.0",

@@ -58,4 +58,3 @@ "glob-parent": "^3.1.0"

"devDependencies": {
"ava": "^0.17.0",
"ajv-cli": "^1.1.0",
"ava": "^0.21.0",
"babel-cli": "^6.11.0",

@@ -68,43 +67,42 @@ "babel-core": "^6.11.0",

"coveralls": "^2.11.6",
"css-loader": "^0.26.1",
"del": "^2.2.0",
"del-cli": "^0.2.0",
"eslint": "^3.9.1",
"eslint-plugin-ava": "^4.0.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-itgalaxy": "^35.0.0",
"eslint-plugin-jsx-a11y": "^3.0.0",
"eslint-plugin-lodash": "^2.1.0",
"eslint-plugin-node": "^3.0.0",
"eslint-plugin-promise": "^3.3.0",
"eslint-plugin-react": "^6.5.0",
"eslint-plugin-unicorn": "^1.0.0",
"file-loader": "^0.9.0",
"sinon": "^1.17.0",
"css-loader": "^0.28.0",
"del": "^3.0.0",
"del-cli": "^1.1.0",
"eslint": "^4.1.1",
"eslint-plugin-ava": "^4.2.1",
"eslint-plugin-import": "^2.6.0",
"eslint-plugin-itgalaxy": "^50.0.0",
"eslint-plugin-jest": "^20.0.3",
"eslint-plugin-jsx-a11y": "^6.0.0",
"eslint-plugin-lodash": "^2.4.3",
"eslint-plugin-node": "^5.1.0",
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-unicorn": "^2.1.2",
"file-loader": "^0.11.0",
"sinon": "^3.0.0",
"npmpub": "^3.1.0",
"npm-run-all": "^4.0.0",
"nyc": "^10.0.0",
"package-schema": "^1.0.0",
"remark-cli": "^2.0.0",
"remark-lint": "^5.0.0",
"remark-preset-lint-itgalaxy": "^4.0.0",
"style-loader": "^0.13.0",
"webpack": "^1.13.0",
"url-loader": "^0.5.0"
"nyc": "^11.0.0",
"remark-cli": "^4.0.0",
"remark-preset-lint-itgalaxy": "^7.0.1",
"style-loader": "^0.18.0",
"webpack": "^3.0.0",
"url-loader": "^0.5.0",
"husky": "^0.14.0",
"lint-staged": "^4.0.0",
"prettier": "^1.5.2"
},
"scripts": {
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"precommit": "lint-staged",
"lint:eslint": "eslint . --ignore-path .gitignore --color",
"lint:package": "ajv -s ./node_modules/package-schema/schema.json -d package --errors=text",
"lint:remark": "remark '{**/*,*}.md' -i .gitignore -f -q",
"lint:remark": "remark . -i .gitignore -f -q",
"lint": "npm-run-all -l --parallel lint:*",
"prettier": "eslint . --fix --ignore-path .gitignore",
"pretest": "npm run lint",
"ava": "nyc ava --verbose \"src/**/__tests__/*.js\"",
"test": "npm run ava",
"prebuild": "del dist",
"build": "babel src --out-dir dist --ignore /__tests__/",
"prepublish": "npm run build",

@@ -125,2 +123,5 @@ "release": "npmpub"

"eslintConfig": {
"rules": {
"node/no-unsupported-features": "off"
},
"extends": [

@@ -132,3 +133,8 @@ "plugin:itgalaxy/ava",

"root": true
},
"remarkConfig": {
"plugins": [
"remark-preset-lint-itgalaxy"
]
}
}
# webpack-webfont
[![NPM version](https://img.shields.io/npm/v/webpack-webfont.svg)](https://www.npmjs.org/package/webpack-webfont)
[![Travis Build Status](https://img.shields.io/travis/itgalaxy/webpack-webfont/master.svg?label=build)](https://travis-ci.org/itgalaxy/webpack-webfont)
[![dependencies Status](https://david-dm.org/itgalaxy/webpack-webfont/status.svg)](https://david-dm.org/itgalaxy/webpack-webfont)
[![NPM version](https://img.shields.io/npm/v/webpack-webfont.svg)](https://www.npmjs.org/package/webpack-webfont)
[![Travis Build Status](https://img.shields.io/travis/itgalaxy/webpack-webfont/master.svg?label=build)](https://travis-ci.org/itgalaxy/webpack-webfont)
[![dependencies Status](https://david-dm.org/itgalaxy/webpack-webfont/status.svg)](https://david-dm.org/itgalaxy/webpack-webfont)
[![devDependencies Status](https://david-dm.org/itgalaxy/webpack-webfont/dev-status.svg)](https://david-dm.org/itgalaxy/webpack-webfont?type=dev)
[![Greenkeeper badge](https://badges.greenkeeper.io/itgalaxy/webpack-webfont.svg)](https://greenkeeper.io/)

@@ -16,2 +17,3 @@ Webpack plugin for the [webfont](https://github.com/itgalaxy/webfont) package.

```
## Usage

@@ -144,10 +146,13 @@

- `General options` - see [webfont](https://github.com/itgalaxy/webfont) options. Some options are required.
- `dest` - (required) generated files.
- `fontsDir` - (required) directory fonts saving.
- `stylesDir` - (optional) directory styles saving.
- `General options` - see [webfont](https://github.com/itgalaxy/webfont) options. Some options are required.
- `dest` - (required) generated files.
- `fontsDir` - (required) directory fonts saving.
- `stylesDir` - (optional) directory styles saving.
- `outputFilename` - (optional) Set the filename of the generated styles file
## Related
- [webfont](https://github.com/itgalaxy/webfont) - api for this package.
- [webfont](https://github.com/itgalaxy/webfont) - api for this package.

@@ -154,0 +159,0 @@ ## Contribution

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc