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.

15 lines
313 B

  1. const crypto = require('crypto')
  2. const path = require('path')
  3. module.exports = {
  4. /**
  5. * Generate unique hash from page
  6. */
  7. generateHash(assetPath) {
  8. return crypto.createHash('sha1').update(assetPath).digest('hex')
  9. },
  10. getPathInfo(assetPath) {
  11. return path.parse(assetPath.toLowerCase())
  12. }
  13. }