Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

grunt-saxicon is a wrapper for saxicon, a module which transforms SVGs into a SASS snippet that allows you to generate colorized SVGs (with both single or multi-colored shapes) within SASS, with each SVG embedded as a data-URI.

License

lachlanmcdonald/grunt-saxicon

Repository files navigation

🎷 grunt-saxicon

npm version License

Deprecation warning: This module is no longer maintained and will not receive any further security updates or fixes.

grunt-saxicon is a wrapper for saxicon, a module which transforms SVGs into a SASS snippet that allows you to generate colorized SVGs (with both single or multi-colored shapes) within SASS, with each SVG embedded as a data-URI.

Installation

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-saxicon

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-saxicon');

Getting started

Add the following to your Gruntfile.js:

require('load-grunt-tasks')(grunt);
grunt.initConfig({
    saxicon: {
        foo: {
            options: {},
            files: {
                'path/for/output.scss': 'path/to/svgs/*.svg'
            }
        }
    }
});

Then in your SCSS files, import the SCSS output:

@include "path/for/output.scss";

Task options

Options are passed directly to the saxicon module. See the Saxicon Options documentation.

Tests

A smoketest is provided for integration purposes. For comprehensive tests, see the saxicon module.

grunt test

About

grunt-saxicon is a wrapper for saxicon, a module which transforms SVGs into a SASS snippet that allows you to generate colorized SVGs (with both single or multi-colored shapes) within SASS, with each SVG embedded as a data-URI.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published