údržba
This commit is contained in:
		
							
								
								
									
										2
									
								
								CyLukTs/lukan/node_modules/ospath/.npmignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								CyLukTs/lukan/node_modules/ospath/.npmignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
ospath.test.js
 | 
			
		||||
.travis.yml
 | 
			
		||||
							
								
								
									
										25
									
								
								CyLukTs/lukan/node_modules/ospath/changelog.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								CyLukTs/lukan/node_modules/ospath/changelog.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
1.2.2 / 2016-09-06
 | 
			
		||||
------------------
 | 
			
		||||
- fix `files` field
 | 
			
		||||
 | 
			
		||||
1.2.0 / 2016-09-06
 | 
			
		||||
------------------
 | 
			
		||||
- upgrade to Standard@v8
 | 
			
		||||
- fix tests
 | 
			
		||||
- added `desktop()` function
 | 
			
		||||
 | 
			
		||||
1.1.0 / 2015-06-17
 | 
			
		||||
------------------
 | 
			
		||||
- if `os.homedir()` is available, use it for `home()`
 | 
			
		||||
 | 
			
		||||
1.0.2 / 2015-06-16
 | 
			
		||||
------------------
 | 
			
		||||
- fixed bad `files` field in `package.json`
 | 
			
		||||
 | 
			
		||||
1.0.1 / 2015-06-16
 | 
			
		||||
------------------
 | 
			
		||||
- only include specific files
 | 
			
		||||
 | 
			
		||||
1.0.0 / 2015-06-16
 | 
			
		||||
------------------
 | 
			
		||||
- initial release
 | 
			
		||||
							
								
								
									
										43
									
								
								CyLukTs/lukan/node_modules/ospath/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								CyLukTs/lukan/node_modules/ospath/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
var path = require('path')
 | 
			
		||||
var os = require('os')
 | 
			
		||||
 | 
			
		||||
function data () {
 | 
			
		||||
  switch (this.__platform || process.platform) {
 | 
			
		||||
    case 'win32': return path.resolve(process.env.APPDATA)
 | 
			
		||||
    case 'darwin': return path.resolve(path.join(home.call(this), 'Library/Application Support/'))
 | 
			
		||||
    default: return process.env.XDG_CONFIG_HOME
 | 
			
		||||
      ? path.resolve(process.env.XDG_CONFIG_HOME)
 | 
			
		||||
      : path.resolve(path.join(home.call(this), '.config/'))
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function desktop () {
 | 
			
		||||
  return path.join(home.call(this), 'Desktop')
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function home () {
 | 
			
		||||
  // io.js >= 2.3
 | 
			
		||||
  if ('homedir' in os) return os.homedir()
 | 
			
		||||
 | 
			
		||||
  switch (this.__platform || process.platform) {
 | 
			
		||||
    case 'win32': return path.resolve(process.env.USERPROFILE)
 | 
			
		||||
    default: return path.resolve(process.env.HOME)
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function tmp () {
 | 
			
		||||
  switch (this.__platform || process.platform) {
 | 
			
		||||
    case 'win32': return path.resolve(process.env.TEMP)
 | 
			
		||||
    default: return path.resolve('/tmp')
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var ospath = {
 | 
			
		||||
  __platform: process.platform,
 | 
			
		||||
  data: data,
 | 
			
		||||
  desktop: desktop,
 | 
			
		||||
  home: home,
 | 
			
		||||
  tmp: tmp
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports = ospath
 | 
			
		||||
							
								
								
									
										40
									
								
								CyLukTs/lukan/node_modules/ospath/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								CyLukTs/lukan/node_modules/ospath/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "ospath",
 | 
			
		||||
  "version": "1.2.2",
 | 
			
		||||
  "description": "Operating system specific paths.",
 | 
			
		||||
  "main": "index.js",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "lint": "standard",
 | 
			
		||||
    "test": "npm run lint && npm run unit",
 | 
			
		||||
    "unit": "mocha ./ospath.test.js"
 | 
			
		||||
  },
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
    "url": "git+https://github.com/jprichardson/ospath.git"
 | 
			
		||||
  },
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "home",
 | 
			
		||||
    "data",
 | 
			
		||||
    "dir",
 | 
			
		||||
    "directory",
 | 
			
		||||
    "path",
 | 
			
		||||
    "tmp",
 | 
			
		||||
    "temp",
 | 
			
		||||
    "windows",
 | 
			
		||||
    "linux",
 | 
			
		||||
    "darwin",
 | 
			
		||||
    "mac"
 | 
			
		||||
  ],
 | 
			
		||||
  "author": "JP Richardson",
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "bugs": {
 | 
			
		||||
    "url": "https://github.com/jprichardson/ospath/issues"
 | 
			
		||||
  },
 | 
			
		||||
  "homepage": "https://github.com/jprichardson/ospath#readme",
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "lodash.clonedeep": "^3.0.1",
 | 
			
		||||
    "mocha": "2.x",
 | 
			
		||||
    "proxyquire": "^1.5.0",
 | 
			
		||||
    "standard": "^8.0.0"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										53
									
								
								CyLukTs/lukan/node_modules/ospath/readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								CyLukTs/lukan/node_modules/ospath/readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,53 @@
 | 
			
		||||
ospath
 | 
			
		||||
======
 | 
			
		||||
 | 
			
		||||
[](https://www.npmjs.org/package/ospath)
 | 
			
		||||
[](http://travis-ci.org/jprichardson/ospath)
 | 
			
		||||
 | 
			
		||||
A JavaScript component that provides operating specific path values.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Installation
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
    npm i --save ospath
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
API
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
### ospath.data()
 | 
			
		||||
 | 
			
		||||
Returns the directory where an application should store its data directory.
 | 
			
		||||
 | 
			
		||||
- **Windows**: `%APPDATA%`
 | 
			
		||||
- **OS X**: `~/Library/Application Support`
 | 
			
		||||
- **Unix-like**: `$XDG_CONFIG_HOME` or `~/.config`
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### ospath.desktop()
 | 
			
		||||
 | 
			
		||||
Returns the users desktop directory. On every OS, this is just the `home()`
 | 
			
		||||
dir and `Desktop`.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### ospath.home()
 | 
			
		||||
 | 
			
		||||
Returns the user's home directory.
 | 
			
		||||
 | 
			
		||||
- **Windows**: `%USERPROFILE%`
 | 
			
		||||
- **Unix-like**: `$HOME`
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### ospath.tmp()
 | 
			
		||||
 | 
			
		||||
Returns a temporary directory. Could also use `require('os').tmpdir()`.
 | 
			
		||||
 | 
			
		||||
- **Windows**: `%TEMP%`
 | 
			
		||||
- **Unix-like**: `/tmp`
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
License
 | 
			
		||||
-------
 | 
			
		||||
 | 
			
		||||
MIT
 | 
			
		||||
		Reference in New Issue
	
	Block a user