1.1.1 • Published 9 years ago

gulp-loadsome v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

gulp-loadsome

NPM version Build Status dependencies

loadsome plugin for gulp

Usage

First, install gulp-loadsome as a development dependency:

npm install --save-dev gulp-loadsome

Then, add it to your gulpfile.js:

var loadsome = require("gulp-loadsome");

gulp.src("./src/*.ext")
	.pipe(loadsome({
		"downloadPath":".tmp",
		"relativePathFromDest":"../"
	}))
	.pipe(gulp.dest("./dist"));

API

loadsome(options)

options.downloadPath

Type: String

Path to the folder, where all the ressources should be downloaded to. This folder should be accessible from your html files, so that the link references inside the html files can point to this new location.

options.relativePathFromDest

Type: String

This is the path to the download folder as seen from the destination folder(where the final html files are written). As the destination folder is not known for the plugin, you need to give the plugin this information, so that the references from the html files will later match to the actual downloaded files. e.g. if the html is located at /output/client/final.html and the downloadPath is /output/assets, then relativePathFromDest needs to be ../assets/.

License

MIT License