Giter Site home page Giter Site logo

itgalaxy / webfont Goto Github PK

View Code? Open in Web Editor NEW
272.0 11.0 68.0 4.66 MB

Awesome generator of webfont

License: MIT License

JavaScript 12.03% CSS 2.32% TypeScript 65.92% Nunjucks 19.74%
ttf woff font converts-ttf-fonts web-fonts woff2 eot svg-icons svg-font cli

webfont's Introduction

webfont

NPM version Travis Build Status Build status

Generator of fonts from SVG icons.

Features

  • Supported font formats: WOFF2, WOFF, EOT, TTF and SVG;
  • Support config files: use a JavaScript, JSON or YAML file to specify configuration information for an entire directory and all of its subdirectories;
  • Support all popular browsers, including IE8+;
  • Allows using custom templates (example css, scss, styl etc);
  • No extra dependencies as gulp, grunt or other big tools;
  • Tested on all platforms (linux, windows and osx);
  • CLI;
  • Webpack plugin.

Table Of Contents


Installation

npm install --save-dev webfont

Usage

import webfont from "webfont";

webfont({
  files: "src/svg-icons/**/*.svg",
  fontName: "my-font-name",
})
  .then((result) => {
    // Do something with result
    Function.prototype(result);
    // Or return it
    return result;
  })
  .catch((error) => {
    throw error;
  });

or

const webfont = require("webfont").default;

webfont({
  files: "src/svg-icons/**/*.svg",
  fontName: "my-font-name",
})
  .then((result) => {
    // Do something with result
    Function.prototype(result);
    // Or return it
    return result;
  })
  .catch((error) => {
    throw error;
  });

Options

files

  • Type: string | array
  • Description: A file glob, or array of file globs. Ultimately passed to fast-glob to figure out what files you want to get.
  • Note: node_modules and bower_components are always ignored.

configFile

  • Type: string
  • Description: Path to a specific configuration file (JSON, YAML, or CommonJS) or the name of a module in node_modules that points to one.
  • Note: If you do not provide configFile, webfont will search up the directory tree for configuration file in the following places, in this order:
    1. a webfont property in package.json
    2. a .webfontrc file (with or without filename extension: .json, .yaml, and .js are available)
    3. a webfont.config.js file exporting a JS object. The search will begin in the working directory and move up the directory tree until it finds a configuration file.

fontName

  • Type: string
  • Default: webfont
  • Description: The font family name you want.

formats

  • Type: array,
  • Default: ['svg', 'ttf', 'eot', 'woff', 'woff2'],
  • Possible values: svg, ttf, eot, woff, woff2,
  • Description: Font file types to generate.

template

  • Type: string

  • Default: null

  • Possible values: css, scss, styl (feel free to contribute more).

  • Note: If you want to use a custom template use this option pass in a path string like this:

    webfont({
      template: "./path/to/my-template.css",
    });

    Or

    webfont({
      template: path.resolve(__dirname, "./my-template.css"),
    });

    Or

    webfont({
      template: path.resolve(__dirname, "./my-template.styl"),
    });

templateClassName

  • Type: string
  • Default: null
  • Description: Default font class name.

templateFontPath

  • Type: string
  • Default: ./
  • Description: Path to generated fonts in the CSS file.

templateFontName

  • Type: string
  • Default: Gets is from fontName if not set, but you can specify any value.
  • Description: Template font family name you want.

ligatures

  • Type: boolean
  • Default: true
  • Description: Turn on/off adding ligature unicode

glyphTransformFn

  • Type: function

  • Default: null

  • Description: If you want to transform glyph metadata (e.g. titles of CSS classes or unicode) before transferring it in your style template for your icons, you can use this option with glyphs metadata object.

  • Example:

    import webfont from "webfont";
    
    webfont({
      files: "src/svg-icons/**/*.svg",
      glyphTransformFn: (obj) => {
        obj.name += "_transform";
        something();
    
        return obj;
      },
    })
      .then((result) => {
        // Do something with result
        Function.prototype(result);
        // Or return it
        return result;
      })
      .catch((error) => {
        throw error;
      });

sort

  • Type: bool
  • Default: true
  • Description: Whether you want to sort the icons sorted by name.

svgicons2svgfont

svgicons2svgfont options

These can be appended to webfont options. These are passed directly to svgicons2svgfont.

svgicons2svgfont.fontName

svgicons2svgfont.fontId

  • Type: string
  • Default: The fontName value
  • Description: The font id you want.

svgicons2svgfont.fontStyle

  • Type: string
  • Default: ''
  • Description: The font style you want.

svgicons2svgfont.fontWeight

  • Type: string
  • Default: ''
  • Description: The font weight you want.

svgicons2svgfont.fixedWidth

  • Type: boolean
  • Default: false
  • Description: Creates a monospace font of the width of the largest input icon.

svgicons2svgfont.centerHorizontally

  • Type: boolean
  • Default: false
  • Description: Calculate the bounds of a glyph and center it horizontally.

svgicons2svgfont.normalize

  • Type: boolean
  • Default: false
  • Description: Normalize icons by scaling them to the height of the highest icon.

svgicons2svgfont.fontHeight

  • Type: number
  • Default: MAX(icons.height)
  • Description: The outputted font height (defaults to the height of the highest input icon).

svgicons2svgfont.round

  • Type: number
  • Default: 10e12 Setup SVG path rounding.

svgicons2svgfont.descent

  • Type: number
  • Default: 0
  • Description: The font descent. It is useful to fix the font baseline yourself.
  • Warning: The descent is a positive value!.

svgicons2svgfont.ascent

  • Type: number
  • Default: fontHeight - descent
  • Description: The font ascent. Use this options only if you know what you're doing. A suitable value for this is computed for you.

svgicons2svgfont.metadata

  • Type: string
  • Default: undefined
  • Description: The font metadata. You can set any character data in, but this is the recommended place for a copyright mention.

svgicons2svgfont.log

  • Type: function
  • Default: console.log
  • Description: Allows you to provide your own logging function. Set to function(){} to disable logging.

Command Line Interface

The interface for command-line usage is fairly simplistic at this stage, as seen in the following usage section.

CLI Installation

Add the cli script to your package.json file's scripts object:

{
  "scripts": {
    "webfont": "node node_modules/webfont/dist/cli.js"
  }
}

If you're using cross-env:

{
  "scripts": {
    "webfont": "cross-env node_modules/webfont/dist/cli.js"
  }
}

