creativeaura / gulp-tinypng Goto Github PK
View Code? Open in Web Editor NEWgulp plugin to compress png images using tinypng api
gulp plugin to compress png images using tinypng api
[14:19:24] Starting 'tinypng'...
[14:19:27] [error] : gulp-tinypng - Credentials are invalid
[14:20:27] Starting 'tinypng'...
[14:21:44] [error] : gulp-tinypng - Upload failed to complete
It doesn't seem to be require
-d outside of tests.
Perhaps you should move it to devDependencies and/or peerDependencies.
https://github.com/gulpjs/gulp/tree/master/docs/writing-a-plugin
CC @phated
The plugin is outputting all images to a folder called .gulp
instead of what was declared on the gulp task.
Would also be nice if the plugin could preserve the original directory structure, instead of outputting everything into a single folder.
Hi ;)
At many places, even in the console, I saw your plugin called gulp-tingpng
. Can you replace/update that?
Thanks in advance
As you can see in the image below, I got a message from the terminal about "outdated" sub-modules:
+ [email protected]
added 115 packages from 54 contributors and audited 14225 packages in 32.343s
found 25 vulnerabilities (3 low, 14 moderate, 8 high)
run `npm audit fix` to fix them, or `npm audit` for details
here is your npm api
var gulp = require('gulp');
var imagemin = require('gulp-tinypng');
gulp.task('tinypng', function () {
gulp.src('src/image.png')
.pipe(tingpng('API_KEY'))
.pipe(gulp.dest('dist'));
});
I change it to this, and it works.
var gulp = require('gulp');
var imagemin = require('gulp-tinypng');
gulp.task('tinypng', function () {
gulp.src('./images/tinypng/*.{jpg,png,gif,jpeg}')
.pipe(tinypng('API_key'))
//api_key may need to buy?
.pipe(gulp.dest('./images'));
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.