grunt-cssretarget2

2.0.1 • Public • Published

DEPRECATED: This plugin is not maintained.

grunt-cssretarget2

Retarget css image URLs to new destination.

Getting Started

This plugin requires Grunt ~0.4.2

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-cssretarget2 --save-dev

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

grunt.loadNpmTasks('grunt-cssretarget2');

The "cssretarget2" task

Overview

In your project's Gruntfile, add a section named cssretarget2 to the data object passed into grunt.initConfig().

grunt.initConfig({
  cssretarget2: {
    prep: {
      options: {
        retarget: 'dist',
        prepend: '/'
      },
      files: {
        src: ['dist/vendor/**/*.css']
      }
    },
  },
});

Options

options.retarget

Type: String Default value: ''

The new directory root relative to which your assets will live. You should concatenate all your css files while maintaining i.e. '/vendor/some_lib/img/image.png' filestructure for images.

options.prepend

Type: String Default value: ''

String prepended to each asset URL.

Release History

2.0.0

Move repos

0.1.0 - 0.1.1

Initial release

Dependents (0)

Package Sidebar

Install

npm i grunt-cssretarget2

Weekly Downloads

1

Version

2.0.1

License

none

Last publish

Collaborators

  • soncodi
  • vladikoff