CLI Usage

    Usage: webfont [input] [options]

    Input: File(s) or glob(s).

        If an input argument is wrapped in quotation marks, it will be passed to "fast-glob"
        for cross-platform glob support.

    Options:

        --config

            Path to a specific configuration file (JSON, YAML, or CommonJS)
            or the name of a module in \`node_modules\` that points to one.
            If no \`--config\` argument is provided, webfont will search for
            configuration  files in the following places, in this order:
               - a \`webfont\` property in \`package.json\`
               - a \`.webfontrc\` file (with or without filename extension:
                   \`.json\`, \`.yaml\`, and \`.js\` are available)
               - a \`webfont.config.js\` file exporting a JS object
            The search will begin in the working directory and move up the
            directory tree until a configuration file is found.

        -f, --font-name

            The font family name you want, default: "webfont".

        -h, --help

            Output usage information.

        -v, --version

            Output the version number.

        -r, --formats

            Only this formats generate.

        -d, --dest

            Destination for generated fonts.

        -m, --dest-create
            Create destination directory if it does not exist.

        -t, --template

            Type of template (\`css\`, \`scss\`, \`styl\`) or path to custom template.
'
        -s, --dest-template

            Destination for generated template. If not passed used \`dest\` argument value.

        -c, --template-class-name

            Class name in css template.

        -p, --template-font-path

            Font path in css template.

        -n, --template-font-name

            Font name in css template.

        --no-sort

            Keeps the files in the same order of entry

        --verbose

            Tell me everything!.

    For "svgicons2svgfont":

        --font-id

            The font id you want, default as "--font-name".

        --font-style

            The font style you want.

        --font-weight

            The font weight you want.

        --fixed-width

            Creates a monospace font of the width of the largest input icon.

        --center-horizontally

            Calculate the bounds of a glyph and center it horizontally.

        --normalize

            Normalize icons by scaling them to the height of the highest icon.

        --font-height

            The outputted font height [MAX(icons.height)].

        --round

            Setup the SVG path rounding [10e12].

        --descent

            The font descent [0].

        --ascent

            The font ascent [height - descent].

        --start-unicode

            The start unicode codepoint for files without prefix [0xEA01].

        --prepend-unicode

            Prefix files with their automatically allocated unicode codepoint.

        --metadata

            Content of the metadata tag.

        --add-hash-in-font-url

            Generated font url will be : [webfont].[ext]?v=[hash]

CLI Exit Codes

The CLI can exit the process with the following exit codes:

  • 0: All ok.
  • 1: Something unknown went wrong.
  • Other: related to using packages.

Related

Roadmap

  • The ability to generate from any type to any type;
  • More tests, include CLI test;
  • Improved docs;
  • Reduce package size (maybe implement ttf2woff2 with native js library);
  • Improve performance (maybe use cache for this).

Contribution

Feel free to push your code if you agree with publishing under the MIT license.

Changelog

Check our Changelog

License

Check our License

webfont's People

Contributors

alexander-akait avatar dependabot[bot] avatar ediblecode avatar evilebottnawi avatar ghustavh97 avatar greenkeeper[bot] avatar grelas avatar gustavobcx avatar jimmyandrade avatar lqez avatar lucavb avatar mpalpha avatar snyk-bot avatar wszydlak avatar yahsan2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webfont's Issues

An in-range update of coveralls is breaking the build 🚨

Version 2.13.0 of coveralls just got published.

Branch Build failing 🚨
Dependency coveralls
Current Version 2.12.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As coveralls is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 4 commits .

  • 2821200 version bump
  • ef7e811 Parse commit from packed refs if not available in refs dir. (#163)
  • e476964 Merge pull request #162 from evanjbowling/patch-1
  • 63a7f92 Update README.md

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of cosmiconfig is breaking the build 🚨

Version 2.1.3 of cosmiconfig just got published.

Branch Build failing 🚨
Dependency cosmiconfig
Current Version 2.1.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

cosmiconfig is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details - ✅ **continuous-integration/travis-ci/push** The Travis CI build passed [Details](https://travis-ci.org/itgalaxy/webfont/builds/227173725?utm_source=github_status&utm_medium=notification),- ❌ **continuous-integration/appveyor/branch** AppVeyor build failed [Details](https://ci.appveyor.com/project/evilebottnawi/webfont/build/256)

Commits

The new version differs by 3 commits0.

  • 334065d Prepare 2.1.3
  • f049149 Merge pull request #66 from hansl/parse-json-fix
  • 83f4ebf chore: replace json-parse-helpfulerror with parse-json

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of svg2ttf is breaking the build 🚨

Version 4.0.3 of svg2ttf just got published.

Branch Build failing 🚨
Dependency svg2ttf
Current Version 4.0.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

svg2ttf is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 8 commits.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-import is breaking the build 🚨

Version 2.5.0 of eslint-plugin-import just got published.

Branch Build failing 🚨
Dependency eslint-plugin-import
Current Version 2.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-import is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 27 commits.

  • c41ed06 bump to v2.5.0
  • 94187a3 bump debug version everywhere
  • 54687d1 resolvers/webpack: v0.8.2
  • dac23a1 eslint-module-utils: v2.1.1 (bumping to re-publish to npm)
  • d92ef43 Merge pull request #696 from eelyafi/new_line_fixer
  • 3f9e4bf [Tests] comment out failing (and probably invalid) test
  • 4067495 Only apps should have lockfiles.
  • ebaa8e3 Merge pull request #873 from lukeapage/patch-3
  • 3268cb1 Fix documentation of newline-after-import example
  • 3c46d30 rollback utils dependency to 2.0.0
  • e3a32ad add yank note to utils change log
  • 089f7f1 add yanking note to root change log
  • dfbe0e7 Upgrade debug version of eslint-module-utils (#844)
  • 3d9c642 Merge branch 'release'
  • b8e9a0b Merge pull request #861 from benmosher/release-2.4.0

There are 27 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of babel-cli is breaking the build 🚨

Version 6.22.1 of babel-cli just got published.

Branch Build failing 🚨
Dependency babel-cli
Current Version 6.22.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As babel-cli is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

  • continuous-integration/travis-ci/push The Travis CI build passed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-unicorn is breaking the build 🚨

Version 2.1.2 of eslint-plugin-unicorn just got published.

Branch Build failing 🚨
Dependency eslint-plugin-unicorn
Current Version 2.1.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-unicorn is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 4 commits.

  • 57b766b 2.1.2
  • 68ba3fb Make sure the rules directory is resolved correctly (#95)
  • 233945b Upgrade to eslint@4 (#94)
  • 6d4b8da Bump dependencies

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of babel-core is breaking the build 🚨

Version 6.24.0 of babel-core just got published.

Branch Build failing 🚨
Dependency babel-core
Current Version 6.23.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As babel-core is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

  • continuous-integration/travis-ci/push The Travis CI build passed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-node is breaking the build 🚨

Version 5.1.0 of eslint-plugin-node just got published.

Branch Build failing 🚨
Dependency eslint-plugin-node
Current Version 5.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-node is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details

Release Notes v5.1.0

Enhancements

  • 47e0cc2 added resolvePaths option to no-missing-require and no-missing-import rules. You can customize paths to try for when resolving importing.
Commits

The new version differs by 6 commits.

  • af4737e 5.1.0
  • 04e0cf7 Chore: update travis.yml
  • 4f4e216 Chore: remove package-lock.json
  • 9931ded Chore: upgrade dependencies
  • d34e09c Chore: refactoring
  • 47e0cc2 Update: add resolvePaths option to no-missing-require (#84)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-node is breaking the build 🚨

Version 4.2.1 of eslint-plugin-node just got published.

Branch Build failing 🚨
Dependency eslint-plugin-node
Current Version 4.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-node is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes v4.2.1

Bug fixes

  • 113c68f fixed false positive of no-missing-require and no-missing-import rules that v4.2.0 introduced.
Commits

The new version differs by 2 commits .

  • fb3f030 4.2.1
  • 113c68f Fix: no-missing-require had false positive (fixes #70)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-lodash is breaking the build 🚨

Version 2.4.3 of eslint-plugin-lodash just got published.

Branch Build failing 🚨
Dependency eslint-plugin-lodash
Current Version 2.4.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-lodash is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 2 commits.

  • 6be1017 2.4.3
  • cf10ed1 fix prefer-over-quantifier to only report on single-argument functions (fixes #152)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-promise is breaking the build 🚨

Version 3.4.2 of eslint-plugin-promise just got published.

Branch Build failing 🚨
Dependency eslint-plugin-promise
Current Version 3.4.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-promise is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 5 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Wrong syntax when not all format are selected

HI,

I'm using webfont to generate woff and woff2 icon fonts. The problem is that the generated css file has a syntax error, so webpack is unable to process it.

@font-face {
    font-family: universalavenue;

    src:

        url("../../public/fonts/universalavenue.woff2") format("woff2"),
        url("../../public/fonts/universalavenue.woff") format("woff"),


    font-style: normal;
    font-weight: 400;
}

Apart from the extra empty lines (which do not cause issue but are not pretty), you can see that src do not end with a semicolon as it should.

Thanks !

An in-range update of eslint-plugin-import is breaking the build 🚨

Version 2.4.0 of eslint-plugin-import just got published.

Branch Build failing 🚨
Dependency eslint-plugin-import
Current Version 2.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-import is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 10 commits.

  • 44ca158 update utils changelog
  • a3728d7 bump eslint-module-utils to v2.1.0
  • 3e29169 bump v2.4.0
  • ea9c92c Merge pull request #737 from kevin940726/master
  • 8f9b403 fix typos, enforce type of array of strings in allow option
  • 95315e0 update CHANGELOG.md
  • 28e1623 eslint-module-utils: filePath in parserOptions (#840)
  • 2f690b4 update CI to build on Node 6+7 (#846)
  • 7d41745 write doc, add two more tests
  • dedfb11 add allow glob for rule no-unassigned-import, fix #671

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-ava is breaking the build 🚨

Version 4.1.0 of eslint-plugin-ava just got published.

Branch Build failing 🚨
Dependency eslint-plugin-ava
Current Version 4.0.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-ava is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 4 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-react is breaking the build 🚨

Version 7.1.0 of eslint-plugin-react just got published.

Branch Build failing 🚨
Dependency eslint-plugin-react
Current Version 7.0.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-react is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details

Release Notes v7.1.0

Added

Fixed

  • Fix prefer-stateless-function ignorePureComponents option when using class expressions (#1122 @dreid)
  • Fix void-dom-elements-no-children crash (#1195 @oliviertassinari)
  • Fix require-default-props quoted defaultProps detection (#1201)
  • Fix jsx-sort-props bug with ignoreCase and callbacksLast options set to true (#1175 @jseminck)
  • Fix no-unused-proptype false positive (#1183 #1135 @jseminck)
  • Fix jsx-no-target-blank to not issue errors for non-external URLs (#1216 @gfx)
  • Fix prop-types quoted Flow types detection (#1132 @ethanjgoldberg)
  • Fix no-array-index-key crash with key without value (#1242 @jseminck)

Changed

Commits

The new version differs by 105 commits.

  • cdfa56f Update CHANGELOG and bump version
  • 8bdb6a4 Update dependencies
  • 5be0be3 Remove re-added require-extension rule documentation
  • e7836b5 Add ESLint 4.0.0 to peerDependencies
  • 7cc380a Fix indent errors
  • 32bcb48 Merge pull request #1177 from fatfisz/curly-spacing-for-children
  • d57c115 Update the docs
  • 6903f18 Add back the support for the previous config
  • 5515130 Add more mixed tests
  • 408e1b1 Add the "children" property of the config
  • 65135b8 Fix the behavior of the boolean "attributes"
  • 7b9d9ad Change "spaces" to "when"
  • c9e9ded Allow attributes to have their own config
  • 9a8f800 Add a test case for a fixed bug
  • 0f0ab21 Move the first option into the config object

There are 105 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint is breaking the build 🚨

Version 3.17.0 of eslint just got published.

Branch Build failing 🚨
Dependency eslint
Current Version 3.16.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes v3.17.0
  • 4fdf6d7 Update: deprecate applyDefaultPatterns in line-comment-position (#8183) (alberto)
  • 25e5817 Fix: Don't autofix + +a to ++a in space-unary-ops (#8176) (Alan Pierce)
  • a6ce8f9 Build: Sort rules before dumping them to doc files (#8154) (Danny Andrews)
  • 0af9057 Chore: Upgrade to a patched version of mock-fs (fixes #8177) (#8188) (Teddy Katz)
  • bf4d8cf Update: ignore eslint comments in lines-arount-comment (fixes #4345) (#8155) (alberto)
  • dad20ad New: add SourceCode#getLocFromIndex and #getIndexFromLoc (fixes #8073) (#8158) (Teddy Katz)
  • 18a519f Update: let RuleTester cases assert that no autofix occurs (fixes #8157) (#8163) (Teddy Katz)
  • a30eb8d Docs: improve documentation for RuleTester cases (#8162) (Teddy Katz)
  • a78ec9f Chore: upgrade coveralls to ^2.11.16 (#8161) (alberto)
  • d02bd11 Fix: padded-blocks autofix problems with comments (#8149) (alberto)
  • 9994889 Docs: Add missing space to create in no-use-before-define (#8166) (Justin Anastos)
  • 4d542ba Docs: Remove unneeded statement about autofix (#8164) (alberto)
  • 20daea5 New: no-compare-neg-zero rule (#8091) (薛定谔的猫)
  • 4d35a81 Fix: Add a utility to avoid autofix conflicts (fixes #7928, fixes #8026) (#8067) (Alan Pierce)
  • 287e882 New: nonblock-statement-body-position rule (fixes #6067) (#8108) (Teddy Katz)
  • 7f1f4e5 Chore: remove unneeded devDeps linefix and gh-got (#8160) (alberto)
  • ca1694b Update: ignore negative ranges in fixes (#8133) (alberto)
  • 163d751 Docs: lines-around-comment doesn't disallow empty lines (#8151) (alberto)
  • 1c84922 Chore: upgrade eslint-plugin-node (#8156) (alberto)
  • 1ee5c27 Fix: Make RuleTester handle empty-string cases gracefully (fixes #8142) (#8143) (Teddy Katz)
  • 044bc10 Docs: Add details about "--fix" option for "sort-imports" rule (#8077) (Olivier Audard)
  • 3fec54a Add option to ignore property in no-param-reassign (#8087) (Christian Bundy)
  • 4e52cfc Fix: Improve keyword-spacing typescript support (fixes #8110) (#8111) (Reyad Attiyat)
  • 7ff42e8 New: Allow regexes in RuleTester (fixes #7837) (#8115) (Daniel Lo Nigro)
  • cbd7ded Build: display rules’ meta data in their docs (fixes #5774) (#8127) (Wilson Kurniawan)
  • da8e8af Update: include function name in report message if possible (fixes #7260) (#8058) (Dieter Luypaert)
  • 8f91e32 Fix: ignoreRestSiblings option didn't cover arguments (fixes #8119) (#8120) (Toru Nagashima)
Commits

The new version differs by 29 commits .

  • f882a11 3.17.0
  • 6748c18 Build: package.json and changelog update for 3.17.0
  • 4fdf6d7 Update: deprecate applyDefaultPatterns in line-comment-position (#8183)
  • 25e5817 Fix: Don't autofix + +a to ++a in space-unary-ops (#8176)
  • a6ce8f9 Build: Sort rules before dumping them to doc files (#8154)
  • 0af9057 Chore: Upgrade to a patched version of mock-fs (fixes #8177) (#8188)
  • bf4d8cf Update: ignore eslint comments in lines-arount-comment (fixes #4345) (#8155)
  • dad20ad New: add SourceCode#getLocFromIndex and #getIndexFromLoc (fixes #8073) (#8158)
  • 18a519f Update: let RuleTester cases assert that no autofix occurs (fixes #8157) (#8163)
  • a30eb8d Docs: improve documentation for RuleTester cases (#8162)
  • a78ec9f Chore: upgrade coveralls to ^2.11.16 (#8161)
  • d02bd11 Fix: padded-blocks autofix problems with comments (#8149)
  • 9994889 Docs: Add missing space to create in no-use-before-define (#8166)
  • 4d542ba Docs: Remove unneeded statement about autofix (#8164)
  • 20daea5 New: no-compare-neg-zero rule (#8091)

There are 29 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

How can I use a configuration file?

Hello! Thanks for the awesome package!
I had a problem to use a configuration file for run that package via cli.
I tried a lot of ways: in package.json, in .webfontrc etc.
I tried to run webfont and got different errors, for example:

webfont --config
/Users/yamaha/.nvm/versions/node/v6.10.2/lib/node_modules/webfont/node_modules/resolve-from/index.js:7
                throw new TypeError('Expected `fromDir` and `moduleId` to be a string');
webfont --config ".webfontrc"

  Generator of fonts from svg icons, svg icons to svg font, svg font to ttf, ttf to eot, ttf to woff, ttf to woff2

  Usage
      $ webfont [input] [options]

webfont ./src/assets/images/icons/*.svg -d ./src/assets/icons --config ./webfont.json
TypeError: Path must be a string. Received null
    at assertPath (path.js:7:11)
    at Object.resolve (path.js:1146:7)
    at /Users/yamaha/.nvm/versions/node/v6.10.2/lib/node_modules/webfont/dist/standalone.js:161:55
webfont ./src/assets/images/icons/*.svg -d ./src/assets/icons --config"./webfont.json"
/Users/yamaha/.nvm/versions/node/v6.10.2/lib/node_modules/webfont/node_modules/resolve-from/index.js:7
                throw new TypeError('Expected `fromDir` and `moduleId` to be a string');

If I use without --config param my configs (in package.json and .webfontrc) aren't applied.

feat: support `files` from `config` file

Hi,

When i run the below command the icon is created only the svg file specified in the cmd line. I have specified 2 files in the webfont.config.json. How to create icons for the 2 SVG files specified in the json file.

cmd> webfont "src/assets/images/action-sheet-check.eps.svg" --dest "src/assets/icons2" -s "src/assets/icons2/dfw.css" --config "webfont.config.json"

webfont.config.json

{
"files": [
"src/assets/images/action-sheet-check.eps.svg",
"src/assets/images/arrow-left-black-sm.eps.svg"
],
"dest": "src/assets/icons2",
"dest-css-template": "src/assets/icons2/dfw.css",
"fontName": "my-font-name"
}

An in-range update of remark-cli is breaking the build 🚨

Version 3.0.1 of remark-cli just got published.

Branch Build failing 🚨
Dependency remark-cli
Current Version 3.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As remark-cli is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details - ✅ **continuous-integration/travis-ci/push** The Travis CI build passed [Details](https://travis-ci.org/itgalaxy/webfont/builds/227124628?utm_source=github_status&utm_medium=notification),- ❌ **continuous-integration/appveyor/branch** AppVeyor build failed [Details](https://ci.appveyor.com/project/evilebottnawi/webfont/build/253)

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-node is breaking the build 🚨

Version 4.2.0 of eslint-plugin-node just got published.

Branch Build failing 🚨
Dependency eslint-plugin-node
Current Version 4.1.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-node is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes v4.2.0

Deprecate a rule

Bug fixes

Commits

The new version differs by 4 commits .

  • 242eeeb 4.2.0
  • 4cc0e3f Fix: third-party does not hide core modules
  • 61fcbb0 Update: deprecate no-hide-core-modules (fixes #69)
  • 8be4d96 Fix: ensure files exist with case sensitive (fixes #68)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-import is breaking the build 🚨

Version 2.6.0 of eslint-plugin-import just got published.

Branch Build failing 🚨
Dependency eslint-plugin-import
Current Version 2.5.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-import is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 22 commits.

  • 8101d39 bump to 2.6.0, node/0.3.1, webpack/0.8.3, memo-parser/0.2.0
  • 7f055ec chore(eslint): upgrade to eslint@4
  • 0263be4 memo-parser: require eslint >= 3.5.0 (need file path always)
  • b1eeade build on node v4, again (#855)
  • 14c501e Merge pull request #865 from sompylasar/eslint-module-utils_tests
  • 117717f eslint-module-utils: Fix resolver tests for Windows paths
  • 314ead8 eslint-module-utils: Fix test coding style
  • 2bc4f7f eslint-module-utils: Add test for ignore
  • 3b4cb47 eslint-module-utils: Add test for import/resolver config checks
  • 06695c4 eslint-module-utils: Add test for when resolver version is not specified
  • f65c263 eslint-module-utils: Unified test specs names to not use 'should' word
  • a0012f8 eslint-module-utils: Add tests for resolver versions
  • 17d2ee9 eslint-module-utils: Add tests for hash utils
  • 60b524b Merge commit '3c46d308ccb462a52554257c49c374045d1a6cf7' into file_path_in_parser_options
  • 5732742 eslint-module-utils: In tests move require stub parser to the top.

There are 22 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of coveralls is breaking the build 🚨

Version 2.13.1 of coveralls just got published.

Branch Build failing 🚨
Dependency coveralls
Current Version 2.13.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As coveralls is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details - ✅ **continuous-integration/travis-ci/push** The Travis CI build passed [Details](https://travis-ci.org/itgalaxy/webfont/builds/226617772),- ❌ **continuous-integration/appveyor/branch** AppVeyor build failed [Details](https://ci.appveyor.com/project/evilebottnawi/webfont/build/241)

Commits

The new version differs by 1 commits0.

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-unicorn is breaking the build 🚨

Version 2.1.0 of eslint-plugin-unicorn just got published.

Branch Build failing 🚨
Dependency eslint-plugin-unicorn
Current Version 2.0.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-unicorn is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 3 commits .

  • 7f7ac93 2.1.0
  • 8f1d105 Add support for custom errors in the throw-new-error rule (#88)
  • c1c1799 Bug fix for number only escapes in escape-case rule (#86)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

feat: randomize files name

How can I randomize font files name? I have some problem with browser cache so I want to generate file like webfont.scss with src: url("[some-random-string]") How can I do that ?

An in-range update of prettier is breaking the build 🚨

Version 1.5.0 of prettier just got published.

Branch Build failing 🚨
Dependency prettier
Current Version 1.4.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As prettier is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes 1.5.0: GraphQL, CSS-in-JS & JSON

image

This is the release I've been waiting for a very long time: one that has only minimal changes to JavaScript!

For the past 6 months, we kept doing changes to various aspects of printing JavaScript, with the hope that one day we would get to a stable place. No automated tool is going to print perfect code for all the possible edge cases. The goal is to find a good place where when people report code that is printed in a funny way, we can't make it better without making other pieces of code look worse, introduce behavior that's very hard to understand for humans and doesn't introduce some disproportionate complexity to the codebase.

We're not 100% there yet, but we're closer than ever!

Now that JavaScript needs for support is trending down, it's an opportunity to support other languages that front-end developers are working on and want formatted. We've introduced TypeScript and CSS in the last release and are doing a batch of fixes for them in this release. We're also adding support for new languages: GraphQL queries, embedding CSS-in-JS and JSON are now available in prettier!

Blog Post: Adding a new layout strategy to Prettier by @karl

Prettier is not only a useful tool but it's also a really cool piece of technology. @karl spent a bunch of time improving JSX support and in the process implemented a new primitive to prettier: fill. He wrote a very interesting blog post Adding a new layout strategy to Prettier that I highly recommend reading if you're interested in how prettier is working behind the scenes.

GraphQL

Thanks to @stubailo, @jnwng, @tgriesser and @azz, prettier now supports printing GraphQL queries!

It works for .graphql files and within JavaScipt templates that start with graphql, graphql.experimental and gql in order to work with Relay and Apollo.

ReactDOM.render(
  <QueryRenderer
    query={graphql`
      query appQuery {
        viewer {
          ...TodoApp_viewer
        }
      }
    `}
    // ...
  />,
  mountNode
);

Note that it only supports the open source syntax of GraphQL, therefore doesn't work with Relay Classic, it only works with Relay Modern.

CSS-in-JS

If you are using styled-components or styled-jsx, prettier will now reformat the CSS inside of your template expressions.

const EqualDivider = styled.div`
  margin: 0.5rem;
  padding: 1rem;
  background: papayawhip;
  > * {
    flex: 1;
    &:not(:first-child) {
      ${props => (props.vertical ? "margin-top" : "margin-left")}: 1rem;
    }
  }
