mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-10-07 03:40:10 +02:00
add some packages
This commit is contained in:
26
node_modules/user-home/cli.js
generated
vendored
Executable file
26
node_modules/user-home/cli.js
generated
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
var pkg = require('./package.json');
|
||||
var userHome = require('./');
|
||||
|
||||
function help() {
|
||||
console.log([
|
||||
pkg.description,
|
||||
'',
|
||||
'Example',
|
||||
' $ user-home',
|
||||
' /Users/sindresorhus'
|
||||
].join('\n'));
|
||||
}
|
||||
|
||||
if (process.argv.indexOf('--help') !== -1) {
|
||||
help();
|
||||
return;
|
||||
}
|
||||
|
||||
if (process.argv.indexOf('--version') !== -1) {
|
||||
console.log(pkg.version);
|
||||
return;
|
||||
}
|
||||
|
||||
process.stdout.write(userHome);
|
15
node_modules/user-home/index.js
generated
vendored
Normal file
15
node_modules/user-home/index.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
var env = process.env;
|
||||
var home = env.HOME;
|
||||
var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME;
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
module.exports = env.USERPROFILE || env.HOMEDRIVE + env.HOMEPATH || home || null;
|
||||
} else if (process.platform === 'darwin') {
|
||||
module.exports = home || (user ? '/Users/' + user : null) || null;
|
||||
} else if (process.platform === 'linux') {
|
||||
module.exports = home ||
|
||||
(user ? (process.getuid() === 0 ? '/root' : '/home/' + user) : null) || null;
|
||||
} else {
|
||||
module.exports = home || null;
|
||||
}
|
21
node_modules/user-home/license
generated
vendored
Normal file
21
node_modules/user-home/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
71
node_modules/user-home/package.json
generated
vendored
Normal file
71
node_modules/user-home/package.json
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"_from": "user-home@^1.1.1",
|
||||
"_id": "user-home@1.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=",
|
||||
"_location": "/user-home",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "user-home@^1.1.1",
|
||||
"name": "user-home",
|
||||
"escapedName": "user-home",
|
||||
"rawSpec": "^1.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/v8flags"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz",
|
||||
"_shasum": "2b5be23a32b63a7c9deb8d0f28d485724a3df190",
|
||||
"_spec": "user-home@^1.1.1",
|
||||
"_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/v8flags",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bin": {
|
||||
"user-home": "cli.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/user-home/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Get the path to the user home directory",
|
||||
"devDependencies": {
|
||||
"ava": "0.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"cli.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/user-home#readme",
|
||||
"keywords": [
|
||||
"cli",
|
||||
"bin",
|
||||
"user",
|
||||
"home",
|
||||
"homedir",
|
||||
"dir",
|
||||
"directory",
|
||||
"folder",
|
||||
"path"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "user-home",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/user-home.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.1.1"
|
||||
}
|
42
node_modules/user-home/readme.md
generated
vendored
Normal file
42
node_modules/user-home/readme.md
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# user-home [](https://travis-ci.org/sindresorhus/user-home)
|
||||
|
||||
> Get the path to the user home directory
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save user-home
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var userHome = require('user-home');
|
||||
|
||||
console.log(userHome);
|
||||
//=> /Users/sindresorhus
|
||||
```
|
||||
|
||||
Returns `null` in the unlikely scenario that the home directory can't be found.
|
||||
|
||||
|
||||
## CLI
|
||||
|
||||
```sh
|
||||
$ npm install --global user-home
|
||||
```
|
||||
|
||||
```sh
|
||||
$ user-home --help
|
||||
|
||||
Example
|
||||
$ user-home
|
||||
/Users/sindresorhus
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
Reference in New Issue
Block a user