tasks/google_fontface.js
// Fetch CSS files for local TTF files.
Fetch CSS files for local TTF files.
Fetch CSS files for local TTF files .
function fetch(family, file) {
          const url = `${options.url}?family=${family}`;
          wg.add();
          request(url, (error, res, body) => {
              if (error !== null || res.statusCode !== 200) {
                  grunt.log.error(`fetch '${url}' failed: ${error !== null ? error : res.statusCode}`);
                  return;
              }
              grunt.log.ok(`fetch '${url}' successfully`);
              grunt.file.write(file.dest, modifySrc(body, file));
              wg.done();
          });
      }
function fetch ( family , file ) { const url = ` ${ options . url } ${ family } ` ; wg . add ( ) ; request ( url , ( error , res , body ) => { if ( error !== null || res . statusCode !== 200 ) { grunt . log . error ( ` ${ url } ${ error !== null ? error : res . statusCode } ` ) ; return ; } grunt . log . ok ( ` ${ url } ` ) ; grunt . file . write ( file . dest , modifySrc ( body , file ) ) ; wg . done ( ) ; } ) ; }
Fetch CSS files for local TTF files.
Fetch CSS files for local TTF files .