highlightFileSync.js 241 B

12345678910
  1. 'use strict'
  2. var fs = require('fs')
  3. var highlight = require('./highlight')
  4. module.exports = function highlightFileSync(fullPath, opts) {
  5. var code = fs.readFileSync(fullPath, 'utf-8')
  6. opts = opts || { }
  7. return highlight(code, opts)
  8. }