dwmkerr / node-imagemagick-cli Goto Github PK
View Code? Open in Web Editor NEWAccess the ImageMagick CLI tools from Node. No dependencies, cross-platform, with support for ImageMagick 6 and 7.
Access the ImageMagick CLI tools from Node. No dependencies, cross-platform, with support for ImageMagick 6 and 7.
This code
const imagemagickCli = require('imagemagick-cli')
//...
//...
imagemagickCli
.exec(`convert ${filename} -strip ${filename + '.min'}`)
.then(({ stdout, stderr }) => {
if (stderr) {
callback(Error('Error compressing ' + filename + '. ' + stderr))
} else {
// removes original and renames
fs.unlinkSync(filename)
fs.renameSync(filename + '.min', filename)
}
}).catch(err => {
callback(Error('Error compressing ' + filename + '. ' + err))
})
return this on windows
Error: Error compressing D:\a\autocosts\autocosts\bin\public\favicon.png. Error: Failed to call 'convert D:\a\autocosts\autocosts\bin\public\favicon.png -strip D:\a\autocosts\autocosts\bin\public\favicon.png.min', which was mapped to '"C:\Windows\System32\convert.exe" D:\a\autocosts\autocosts\bin\public\favicon.png -strip D:\a\autocosts\autocosts\bin\public\favicon.png.min'. Error is 'Command failed: "C:\Windows\System32\convert.exe" D:\a\autocosts\autocosts\bin\public\favicon.png -strip D:\a\autocosts\autocosts\bin\public\favicon.png.min
Invalid Parameter - -strip
'.
at D:\a\autocosts\autocosts\build\compressImages.js:39:17
at D:\a\autocosts\autocosts\node_modules\async\dist\async.js:2955:19
at wrapper (D:\a\autocosts\autocosts\node_modules\async\dist\async.js:268:20)
at iteratorCallback (D:\a\autocosts\autocosts\node_modules\async\dist\async.js:493:17)
at D:\a\autocosts\autocosts\node_modules\async\dist\async.js:321:20
at D:\a\autocosts\autocosts\node_modules\async\dist\async.js:2953:17
at D:\a\autocosts\autocosts\build\compressImages.js:130:11
at processTicksAndRejections (internal/process/task_queues.js:97:5)
npm ERR! Test failed. See above for more details.
Error: Process completed with exit code 1.
Hi, thanks for the great package
Since this is supposed to work in Windows, do you know how to automate the installation of imagemagick in Windows with command line. I need it, right, before using your module?
I need it for a Continuous Integration action
Ubuntu tests could be much faster if dockerised, avoiding the need for a time consuming imagemagick installation.
7.4.2
to 7.5.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 9 commits.
7835301
Update docs/changelog.md and set new release id in docs/_config.yml
4978898
Add release documentation for v7.5.0
5d0adf7
7.5.0
c0e68b6
Update CHANGELOG.md and AUTHORS for new release
bf26967
Merge pull request #2080 from dpmott/issue-2006-Sinon.assert.calledOnceWithExactly
c3e9512
Merge branch '2027-apply-feedback'
9c4bbf1
refactor: extract and share common tests for spies/stubs
fed2129
Proposed resolution to issue 2006
181dcdd
2026 - Updated to support spying all methods on an object to similar to stub capabilities
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
6.0.2
to 6.1.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
options
parameter (@plroebuck).jsonc
extension (@sstephant)These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:
this.skip()
in "before each" hooks (@juergba)--allow-uncaught
for uncaught exceptions thrown inside hooks (@givanse)and some regressions:
Suite
cloning by copying root
property (@fatso83)The new version differs by 28 commits.
f4fc95a
Release v6.1.0
bd29dbd
update CHANGELOG for v6.1.0 [ci skip]
aaf2b72
Use cwd-relative pathname to load config file (#3829)
b079d24
upgrade deps as per npm audit fix; closes #3854
e87c689
Deprecate this.skip() for "after all" hooks (#3719)
81cfa90
Copy Suite property "root" when cloning; closes #3847 (#3848)
8aa2fc4
Fix issue 3714, hide pound icon showing on hover header on docs page (#3850)
586bf78
Update JS-YAML to address security issue (#3845)
d1024a3
Update doc examples "tests.html" (#3811)
1d570e0
Delete "/docs/example/chai.js"
ade8b90
runner.js: "self.test" undefined in Browser (#3835)
0098147
Replace findup-sync with find-up for faster startup (#3830)
d5ba121
Remove "package" flag from sample config file because it can only be passes as CLI arg (#3793)
a3089ad
update package-lock
75430ec
Upgrade yargs-parser dependency to avoid loading 2 copies of yargs
There are 28 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
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.