WIP - add extractor, generate snippet_data
This commit is contained in:
21
node_modules/which-pm-runs/LICENSE
generated
vendored
Normal file
21
node_modules/which-pm-runs/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Zoltan Kochan
|
||||
|
||||
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.
|
||||
29
node_modules/which-pm-runs/README.md
generated
vendored
Normal file
29
node_modules/which-pm-runs/README.md
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
# which-pm-runs
|
||||
|
||||
> Detects what package manager executes the process
|
||||
|
||||
[](https://www.npmjs.com/package/which-pm-runs) [](https://travis-ci.org/zkochan/which-pm-runs)
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm i which-pm-runs
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
'use strict'
|
||||
const whichPMRuns = require('which-pm-runs')
|
||||
|
||||
whichPMRuns()
|
||||
//> {name: "pnpm", version: "0.64.2"}
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
* [which-pm](https://github.com/zkochan/which-pm) - Detects what package manager was used for installation
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE) © [Zoltan Kochan](http://kochan.io)
|
||||
17
node_modules/which-pm-runs/index.js
generated
vendored
Normal file
17
node_modules/which-pm-runs/index.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = function () {
|
||||
if (!process.env.npm_config_user_agent) {
|
||||
return undefined
|
||||
}
|
||||
return pmFromUserAgent(process.env.npm_config_user_agent)
|
||||
}
|
||||
|
||||
function pmFromUserAgent (userAgent) {
|
||||
const pmSpec = userAgent.split(' ')[0]
|
||||
const separatorPos = pmSpec.lastIndexOf('/')
|
||||
return {
|
||||
name: pmSpec.substr(0, separatorPos),
|
||||
version: pmSpec.substr(separatorPos + 1)
|
||||
}
|
||||
}
|
||||
61
node_modules/which-pm-runs/package.json
generated
vendored
Normal file
61
node_modules/which-pm-runs/package.json
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"_from": "which-pm-runs@^1.0.0",
|
||||
"_id": "which-pm-runs@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=",
|
||||
"_location": "/which-pm-runs",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "which-pm-runs@^1.0.0",
|
||||
"name": "which-pm-runs",
|
||||
"escapedName": "which-pm-runs",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/prebuild-install"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz",
|
||||
"_shasum": "670b3afbc552e0b55df6b7780ca74615f23ad1cb",
|
||||
"_spec": "which-pm-runs@^1.0.0",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/prebuild-install",
|
||||
"author": {
|
||||
"name": "Zoltan Kochan"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/zkochan/which-pm-runs/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Detects what package manager executes the process",
|
||||
"devDependencies": {
|
||||
"execa": "^0.6.3",
|
||||
"npm": "^4.4.4",
|
||||
"pnpm": "^0.64.3",
|
||||
"tape": "^4.6.3",
|
||||
"yarn": "^0.22.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/zkochan/which-pm-runs#readme",
|
||||
"keywords": [
|
||||
"npm",
|
||||
"pnpm",
|
||||
"yarn"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "which-pm-runs",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zkochan/which-pm-runs.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tape test"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
||||
Reference in New Issue
Block a user