0.5.8 • Published 4 years ago

rebanna v0.5.8

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Rebanna

Rebanna is build to easily create a webfont with the support of stacked/multicolored icons.

Changeable color

Getting started

Prerequisites

  1. NPM. Rebanna can be installed through npm. When you install Node.js, the package manager will also be installed.
  2. Windows-Build-Tools - Run as administrator npm install --global --production windows-build-tools.

Installing

To install rebanna, run the following on the command line:

npm install rebanna

Usage

Configuration

Configuration can be done by command-line arguments or through a .rebanna.js-file. First, command-line arguments will be used, followed by settings from the config file. Any non-set options will be default.

.rebanna.js example

module.exports = {
  // the destination for the generated webfont
  "destination": "./font",
  // name for the font
  "fontName": "iconfont",
  // classname prefix for the icons
  "fontClassName": "icon",
  // source folder for the icons
  "iconFolder": "./icons",
  // temporary folder
  "tempFolder": "./.tmp",
  // templates for generating html, css or scss
  "template": [
    "./templates/template.html.njk"
  ],
}

Running

Creating a webfont from SVG's with rebanna typically follows these steps:

  1. Store the correctly formatted SVG's in the icons folder.
  2. Run npm run build on the command line to generate your webfont and template.

CLI

Next, to the npm scripts, a CLI is available. Run rebanna [command] [options] to generate your webfont and template.

Commands

CommandDescription
buildRun clean, compress and split commands, Builds the webfont. Before building clean, compress and split commands will be run.
cleanCleans the destination and temporary folder.
compressCompresses all SVG files found in the icon source folder.
splitSplit all compressed SVG files from the temporary folder.

Options

OptionsDescription
--cleanRun clean also on build.
-c, --configPath to a specific configuration file.
--debugShow extra information for debugging.
-d, --destinationThe destination for the generated webfont.
--fontNameThe name for the font.
--fontClassNameThe classname prefix for the icons.
--fontTemplatePathFont path that will be used in generated templates.
-i, --iconFolderThe source folder for the icons.
--tempFolderTemporary folder for processing.
--templateAn array of Nunjucks templates for generating HTML, CSS or SCSS. More information about Nunjucks templates can be found at https://bit.ly/2v0E7Ha.
--watchAdd this option if you want the iconFolder to be watched. Triggers build on added, changed or removed file.

About

Ever thought about the correct name for a multi-layered-svgs-to-stacked-icons-from-a-webfont tool? I have, it's terrible, believe me. Therefore I just named it after a very special person who often makes me a stack of super fluffy banana pancakes :)

Rebanna helps you creating a multicolored iconfont. Each layer can easily be styled with CSS.

Contribution

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

Changelog

See CHANGELOG.md for changes per version.

License

Copyright © 2018 Maarten Brakkee maarten@zeroten.nl. The license can be found in the LICENSE file.

0.5.8

4 years ago

0.5.7

5 years ago

0.5.6

5 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago