0.2.1 • Published 9 years ago
@lassehaslev/imagesizerjs v0.2.1
@lassehaslev/imagesizerjs
Automaticly ads
-{width}x{height}-resizeto image filename.
Installation
Run npm install @lassehaslev/imagesizerjs --save in your project folder
Usage
1a) Import the script file
<script src="https://raw.githubusercontent.com/LasseHaslev/imagesizerjs/master/src/ImageSize.js"></script>1b) Or require as module
var ImageSize = require( '@lassehaslev/imagesizerjs' );2) Use the class
var imageSize = new ImageSize( document.querySelector( 'img' ), {
steps: 200, // How many pixels before new image
} );Development
# Clone package
git clone https://github.com/LasseHaslev/imagesizerjs
# install dependencies
npm install
# serve with hot reload at http://localhost:3000/
gulp watch
# build for production with minification
gulp --productionLicense
MIT, dawg