Skip to content

Commit

Permalink
Use console.log to remove logalot
Browse files Browse the repository at this point in the history
  • Loading branch information
1000ch committed Oct 22, 2021
1 parent 0851197 commit 16e4044
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
13 changes: 6 additions & 7 deletions lib/install.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
'use strict';
const path = require('path');
const binBuild = require('bin-build');
const log = require('logalot');
const bin = require('.');

bin.run(['-version']).then(() => {
log.success('pngcrush pre-build test passed successfully');
console.log('pngcrush pre-build test passed successfully');
}).catch(async error => {
log.warn(error.message);
log.warn('pngcrush pre-build test failed');
log.info('compiling from source');
console.warn(error.message);
console.warn('pngcrush pre-build test failed');
console.info('compiling from source');

try {
await binBuild.file(path.resolve(__dirname, '../vendor/source/pngcrush-1.8.13.tar.gz'), [
`mkdir -p ${bin.dest()}`,
`make && mv ${bin.use()} ${bin.path()}`
]);

log.success('pngcrush built successfully');
console.log('pngcrush built successfully');
} catch (error) {
log.error(error.stack);
console.error(error.stack);

// eslint-disable-next-line unicorn/no-process-exit
process.exit(1);
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
],
"dependencies": {
"bin-build": "^3.0.0",
"bin-wrapper": "^4.0.0",
"logalot": "^2.0.0"
"bin-wrapper": "^4.0.0"
},
"devDependencies": {
"ava": "^3.8.0",
Expand Down

0 comments on commit 16e4044

Please sign in to comment.