0.0.7 • Published 10 years ago

grunt-image-debower v0.0.7

Weekly downloads
1
License
-
Repository
github
Last release
10 years ago

grunt-image-debower Build Status Dependency Status devDependency Status peerDependency Status

Copies images from a bower repository based upon what is included in html files.

Getting Started

This plugin requires Grunt ~0.4.5

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-image-debower --save-dev

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

grunt.loadNpmTasks('grunt-image-debower');

The "image_debower" task

Overview

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

grunt.initConfig({
	image_debower: {
		your_target: {
			// Target-specific file lists and/or options go here.
		},
	},
});

Options

target.src

Type: String Default value: ''

The source html files to operate on.

dest

Type: String Default value: ''

Where to store the resulting files.

srcImages

Type: String Default value: ''

Where to find the images to copy into the destination.

destImages

Type: String Default value: ''

Where to store the used images. By default, each bower package will get its own folder under here to avoid interpackage conflicts.

Usage Examples

grunt.initConfig({
	image_debower: {
		dist {
			expand: true,
			cwd: 'dist',
			src: [ '**/*.html' ],
			dest: 'dist',
			srcImages: 'app',
			destImages: 'dist/images'
		}
	},
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

0.0.7

  • Update all dependencies.

0.0.6

  • Update cheerio to the latest version.

0.0.5

  • Don't ignore pages with no <md-icon> tags.
  • Handle md-svg-src in md-icon now.
  • Don't fail when <img> tags are missing src attributes.

0.0.4

  • Fix documentation.

0.0.3

  • Add support for the <img> and <object> tags.

0.0.2

  • Update documentation to include a better example.
  • Include grunt-cli in development dependencies, to ensure npm test works.

0.0.1

  • Initial experimental release. Works so far for my purproses.
0.0.7

10 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago