0.1.1 • Published 11 years ago

grunt-cssretarget v0.1.1

Weekly downloads
3
License
-
Repository
github
Last release
11 years ago

grunt-cssretarget

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

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

grunt.loadNpmTasks('grunt-cssretarget');

The "cssretarget" task

Overview

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

grunt.initConfig({
  cssretarget: {
    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

1.0.0

Move repos

0.1.0 - 0.1.1

Initial release

1.0.0

10 years ago

0.1.1

11 years ago

0.1.0

11 years ago