New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

grunt-css-base64image

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-css-base64image

Base64 images in your css file.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

grunt-base64image

Base64 images in your css file.

Getting Started

This plugin requires Grunt ~0.4.4

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-css-base64image --save-dev

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

grunt.loadNpmTasks('grunt-css-base64image');

Base64 Image Task

css-base64image任务使用css-base64-images项目编码图片。 这个版本是fork自https://github.com/maxzhang/grunt-base64image, 追加了css的相对路径和绝对路径的功能

Compile Options

styles : String

指定CSS源目录

relative : String

指定CSS中相对路径的目录, 如果没有指定,那么默认采用styles

root : String

指定CSS中"/image/a.png"这样的绝对路径的的根目录

dest : String

指定输出目录

Usage Examples

module.exports = function(grunt) {
    grunt.loadNpmTasks('grunt-css-base64image');

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),

        base64image: {
            css: {
                styles: 'app/styles/',
                root  : "src/images",
                relative: 'src/images/',
                dest: 'dest/styles/base64/'
            }
        }
    });
};

Keywords

gruntplugin

FAQs

Package last updated on 14 Sep 2017

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