src/assets.js
function scss(source: string, dest: string): Promise {
  return new Promise((resolve, reject) => {
    sass.render(
      {
        file       : source,
        outFile    : dest,
        outputStyle: 'compressed',
      },
      (err, result) => {
        if (err) reject(err);
        fs.ensureFile(dest).then(fs.writeFile(dest, result.css)).then(resolve).catch(reject);
      },
    );
  });
}
function scss(source: string, dest: string): Promise {
  return new Promise((resolve, reject) => {
    sass.render(
      {
        file       : source,
        outFile    : dest,
        outputStyle: 'compressed',
      },
      (err, result) => {
        if (err) reject(err);
        fs.ensureFile(dest).then(fs.writeFile(dest, result.css)).then(resolve).catch(reject);
      },
    );
  });
}
function scss ( source : string , dest : string ) : Promise { return new Promise ( ( resolve , reject ) => { sass . render ( { file : source , outFile : dest , outputStyle : 'compressed' , } , ( err , result ) => { if ( err ) reject ( err ) ; fs . ensureFile ( dest ) . then ( fs . writeFile ( dest , result . css ) ) . then ( resolve ) . catch ( reject ) ; } , ) ; } ) ; }
Compile scss assets
Compile scss assets