Skip to content

Template caching #343

Closed
Closed
@iatsiuk

Description

I would like to introduce more standard-friendly folder for storing template files and make PR with the necessary changes. Are you guys interested in it?

var os = require('os');
var path = require('path');

function cacheDir() {
  var platforms = {
    'win32': function() {
      return process.env.APPDATA ?
             path.join(process.env.APPDATA, 'Local') :
             os.tmpdir();
    },
    'linux': function() {
      return process.env.XDG_CACHE_HOME || path.join(os.homedir(), '.cache');
    },
    'darwin': function() {
      return path.join(os.homedir(), 'Library/Caches');
    },
    'default': function() {
      return os.tmpdir();
    }
  }

  return (platforms[os.platform()] || platforms['default'])();
}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions