diff options
Diffstat (limited to 'node_modules/is-yarn-global')
-rw-r--r-- | node_modules/is-yarn-global/.travis.yml | 4 | ||||
-rw-r--r-- | node_modules/is-yarn-global/LICENSE | 21 | ||||
-rw-r--r-- | node_modules/is-yarn-global/README.md | 28 | ||||
-rw-r--r-- | node_modules/is-yarn-global/index.js | 12 | ||||
-rw-r--r-- | node_modules/is-yarn-global/package.json | 15 |
5 files changed, 80 insertions, 0 deletions
diff --git a/node_modules/is-yarn-global/.travis.yml b/node_modules/is-yarn-global/.travis.yml new file mode 100644 index 0000000..c576a02 --- /dev/null +++ b/node_modules/is-yarn-global/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "8" + - "6" diff --git a/node_modules/is-yarn-global/LICENSE b/node_modules/is-yarn-global/LICENSE new file mode 100644 index 0000000..04d3e31 --- /dev/null +++ b/node_modules/is-yarn-global/LICENSE @@ -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. diff --git a/node_modules/is-yarn-global/README.md b/node_modules/is-yarn-global/README.md new file mode 100644 index 0000000..d070e2a --- /dev/null +++ b/node_modules/is-yarn-global/README.md @@ -0,0 +1,28 @@ +# is-yarn-global + +[![](https://img.shields.io/travis/LitoMore/is-yarn-global/master.svg)](https://travis-ci.org/LitoMore/is-yarn-global) +[![](https://img.shields.io/npm/v/is-yarn-global.svg)](https://www.npmjs.com/package/is-yarn-global) +[![](https://img.shields.io/npm/l/is-yarn-global.svg)](https://github.com/LitoMore/is-yarn-global/blob/master/LICENSE) +[![](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](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) diff --git a/node_modules/is-yarn-global/index.js b/node_modules/is-yarn-global/index.js new file mode 100644 index 0000000..4d0c642 --- /dev/null +++ b/node_modules/is-yarn-global/index.js @@ -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; +}; diff --git a/node_modules/is-yarn-global/package.json b/node_modules/is-yarn-global/package.json new file mode 100644 index 0000000..759ae00 --- /dev/null +++ b/node_modules/is-yarn-global/package.json @@ -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" + } +} |