mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-17 07:43:38 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
6
node_modules/cachedir/.travis.yml
generated
vendored
Normal file
6
node_modules/cachedir/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- '0.10'
|
||||
- '0.12'
|
||||
- '4'
|
||||
- '5'
|
||||
20
node_modules/cachedir/LICENSE
generated
vendored
Normal file
20
node_modules/cachedir/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Linus Unnebäck
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
18
node_modules/cachedir/README.md
generated
vendored
Normal file
18
node_modules/cachedir/README.md
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# node-cachedir
|
||||
|
||||
Provides a directory where the OS wants you to store cached files.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install cachedir
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var cachedir = require('cachedir')
|
||||
var path = cachedir('linusu')
|
||||
|
||||
// `path` now contains the path under which you should store cached files
|
||||
```
|
||||
41
node_modules/cachedir/index.js
generated
vendored
Normal file
41
node_modules/cachedir/index.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
var os = require('os')
|
||||
var path = require('path')
|
||||
var homedir = require('os-homedir')
|
||||
|
||||
function linux (id) {
|
||||
var cacheHome = process.env.XDG_CACHE_HOME || path.join(homedir(), '.cache')
|
||||
return path.join(cacheHome, id)
|
||||
}
|
||||
|
||||
function darwin (id) {
|
||||
return path.join(homedir(), 'Library', 'Caches', id)
|
||||
}
|
||||
|
||||
function win32 (id) {
|
||||
var appData = process.env.LOCALAPPDATA || path.join(homedir(), 'AppData', 'Local')
|
||||
return path.join(appData, id, 'Cache')
|
||||
}
|
||||
|
||||
var implementation = (function () {
|
||||
switch (os.platform()) {
|
||||
case 'android':
|
||||
case 'linux': return linux
|
||||
case 'darwin': return darwin
|
||||
case 'win32': return win32
|
||||
default: throw new Error('Your OS is currently not supported by node-cachedir.')
|
||||
}
|
||||
}())
|
||||
|
||||
module.exports = function (id) {
|
||||
if (typeof id !== 'string') {
|
||||
throw new TypeError('id is not a string')
|
||||
}
|
||||
if (id.length === 0) {
|
||||
throw new Error('id cannot be empty')
|
||||
}
|
||||
if (/[^0-9a-zA-Z-]/.test(id)) {
|
||||
throw new Error('id cannot contain special characters')
|
||||
}
|
||||
|
||||
return implementation(id)
|
||||
}
|
||||
19
node_modules/cachedir/package.json
generated
vendored
Normal file
19
node_modules/cachedir/package.json
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "cachedir",
|
||||
"version": "1.2.0",
|
||||
"license": "MIT",
|
||||
"author": "Linus Unnebäck <linus@folkdatorn.se>",
|
||||
"main": "index.js",
|
||||
"repository": "LinusU/node-cachedir",
|
||||
"scripts": {
|
||||
"test": "standard && mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^2.4.5",
|
||||
"proxyquire": "^1.7.4",
|
||||
"standard": "^6.0.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"os-homedir": "^1.0.1"
|
||||
}
|
||||
}
|
||||
57
node_modules/cachedir/test.js
generated
vendored
Normal file
57
node_modules/cachedir/test.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
/* eslint-env mocha */
|
||||
|
||||
var assert = require('assert')
|
||||
var homedir = require('os-homedir')
|
||||
var proxyquire = require('proxyquire')
|
||||
|
||||
var platforms = [
|
||||
['linux', homedir() + '/.cache/linusu'],
|
||||
['darwin', homedir() + '/Library/Caches/linusu'],
|
||||
['win32', homedir() + '/AppData/Local/linusu/Cache']
|
||||
]
|
||||
|
||||
platforms.forEach(function (platform) {
|
||||
describe(platform[0], function () {
|
||||
var cachedir
|
||||
|
||||
before(function () {
|
||||
var os = {
|
||||
platform: function () { return platform[0] }
|
||||
}
|
||||
|
||||
cachedir = proxyquire('./', { os: os })
|
||||
})
|
||||
|
||||
it('should give the correct path', function () {
|
||||
var actual = cachedir('linusu')
|
||||
var expected = platform[1]
|
||||
|
||||
assert.equal(actual, expected)
|
||||
})
|
||||
|
||||
if (platform[0] === 'win32') {
|
||||
describe('when LOCALAPPDATA is set', function () {
|
||||
it('should give the correct path', function () {
|
||||
var oldLocalAppData = process.env.LOCALAPPDATA
|
||||
process.env.LOCALAPPDATA = 'X:/LocalAppData'
|
||||
var actual = cachedir('linusu')
|
||||
process.env.LOCALAPPDATA = oldLocalAppData
|
||||
var expected = 'X:/LocalAppData/linusu/Cache'
|
||||
|
||||
assert.equal(actual, expected)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
it('should throw on bad input', function () {
|
||||
assert.throws(function () { cachedir() })
|
||||
assert.throws(function () { cachedir('') })
|
||||
assert.throws(function () { cachedir({}) })
|
||||
assert.throws(function () { cachedir([]) })
|
||||
assert.throws(function () { cachedir(null) })
|
||||
assert.throws(function () { cachedir(1337) })
|
||||
assert.throws(function () { cachedir('test!!') })
|
||||
assert.throws(function () { cachedir(undefined) })
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user