initial status
This commit is contained in:
4
node_modules/is-yarn-global/.travis.yml
generated
vendored
Normal file
4
node_modules/is-yarn-global/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "8"
|
||||
- "6"
|
21
node_modules/is-yarn-global/LICENSE
generated
vendored
Normal file
21
node_modules/is-yarn-global/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 LitoMore
|
||||
|
||||
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.
|
28
node_modules/is-yarn-global/README.md
generated
vendored
Normal file
28
node_modules/is-yarn-global/README.md
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# is-yarn-global
|
||||
|
||||
[](https://travis-ci.org/LitoMore/is-yarn-global)
|
||||
[](https://www.npmjs.com/package/is-yarn-global)
|
||||
[](https://github.com/LitoMore/is-yarn-global/blob/master/LICENSE)
|
||||
[](https://github.com/sindresorhus/xo)
|
||||
|
||||
Check if installed by yarn globally without any `fs` calls
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
$ npm install is-yarn-global
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Just require it in your package.
|
||||
|
||||
```javascript
|
||||
const isYarnGlobal = require('is-yarn-global');
|
||||
|
||||
console.log(isYarnGlobal());
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT © [LitoMore](https://github.com/LitoMore)
|
12
node_modules/is-yarn-global/index.js
generated
vendored
Normal file
12
node_modules/is-yarn-global/index.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
||||
module.exports = function () {
|
||||
const isWindows = process.platform === 'win32';
|
||||
const yarnPath = isWindows ? path.join('Yarn', 'config', 'global') : path.join('.config', 'yarn', 'global');
|
||||
if (__dirname.includes(yarnPath)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
15
node_modules/is-yarn-global/package.json
generated
vendored
Normal file
15
node_modules/is-yarn-global/package.json
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "is-yarn-global",
|
||||
"version": "0.3.0",
|
||||
"description": "Check if installed by yarn globally without any `fs` calls",
|
||||
"repository": "git@github.com:LitoMore/is-yarn-global.git",
|
||||
"author": "LitoMore (litomore@gmail.com)",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "xo"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^0.24.0",
|
||||
"xo": "^0.18.2"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user