src/cli/commands/build.js
function buildToFile(compileOptions, startTime) {
  utils.header()
  utils.log()
  utils.log(emoji.go, 'Building...', chalk.bold.cyan(compileOptions.inputFile))

  return compile(compileOptions).then(result => {
    utils.writeFile(compileOptions.outputFile, result.css)

    const prettyTime = prettyHrtime(process.hrtime(startTime))

    utils.log()
    utils.log(emoji.yes, 'Finished in', chalk.bold.magenta(prettyTime))
    utils.log(emoji.pack, 'Size:', chalk.bold.magenta(bytes(result.css.length)))
    utils.log(emoji.disk, 'Saved to', chalk.bold.cyan(compileOptions.outputFile))
    utils.footer()
  })
}
function buildToFile(compileOptions, startTime) {
  utils.header()
  utils.log()
  utils.log(emoji.go, 'Building...', chalk.bold.cyan(compileOptions.inputFile))

  return compile(compileOptions).then(result => {
    utils.writeFile(compileOptions.outputFile, result.css)

    const prettyTime = prettyHrtime(process.hrtime(startTime))

    utils.log()
    utils.log(emoji.yes, 'Finished in', chalk.bold.magenta(prettyTime))
    utils.log(emoji.pack, 'Size:', chalk.bold.magenta(bytes(result.css.length)))
    utils.log(emoji.disk, 'Saved to', chalk.bold.cyan(compileOptions.outputFile))
    utils.footer()
  })
}
function buildToFile ( compileOptions , startTime ) { utils . header ( ) utils . log ( ) utils . log ( emoji . go , 'Building...' , chalk . bold . cyan ( compileOptions . inputFile ) ) return compile ( compileOptions ) . then ( result => { utils . writeFile ( compileOptions . outputFile , result . css ) const prettyTime = prettyHrtime ( process . hrtime ( startTime ) ) utils . log ( ) utils . log ( emoji . yes , 'Finished in' , chalk . bold . magenta ( prettyTime ) ) utils . log ( emoji . pack , 'Size:' , chalk . bold . magenta ( bytes ( result . css . length ) ) ) utils . log ( emoji . disk , 'Saved to' , chalk . bold . cyan ( compileOptions . outputFile ) ) utils . footer ( ) } ) }
Compiles CSS file and writes it to a file.

@param {CompileOptions} compileOptions
@param {int[]} startTime
@return {Promise}
Compiles CSS file and writes it to a file .