`;

JSON

This was pretty straightforward to implement but nonetheless very useful. Thanks to @josephfrazier for doing it :)

{
  "name": "prettier",
  "version": "1.5.0",
  "description": "Prettier is an opinionated JavaScript formatter",
  "bin": {
    "prettier": "./bin/prettier.js"
  }
}

CSS

I'm really excited because we only put a few days to build the initial CSS support and it has worked surprisingly well. This release brings a handful of important improvements to CSS but nothing that required big changes.

CSS: Every selector is now printed in its own line (#2047) by @yuchi

The biggest unknown when printing CSS was how to deal with multiple selectors. The initial approach we took was to use the 80 columns rule where we would only split if it was bigger than that. Many people reported that they were using another strategy for this: always break after a ,. It turns out that many popular codebases are using this approach and it feels good as you can see the structure of the selectors when layed out on-top of each others.

// Before
.clusterPlannerDialog input[type="text"], .clusterPlannerDialog .uiTypeahead {

// After
.clusterPlannerDialog input[type="text"],
.clusterPlannerDialog .uiTypeahead {

CSS: lowercase hex colors (#2203) by @azz

The concept of code formatting has blurry boundaries. The core aspect of it is around whitespaces but some things like single vs double quotes and semi-colons are usually bundled with it. With prettier on JavaScript, we also lightly reformat strings by removing extra \ and normalize numbers. For CSS, we need to do a similar interpretation of where the boundary ends. For colors, we decided to turn all the letters into lowercase and stop there. Turning rgb() into hex or 6 hex into 3 hex is out of scope.

// Before
.foo {
  color: #AAA;
  -o-color: #fabcd3;
  -ms-color: #AABBCC;
}

// After
.foo {
color: #aa;
-o-color: #fabcd3;
-ms-color: #aabbcc;
}

CSS: Use fill for CSS values (#2224)

The new fill primitive turned out to be very useful for CSS. For long values, instead of breaking and putting a \n before every element, we can instead only put a \n when it goes over the limit. It leads to much better looking code.

// Before
border-left:
  1px
  solid
  mix($warningBackgroundColors, $warningBorderColors, 50%);

// After
border-left: 1px solid
mix($warningBackgroundColors, $warningBorderColors, 50%);

CSS: Allow long media rules to break (#2219)

This is another small fix in the journey of properly supporting a new language. We now encode the ability to break on long @media rules.

// Before
@media all and (-webkit-min-device-pixel-ratio: 1.5), all and (-o-min-device-pixel-ratio: 3/2), all and (min--moz-device-pixel-ratio: 1.5), all and (min-device-pixel-ratio: 1.5) {
}

// After
@media all and (-webkit-min-device-pixel-ratio: 1.5),
all and (-o-min-device-pixel-ratio: 3/2),
all and (min--moz-device-pixel-ratio: 1.5),
all and (min-device-pixel-ratio: 1.5) {
}

CSS: Print @else on same line as } (#2088) by @azz

Less and Scss are turning into real programming languages :) Step by step, we're starting to print all their constructs in the same way as JavaScript. This time, it's the else placement.

// Before
@if $media == phonePortrait {
  $k: .15625;
}
@else if $media == tabletPortrait {
  $k: .065106;
}

// After
@if $media == phonePortrait {
$k: .15625;
} @else if $media == tabletPortrait {
$k: .065106;
}

CSS: implement prettier-ignore (#2089) by @azz

While we want prettier to format the entire codebase, there are times where we "know better" and want an escape hatch. This is where the prettier-ignore comment comes in. It wasn't working for CSS but that was an oversight, now it is implemented :)

// Before
foo {
  /* prettier-ignore */
  thing: foo;
  -ms-thing: foo;
}

// After
foo {
/* prettier-ignore */
thing: foo;
-ms-thing: foo;
}

CSS: Fix css-modules composes breaking with long line width (#2190) by @tdeekens

In order to be fast, many "packagers" do not parse files in order to extract dependencies but instead use a crude regex. This is a reason why we don't break long require() calls and it happens to also affect CSS Modules. If you add new lines in the composes field, it doesn't recognize it anymore. So we're no longer breaking it there, even if it goes over 80 columns.

// Before
.reference {
  composes: 
    selector 
    from
    "a/long/file/path/exceeding/the/maximum/length/forcing/a/line-wrap/file.css";
}

// After
.reference {
composes: selector from "a/long/file/path/exceeding/the/maximum/length/forcing/a/line-wrap/file.css";
}

CSS: First try scss when there's an @import with comma (#2225)

We made a decision to have only a single high level "parser" for CSS, SCSS and Less even though we are using postcss-less and postcss-scss under the hood. We use a regex to figure out which parser to try first and fallback to the other one if a syntax error is thrown. Unfortunately, for certain features, the first (incorrect) parser doesn't throw and instead skips some elements. So, we need to beef up the regex to make sure we are right for the early detection.

Thankfully, this hack is working well in practice. If we find a lot more edge cases, we'll likely want to do the right thing(tm) and split them into two parsers.

// Before
@import "text-shadow";

// After
@import "rounded-corners", "text-shadow";

TypeScript

TypeScript support is now solid, all the changes for this release are small edge cases.

TypeScript: print arrow function type params on same line as params (#2101) by @azz

The core algorithm of prettier is to expand a group if all the elements do not fit. It works really well in practice for most of JavaScript but there's one case it doesn't handle very well is when there are two groups side by side, in this case: <Generics>(Arguments). We have to carefully create groups such that arguments expand first as this is generally what people expect.

// Before
export const forwardS = R.curry(<
  V,
  T
>(prop: string, reducer: ReducerFunction<V, T>, value: V, state: {[name: string]: T}) =>
  R.assoc(prop, reducer(value, state[prop]), state)
);

// After
export const forwardS = R.curry(
<V, T>(
prop: string,
reducer: ReducerFunction<V, T>,
value: V,
state: { [name: string]: T }
) => R.assoc(prop, reducer(value, state[prop]), state)
);

TypeScript: keep parens around with yield/await non-null assertion (#2149) by @azz

For better or worse, we decided to manually handle adding parenthesis. So when a new operator is introduced, we need to make sure that we add correct parenthesis when nested with any other combination of operators. In this case, we missed await inside of TypeScript !.

// Before
const bar = await foo(false)!;

// After
const bar = (await foo(false))!;

TypeScript: Print {} in import if it's in the source (#2150) by @azz

We use typescript-eslint-parser project that translates TypeScript AST into estree AST in order for prettier to print it. From time to time we're going to find edge cases that it doesn't handle yet. In this case, it didn't give a way to tell that there's an empty {}, which apparently is important for TypeScript. Thankfully, the team is very responsive and they fixed it after we put a workaround inside of prettier.

// Before
import from "@types/googlemaps";

// After
import {} from "@types/googlemaps";

TypeScript: Always break interfaces onto multiple lines (#2161) by @azz

The code that implements interface is shared with the code that prints objects, which contains a rule to keep them expanded if there's a \n inside. But, this is not the intended behavior for interfaces. We always want to expand, like we do for classes, even if it fits 80 columns.

// Before
interface FooBar { [id: string]: number; }

// After
interface FooBar {
[id: string]: number;
}

TypeScript: Fix extra semicolon in ambient typescript declaration emit (#2167) by @azz

no-semi and semi are often requested but on the prettier team we're one step ahead and implemented two-semi for you! Just kidding, it was a bug and is now fixed ;)

// Before
declare module "classnames" {
  export default function classnames(
    ...inputs: (string | number | false | object | undefined)[]
  ): string;;
}

// After
declare module "classnames" {
export default function classnames(
...inputs: (string | number | false | object | undefined)[]
): string;
}

TypeScript: group function params in call/construct signatures (#2169) by @azz

Adding a comment before a method used to take into account the comment length and would often expand the method when it wasn't expected. Thankfully, it was a simple fix, just wrap the output in a group.

// Before
interface TimerConstructor {
  // Line-splitting comment
  new (
    interval: number,
    callback: (handler: Timer) => void
  ): Timer;
}

interface TimerConstructor {
// Line-splitting comment
new (interval: number, callback: (handler: Timer) => void): Timer;
}

TypeScript: Upgrade tsep (#2183) by @azz

This bug was very annoying if you ran into it: anytime you formatted the code, it would add one more _ to the object key!

// Before
obj = {                                                                               
  __: 42
  ___: 42
};

// After
obj = {
_: 42
__: 42
};

TypeScript: break on multiple interface extends (#2085) by @azz

Unlike in JavaScript, TypeScript lets you extend multiple classes at once. It turns out that people use this feature and prettier now does a better job at printing it.

// Before
export interface ThirdVeryLongAndBoringInterfaceName extends AVeryLongAndBoringInterfaceName, AnotherVeryLongAndBoringInterfaceName, AThirdVeryLongAndBoringInterfaceName {}

// After
export interface ThirdVeryLongAndBoringInterfaceName
extends AVeryLongAndBoringInterfaceName,
AnotherVeryLongAndBoringInterfaceName,
AThirdVeryLongAndBoringInterfaceName {}

TypeScript: handle ObjectPattern instead of ObjectExpression inside BinaryExpression (#2238) by @azz

This one isn't very interesting, it's an edge case that's not properly handled in the TypeScript -> estree conversion.

// Before
call(c => { bla: 1 }) || [];

// After
call(c => ({ bla: 1 })) || [];

Preserve lines after directives (#2070)

By supporting TypeScript, prettier is now being used in a lot of Angular codebases which exercises edge cases that were not properly handled. In this case, we didn't preserve empty lines after directives inside of a function.

// Before
export default class {
  constructor($log, $uibModal) {
    "ngInject";
    Object.assign(this, { $log, $uibModal });

// After
export default class {
constructor($log, $uibModal) {
"ngInject";

<span class="pl-c1">Object</span>.<span class="pl-en">assign</span>(<span class="pl-c1">this</span>, { $log, $uibModal });</pre></div>

JavaScript

This release is very light in terms of JavaScript changes, which is awesome. We're starting to see the light at the end of the tunnel and get towards a great pretty printer. We're never going to get to a 100% perfect automatic pretty printer. The goal is that for every issue we get, there are no clear ways to improve the way it is printed without regressing other pieces.

Allow JSX lines to be recombined (#1831) by @karl

The goal of prettier is to have a consistent way to format your code: given an AST, we always print the same way. In two places we had to compromise and read the original format: JSX and Objects. With this change, we're no longer relying on the original input for JSX with text inside. This lets us reflow text inside of JSX.

// Before
const Abc = () => {
  return (
    <div>
      Please state your
      {" "}
      <b>name</b>
      {" "}
      and
      {" "}
      <b>occupation</b>
      {" "}
      for the board of directors.
    </div>
  );
};

// After
const Abc = () => {
return (
<div>
Please state your <b>name</b> and <b>occupation</b> for the board of
directors.
</div>
);
}

Break on non-literal computed member expression (#2087) by @azz

Printing member chains is the most complicated piece of prettier and we keep finding small tweaks we can do to make it a better experience.

// Before
nock(/test/)
  .matchHeader("Accept", "application/json")[httpMethodNock(method)]("/foo")
  .reply(200, {
    foo: "bar",
  });

// After
nock(/test/)
.matchHeader("Accept", "application/json")
[httpMethodNock(method)]("/foo")
.reply(200, {
foo: "bar",
});

Indent first variable in one-var scenario (#2095) by @azz

Up until recently we haven't done much to support printing multiple variables in a single declaration as the most common practice is to do one variable declaration per variable. For single declarations, we don't want to indent it, but it turns out that we do when there are other ones afterwards, otherwise it looks weird.

// Before
var templateTagsMapping = {
 '%{itemIndex}': 'index',
 '%{itemContentMetaTextViews}': 'views'
},
  separator = '<span class="item__content__meta__separator">•</span>';

// After
var templateTagsMapping = {
'%{itemIndex}': 'index',
'%{itemContentMetaTextViews}': 'views'
},
separator = '<span class="item__content__meta__separator">•</span>';

Allow break with both default named import (#2096) by @azz

This one is an unfortunate regression from 1.4 where we inlined import that only contained a single element. Turns out the definition of a single element allowed a single type and a single element. This is now corrected!

// Before
import transformRouterContext, { type TransformedContextRouter } from '../../helpers/transformRouterContext';

// After
import transformRouterContext, {
type TransformedContextRouter
} from '../../helpers/transformRouterContext';

Turn allowImportExportEverywhere on (#2207) by @zimme

The goal of prettier is to format code people write in practice, so we enable loose/experimental modes for all the parsers we support. Babylon allows you to write import within a function, which is not part of the standard, but it doesn't cost us much to allow it.

// Before
ParseError

// After
function f() {
import x from 'x';
}

Support inline template for new calls (#2222)

We keep adding features for function calls and have to backport them to new calls as they have a different AST node type but in practice we want to treat them the same. This fix refactored the two so that they are going through the same call site, so hopefully should prevent more from sneaking in.

// Before
new Error(
  formatErrorMessage`
    This a really bad error.
    Which has more than one line.
  `
);

// After
new Error(formatErrorMessage</span></span> <span class="pl-s"> This a really bad error.</span> <span class="pl-s"> Which has more than one line.</span> <span class="pl-s"><span class="pl-pds">);

Don't indent + in object value (#2227)

When we switched to using the same heuristic for assignment (a = b) for objects ({a: b}), we forgot to fix the indentation. Now it's fixed.

// Before
var abc = {
  thing:
    "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf" +
      "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf" +
      "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf",
}

// After
var abc = {
thing:
"asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf" +
"asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf" +
"asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf",
}

Handle conditions inside of a ternary (#2228)

Prettier already had a special case when the expression was a conditional but it didn't apply when the conditional was the left part of a ternary. Now it does.

// Before
room = room.map((row, rowIndex) =>
  row.map(
    (col, colIndex) =>
      rowIndex === 0 ||
        colIndex === 0 ||
        rowIndex === height ||
        colIndex === width
        ? 1
        : 0
  )
);

// After
room = room.map((row, rowIndex) =>
row.map(
(col, colIndex) =>
rowIndex === 0 ||
colIndex === 0 ||
rowIndex === height ||
colIndex === width
? 1
: 0
)
);

Add caching for printing (#2259)

With the 1.0 release, we fixed a bug in the printing that introduced an exponential behavior. We've been able to mitigate the biggest issue such that reasonable code didn't time out, but it wasn't completely fixed it. By adding a caching layer at the right spot, we should now be in the clear.

This should make printing the IR of prettier using prettier in debug mode no longer time out.

// Before
...times out...

// After
someObject.someFunction().then(function () {
return someObject.someFunction().then(function () {
return someObject.someFunction().then(function () {
return someObject.someFunction().then(function () {
return someObject.someFunction().then(function () {
return someObject.someFunction().then(function () {
return someObject.someFunction().then(function () {
return someObject.someFunction().then(function () {
return someObject.someFunction().then(function () {
anotherFunction();
});
});
});
});
});
});
});
});
});

Fix variance location (#2261)

We refactored the code that prints modifiers when we introduced TypeScript support and accidentally moved around the variance (+) part before static which is not valid in Flow. This is now fixed.

// Before
class Route {
  +static param: T;
}

// After
class Route {
static +param: T;
}

Miscellaneous

Various fixes for range and cursor tracking (#2266, #2248, #2250, #2136) by @CiGit and @josephfrazier

Both those features were introduced in the last release and we discovered a bunch of issues when actually using them in production. A bunch of them got fixed, if you see more, please report them!

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-promise is breaking the build 🚨

Version 3.5.0 of eslint-plugin-promise just got published.

Branch Build failing 🚨
Dependency eslint-plugin-promise
Current Version 3.4.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-promise is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details
Commits

The new version differs by 5 commits .

  • cf01cd1 3.5.0
  • 37fb563 Merge pull request #57 from ChristianMurphy/issue-53
  • df7bfef Add recommended configuration to README documentation
  • dc4c033 Add recommended configuration
  • ce7a555 Updated changelog

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint is breaking the build 🚨

Version 3.15.0 of eslint just got published.

Branch Build failing 🚨
Dependency eslint
Current Version 3.14.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/appveyor/branch AppVeyor build succeeded Details

  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v3.15.0
  • f2a3580 Fix: no-extra-parens incorrect precedence (fixes #7978) (#7999) (alberto)
  • d6b6ba1 Fix: no-var should fix ForStatement.init (#7993) (Toru Nagashima)
  • 99d386d Upgrade: Espree v3.4.0 (#8019) (Kai Cataldo)
  • 42390fd Docs: update README.md for team (#8016) (Toru Nagashima)
  • d7ffd88 Chore: enable template-tag-spacing on ESLint codebase (#8005) (Teddy Katz)
  • f2be7e3 Docs: Fix typo in object-curly-newline.md (#8002) (Danny Andrews)
  • df2351a Docs: Fix misleading section in brace-style documentation (#7996) (Teddy Katz)
  • 5ae6e00 Chore: avoid unnecessary feature detection for Symbol (#7992) (Teddy Katz)
  • 5d57c57 Chore: fix no-else-return lint error (refs #7986) (#7994) (Vitor Balocco)
  • 62fb054 Chore: enable no-else-return on ESLint codebase (#7986) (Teddy Katz)
  • c59a0ba Update: add ignoreRestSiblings option to no-unused-vars (#7968) (Zack Argyle)
  • 5cdfa99 Chore: enable no-unneeded-ternary on ESLint codebase (#7987) (Teddy Katz)
  • fbd7c13 Update: ensure operator-assignment handles exponentiation operators (#7970) (Teddy Katz)
  • c5066ce Update: add "variables" option to no-use-before-define (fixes #7111) (#7948) (Teddy Katz)
  • 09546a4 New: template-tag-spacing rule (fixes #7631) (#7913) (Jonathan Wilsson)
Commits

The new version differs by 17 commits .

  • 8ea98f9 3.15.0
  • 77b5cb7 Build: package.json and changelog update for 3.15.0
  • f2a3580 Fix: no-extra-parens incorrect precedence (fixes #7978) (#7999)
  • d6b6ba1 Fix: no-var should fix ForStatement.init (#7993)
  • 99d386d Upgrade: Espree v3.4.0 (#8019)
  • 42390fd Docs: update README.md for team (#8016)
  • d7ffd88 Chore: enable template-tag-spacing on ESLint codebase (#8005)
  • f2be7e3 Docs: Fix typo in object-curly-newline.md (#8002)
  • df2351a Docs: Fix misleading section in brace-style documentation (#7996)
  • 5ae6e00 Chore: avoid unnecessary feature detection for Symbol (#7992)
  • 5d57c57 Chore: fix no-else-return lint error (refs #7986) (#7994)
  • 62fb054 Chore: enable no-else-return on ESLint codebase (#7986)
  • c59a0ba Update: add ignoreRestSiblings option to no-unused-vars (#7968)
  • 5cdfa99 Chore: enable no-unneeded-ternary on ESLint codebase (#7987)
  • fbd7c13 Update: ensure operator-assignment handles exponentiation operators (#7970)

There are 17 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of babel-preset-es2015 is breaking the build 🚨

Version 6.24.0 of babel-preset-es2015 just got published.

Branch Build failing 🚨
Dependency babel-preset-es2015
Current Version 6.22.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As babel-preset-es2015 is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

  • continuous-integration/travis-ci/push The Travis CI build passed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of svgicons2svgfont is breaking the build 🚨

Version 5.0.1 of svgicons2svgfont just got published.

Branch Build failing 🚨
Dependency svgicons2svgfont
Current Version 5.0.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

svgicons2svgfont is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 11 commits.

  • 620f4d7 5.0.1
  • edd0d6d Tests and dependencies fix
  • 4d1dbcd prependUnicode support for Windows
  • db1b0a8 Test expression to variable
  • 5bd4a71 Merge pull request #51 from TylerYang/master
  • a894b14 Merge pull request #55 from mickrip/patch-1
  • 57d5343 Fixed typo
  • 8e298b6 Merge pull request #52 from fleg/master
  • afc1922 Fix urls for another cli utils in readme
  • 3d2c8de Fix svgfont2svgicons repo url in readme
  • d811b2e Add warning text when the fontHeight is smaller than 1000

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-promise is breaking the build 🚨

Version 3.4.1 of eslint-plugin-promise just got published.

Branch Build failing 🚨
Dependency eslint-plugin-promise
Current Version 3.4.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-promise is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 8 commits .

  • 78b7639 3.4.1
  • bb7226b Merge pull request #51 from zloirock/fix-49
  • 85ffe84 add test for #49
  • 81b2172 fix #49
  • 803a4ab Merge pull request #45 from ascariandrea/36-rule_always_return_fails_on_import
  • c931de0 Used 'node' for context.report, closes #36.
  • 6f49856 Merge pull request #41 from jfmengels/fix-typo
  • 6837bef Fix typo in README

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of nyc is breaking the build 🚨

Version 10.3.2 of nyc just got published.

Branch Build failing 🚨
Dependency nyc
Current Version 10.3.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As nyc is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details,- ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 2 commits0.

  • e062a86 chore(release): 10.3.2
  • 213206f fix: we should not create a cache folder if cache is false (#567)

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-lodash is breaking the build 🚨

Version 2.3.3 of eslint-plugin-lodash just got published.

Branch Build failing 🚨
Dependency eslint-plugin-lodash
Current Version 2.3.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-lodash is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 2 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of cosmiconfig is breaking the build 🚨

Version 2.1.2 of cosmiconfig just got published.

Branch Build failing 🚨
Dependency cosmiconfig
Current Version 2.1.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

cosmiconfig is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details - ✅ **continuous-integration/travis-ci/push** The Travis CI build passed [Details](https://travis-ci.org/itgalaxy/webfont/builds/225836257),- ❌ **continuous-integration/appveyor/branch** AppVeyor build failed [Details](https://ci.appveyor.com/project/evilebottnawi/webfont/build/236)

Commits

The new version differs by 15 commits0.

  • 324ba6e Prepare 2.1.2
  • 5f80efe Merge pull request #64 from ben-eb/is-directory
  • e8f77cb Replace isDirectory with is-directory from npm. Closes #63.
  • 12cb412 Load return value is Promise
  • 9fb6cea Merge pull request #55 from davidtheclark/revert-51-fix-require
  • c23081a Revert "Use require instead of requireFromString."
  • c3de01c Merge pull request #51 from izaakschroeder/fix-require
  • 1e3ca10 Revert "Add ES2015 test."
  • b45c11e Update documentation.
  • f22168f Add ES2015 test.
  • 2307346 Rename irequire to importJs.
  • d5f40e7 Use require instead of requireFromString.
  • 836a17c Fix JSON parsing errors in Node 7
  • e8edba9 Merge pull request #54 from davidtheclark/tape-tests
  • 3696d7a Switch AVA to tape; update deps

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

fix: SVG optimization messes up icons

When adding complex icons some SVG optimization messes up the icons.

I can't find any related issues or similar threads, but if anyone knows a fix/workaround please tell me or point me in the right direction. :)

Example where icon fails:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50.11 41.53"><defs><style>.cls-1{fill:#404040;}</style></defs><title>department</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M24,12.51H9.31a1.94,1.94,0,0,0-1.94,1.93v1.1H4.21A4.21,4.21,0,0,0,0,19.75v2A4.21,4.21,0,0,0,4.21,26h7.3a4.21,4.21,0,0,0,4.21-4.21v-2a4.21,4.21,0,0,0-4.21-4.21H8.34v-1.1a1,1,0,0,1,1-1H24.58v2.07H21.41a4.21,4.21,0,0,0-4.21,4.21v2A4.21,4.21,0,0,0,21.41,26h3.17v2.07H17.91A1.94,1.94,0,0,0,16,30v1.1H12.81A4.21,4.21,0,0,0,8.6,35.3v2a4.21,4.21,0,0,0,4.21,4.21h7.3a4.21,4.21,0,0,0,4.21-4.21v-2a4.21,4.21,0,0,0-4.21-4.21H16.94V30a1,1,0,0,1,1-1H32.2a1,1,0,0,1,1,1v1.1H30A4.21,4.21,0,0,0,25.8,35.3v2A4.21,4.21,0,0,0,30,41.53h7.3a4.21,4.21,0,0,0,4.21-4.21v-2a4.21,4.21,0,0,0-4.21-4.21H34.14V30a1.94,1.94,0,0,0-1.94-1.93H25.54V26h3.17a4.21,4.21,0,0,0,4.21-4.21v-2a4.21,4.21,0,0,0-4.21-4.21H25.54V13.47H40.8a1,1,0,0,1,1,1v1.1H38.61a4.21,4.21,0,0,0-4.21,4.21v2A4.21,4.21,0,0,0,38.61,26h7.3a4.21,4.21,0,0,0,4.21-4.21v-2a4.21,4.21,0,0,0-4.21-4.21H42.74v-1.1a1.94,1.94,0,0,0-1.93-1.93H25.54V10.44h3.17a4.21,4.21,0,0,0,4.21-4.21v-2A4.21,4.21,0,0,0,28.71,0h-7.3A4.21,4.21,0,0,0,17.2,4.21v2a4.21,4.21,0,0,0,4.21,4.21h3.17v2.07ZM19.12,6.23v-2a2.28,2.28,0,0,1,2.28-2.28h7.3A2.28,2.28,0,0,1,31,4.21v2a2.28,2.28,0,0,1-2.28,2.28h-7.3A2.28,2.28,0,0,1,19.12,6.23ZM11.51,17.47a2.28,2.28,0,0,1,2.28,2.28v2a2.28,2.28,0,0,1-2.28,2.28H4.21a2.28,2.28,0,0,1-2.28-2.28v-2a2.28,2.28,0,0,1,2.28-2.28h7.3ZM22.39,35.3v2a2.28,2.28,0,0,1-2.28,2.28h-7.3a2.28,2.28,0,0,1-2.28-2.28v-2A2.28,2.28,0,0,1,12.81,33h7.3A2.28,2.28,0,0,1,22.39,35.3Zm17.2,0v2a2.28,2.28,0,0,1-2.28,2.28H30a2.28,2.28,0,0,1-2.28-2.28v-2A2.28,2.28,0,0,1,30,33h7.3A2.28,2.28,0,0,1,39.59,35.3ZM28.71,17.47A2.28,2.28,0,0,1,31,19.75v2a2.28,2.28,0,0,1-2.28,2.28h-7.3a2.28,2.28,0,0,1-2.28-2.28v-2a2.28,2.28,0,0,1,2.28-2.28h7.3Zm19.48,4.31a2.28,2.28,0,0,1-2.28,2.28h-7.3a2.28,2.28,0,0,1-2.28-2.28v-2a2.28,2.28,0,0,1,2.28-2.28h7.3a2.28,2.28,0,0,1,2.28,2.28Z"/></g></g></svg>

Using this npm script:
"webfont-gen": "webfont ./src/icons/*.svg --dest ./pat-to-dest -f icon --center-horizontally --fixed-width --template ./path-to-template --dest-styles ./path-to-dest/ --css-template-font-path /path-to-css-template/"

EDIT: I forgot to tell you what i actually expect. I would either like a fix for my problems, or a way to "turn off" the optimization in my npm script.

An in-range update of babel-core is breaking the build 🚨

Version 6.24.1 of babel-core just got published.

Branch Build failing 🚨
Dependency babel-core
Current Version 6.24.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As babel-core is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

  • continuous-integration/travis-ci/push The Travis CI build passed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Export glyph data in result

It would be handy (at least for my useage) to have access to the raw glyph data, especially the metadata and the unicode mappings. It would be pretty easy to add this as an optional setting. I will PR unless I'm missing a way to access that already? Other systems I've encountered allow this through a 'glyph' emitter. I also thought I might hack the mapping data out with a custom css template but I would rather not go there :)

LMK if you're against this or if I'm missing something? Thanks!

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

I run the my script on a directory with 41214 SVG files and got the following error

function buildFont(config) {
  return webfont({
    files: config.inputFiles,
    fontName: config.fontName
  })
    .then(content => content)
    .catch(err => {
      console.log(err);
    });
}

Error

node --require babel-core/register ./index.js
already exists                                 
                                               
<--- Last few GCs --->                         
                                               
  232006 ms: Mark-sweep 1350.0 (1406.9) -> 1349.8 (1406.9) MB, 574.3 / 0.0 ms [allocation failure] [GC in old space requested].
  232583 ms: Mark-sweep 1349.8 (1406.9) -> 1349.8 (1406.9) MB, 576.6 / 0.0 ms [allocation failure] [GC in old space requested].
  233164 ms: Mark-sweep 1349.8 (1406.9) -> 1349.8 (1403.9) MB, 580.3 / 0.0 ms [last resort gc].
  233745 ms: Mark-sweep 1349.8 (1403.9) -> 1349.7 (1403.9) MB, 580.3 / 0.0 ms [last resort gc].
                                               
                                               
<--- JS stacktrace --->                        
                                               
==== JS stack trace =========================================
                                               
    2: arguments adaptor frame: 2->1           
Security context: 0x4e54c9cfb39 <JS Object>    
    3: round [/data/projects/hanzi-pinyin-font/node_modules/svg-pathdata/src/SVGPathData.js:12] [pc=0x26e3767b3b09] (this=0x217c839e5e99 <an SVGPathData with map 0x375d0749d7b1>)                                 
    4: arguments adaptor frame: 1->0           
    5: /* anonymous */(aka /* anonymous */) [/data/projects/hanzi-pinyin-font/node_modules/svgicons2svgfont/src/index.js:336] [pc=0x26e376698166]...                                                               
                                               
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [node]                       
 2: 0x109b1dc [node]                           
 3: v8::Utils::ReportApiFailure(char const*, char const*) [node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
 5: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [node]
 6: v8::internal::DeoptimizationOutputData::New(v8::internal::Isolate*, int, v8::internal::PretenureFlag) [node] [node]
 7: v8::internal::FullCodeGenerator::PopulateDeoptimizationData(v8::internal::Handle<v8::internal::Code>) [node]
 8: v8::internal::FullCodeGenerator::MakeCode(v8::internal::CompilationInfo*) [node]
 9: v8::internal::Compiler::EnsureDeoptimizationSupport(v8::internal::CompilationInfo*) [node]
10: 0xb538d7 [node]                            
11: 0xb54d4d [node]                            
12: v8::internal::Compiler::CompileOptimized(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ConcurrencyMode) [node]                                                                       
13: v8::internal::Runtime_CompileOptimized_Concurrent(int, v8::internal::Object**, v8::internal::Isolate*) [node]
14: 0x26e374e092a7                             
Aborted                                        
error Command failed with exit code 134. 

Question

How can I solve this?

related:

An in-range update of cross-env is breaking the build 🚨

Version 3.2.0 of cross-env just got published.

Branch Build failing 🚨
Dependency cross-env
Current Version 3.1.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As cross-env is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/appveyor/branch Waiting for AppVeyor build to complete Details

  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v3.2.0

<a name"3.2.0">

3.2.0 (2017-03-04)

Features

  • revamp: revamp the entire lib (backward compatible) (#63) (dad00c46)
Commits

The new version differs by 4 commits .

  • dad00c4 feat(revamp): revamp the entire lib (backward compatible) (#63)
  • e33a85c docs(README): Add doc for cross-var. (#58)
  • 5e590ec docs(README): added how to use cross-env to run npm sub-scripts (#53)
  • afdb2de docs(README): mention Bash on Windows (#49)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Config file isn't being used (7.1.4)

In #64 it was mentioned that this should be fixed in 7.1.3 but I'm still seeing it in 7.1.4.

exc-shared :: cat ./.webfontrc.json
{
  "files": "svg/*.svg",
  "fontName": "icon",
  "formats": ["ttf", "woff"],
  "cssTemplateClassName": "icon",
  "cssTemplateFontPath": "../exc-shared/assets/fonts/",
  "template": "./webfont/icon.less.njk",
  "dest": "./public/assets/fonts/",
  "destStyles": "./app/styles/exc-shared/"
}
exc-shared :: webfont --version
7.1.4
exc-shared :: webfont --config ".webfontrc.json"
<...usage docs...>

Allow usage specify unicode code for each character

I'm building a font from SVG files. For instance:

中.svg
山.svg
火.svg
西.svg
…

However 中 is associate with U+EA02 instead of U+4E2D CJK UNIFIED IDEOGRAPH-4E2D.

Question

Is there a convention I'm missing to assign a glyph to the correct codepoint?

related: parlr/Hanzi-Pinyin-Font#22 - Associate glyph with correct codepoint.

An in-range update of eslint is breaking the build 🚨

Version 3.16.1 of eslint just got published.

Branch Build failing 🚨
Dependency eslint
Current Version 3.16.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes v3.16.1
  • ff8a80c Fix: duplicated autofix output for inverted fix ranges (fixes #8116) (#8117) (Teddy Katz)
  • a421897 Docs: fix typo in arrow-parens.md (#8132) (Will Chen)
  • 22d7fbf Chore: fix invalid redeclared variables in tests (#8130) (Teddy Katz)
  • 8d95598 Chore: fix output assertion typos in rule tests (#8129) (Teddy Katz)
  • 9fa2559 Docs: Add missing quotes in key-spacing rule (#8121) (Glenn Reyes)
  • f3a6ced Build: package.json update for eslint-config-eslint release (ESLint Jenkins)
Commits

The new version differs by 8 commits .

  • 589ab67 3.16.1
  • 4fec5b2 Build: package.json and changelog update for 3.16.1
  • ff8a80c Fix: duplicated autofix output for inverted fix ranges (fixes #8116) (#8117)
  • a421897 Docs: fix typo in arrow-parens.md (#8132)
  • 22d7fbf Chore: fix invalid redeclared variables in tests (#8130)
  • 8d95598 Chore: fix output assertion typos in rule tests (#8129)
  • 9fa2559 Docs: Add missing quotes in key-spacing rule (#8121)
  • f3a6ced Build: package.json update for eslint-config-eslint release

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-import is breaking the build 🚨

Version 2.3.0 of eslint-plugin-import just got published.

Branch Build failing 🚨
Dependency eslint-plugin-import
Current Version 2.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-import is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 46 commits.

  • b79e083 Merge pull request #837 from benmosher/release-2.3.0
  • 74425a2 changelog update for 2.3.0
  • 1377f55 bump v2.3.0
  • 2efc41a fix null pointer exception (#717) (#797)
  • 0fb592e Add support to specify the package.json (#685)
  • 2cc9768 Add test for flow type export (#835)
  • bd0e5e3 Merge pull request #821 from smably/patch-1
  • 412e518 Clarify docs for glob arrays
  • 106740f chore(package): update typescript-eslint-parser to version 2.1.0 (#790)
  • 6288cf9 chore(package): update babel-register to version 6.24.1 (#796)
  • 2e9eea6 newline-after-import test syntax fails
  • c9f10e8 extensions test fixes, attempt 2
  • 861765f fix babel syntax errors in extensions tests
  • 82f796c chore(package): update cross-env to version 4.0.0 (#783)
  • 98e7048 Merge pull request #757 from gmathieu/fix-default-keyword

There are 46 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-jsx-a11y is breaking the build 🚨

Version 5.0.1 of eslint-plugin-jsx-a11y just got published.

Branch Build failing 🚨
Dependency eslint-plugin-jsx-a11y
Current Version 5.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-jsx-a11y is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details,- ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes Node <4 support

Swapped Array.includes for array-includes polyfill to support node versions <4

Commits

The new version differs by 3 commits0.

  • bf0ac6a 5.0.1
  • fb8c626 Upgrade all dependencies.
  • fb5b87a Fix: backward compatibility with node.js v4 and v5. (#231)

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of coveralls is breaking the build 🚨

Version 2.12.0 of coveralls just got published.

Branch Build failing 🚨
Dependency coveralls
Current Version 2.11.16
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As coveralls is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build passed Details

  • continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes Branch coverage support

Adds branch coverage data to Coveralls API post.

Commits

The new version differs by 2 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of babel-register is breaking the build 🚨

Version 6.24.1 of babel-register just got published.

Branch Build failing 🚨
Dependency babel-register
Current Version 6.24.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As babel-register is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

  • continuous-integration/travis-ci/push The Travis CI build passed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of nyc is breaking the build 🚨

Version 10.3.0 of nyc just got published.

Branch Build failing 🚨
Dependency nyc
Current Version 10.2.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As nyc is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details - ✅ **continuous-integration/travis-ci/push** The Travis CI build passed [Details](https://travis-ci.org/itgalaxy/webfont/builds/227085582?utm_source=github_status&utm_medium=notification),- ❌ **continuous-integration/appveyor/branch** AppVeyor build failed [Details](https://ci.appveyor.com/project/evilebottnawi/webfont/build/250)

Commits

The new version differs by 4 commits ahead by 4, behind by 2.

  • 55e826d chore(release): 10.3.0
  • 89dc7a6 chore: explicit update of istanbul dependnecies (#562)
  • 1887d1c feat: add support for --no-clean, to disable deleting raw coverage output (#558)
  • ff73b18 fix: source-maps were not being cached in the parent process when --all was being used (#556)

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of babel-preset-es2015 is breaking the build 🚨

Version 6.24.1 of babel-preset-es2015 just got published.

Branch Build failing 🚨
Dependency babel-preset-es2015
Current Version 6.24.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As babel-preset-es2015 is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

  • continuous-integration/travis-ci/push The Travis CI build passed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.