You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

install.js 610B

123456789101112131415161718192021
  1. 'use strict';
  2. const binBuild = require('bin-build');
  3. const log = require('logalot');
  4. const bin = require('.');
  5. bin.run(['--verbose']).then(() => {
  6. log.success('guetzli pre-build test passed successfully');
  7. }).catch(error => {
  8. log.warn(error.message);
  9. log.warn('guetzli pre-build test failed');
  10. log.info('compiling from source');
  11. binBuild.url('https://github.com/google/guetzli/archive/v1.0.1.tar.gz', [
  12. `mkdir -p ${bin.dest()}`,
  13. `make && mv bin/Release/${bin.use()} ${bin.path()}`
  14. ]).then(() => {
  15. log.success('guetzli built successfully');
  16. }).catch(error => {
  17. log.error(error.stack);
  18. });
  19. });