Skip to content

Commit

Permalink
Use console to remove logalot
Browse files Browse the repository at this point in the history
  • Loading branch information
1000ch committed Oct 14, 2021
1 parent 726d684 commit 9d83097
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
Expand Up @@ -2,17 +2,16 @@
const os = require('os');
const path = require('path');
const binBuild = require('bin-build');
const log = require('logalot');
const bin = require('.');

const cpuNumber = Math.max(os.cpus().length, 1);

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

let cfgExtras = '';
if (process.platform === 'darwin') {
Expand All @@ -32,9 +31,9 @@ bin.run(['-version']).then(() => {
`make install -j${cpuNumber}`
]);

log.success('mozjpeg built successfully');
console.log('mozjpeg 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 @@ -32,8 +32,7 @@
],
"dependencies": {
"bin-build": "^3.0.0",
"bin-wrapper": "^4.0.0",
"logalot": "^2.1.0"
"bin-wrapper": "^4.0.0"
},
"devDependencies": {
"ava": "^3.8.0",
Expand Down

0 comments on commit 9d83097

Please sign in to comment.