Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-scss-image-helpers

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-scss-image-helpers

Creates variables for Compass-like image helpers for url, width and height of images.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-scss-image-helpers

Grunt tasks to replace Compass image dimension helpers. It is recommended to run this task with watch task on image folder only.

Options

imageRoot

Type: String
Default: ''

Path to image folder. All image names are created relatively to this folder.

prefix

Type: String
Default: grunt-images

Prefix for SCSS variables. These variables are created: $grunt-images-names, $grunt-images-widths, $grunt-images-heights, $grunt-images-base64 and $grunt-images-relative-path.

antiCache

Type: Boolean
Default: false

If set to true, task generates file names with timestamps to invalidate browser cache.

relativePath

Type: String
Default: ''

All image paths in css are prefixed with this path. For example path ../img/ and image foo.png become ../img/foo.png.

size

Type: Integer Default: 10240

Maximum file size for base64 encoding. Images bigger than that won't be encoded.

Example config

grunt.initConfig({
    scss_images: {
        dist: {
            options: {
                imageRoot: 'assets/img/',
                prefix: 'grunt-images',
                antiCache: true,
                relativePath: '../img/',
                size: 4096
            },
            files: {
                'assets/scss/_images.scss': ['assets/img/*.png']
            }
        }
    }
});

grunt.loadNpmTasks('grunt-scss-image-helpers');
grunt.registerTask('default', ['scss_images']);

License

MIT License • © Daniel Cirmaciu

Keywords

FAQs

Package last updated on 26 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc