yeoman-character
Advanced tools
Comparing version 1.1.0 to 2.0.0
#!/usr/bin/env node | ||
'use strict'; | ||
var yeomanCharacter = require('./'); | ||
console.log('\n' + yeomanCharacter); | ||
import yeomanCharacter from './index.js'; | ||
console.log(`\n${yeomanCharacter}`); |
22
index.js
@@ -1,7 +0,10 @@ | ||
'use strict'; | ||
var path = require('path'); | ||
var fs = require('fs'); | ||
var supportsColor = require('supports-color'); | ||
import process from 'node:process'; | ||
import path from 'node:path'; | ||
import fs from 'node:fs'; | ||
import {fileURLToPath} from 'node:url'; | ||
import supportsColor from 'supports-color'; | ||
var fallback = [ | ||
const __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
const fallback = [ | ||
' _-----_', | ||
@@ -15,6 +18,9 @@ ' | |', | ||
' __\'.___.\'__', | ||
'´ ` |° ´ Y `' | ||
'´ ` |° ´ Y `', | ||
].join('\n'); | ||
module.exports = supportsColor && process.platform !== 'win32' ? | ||
fs.readFileSync(path.join(__dirname, 'yeoman.txt'), 'utf8') : fallback; | ||
const yeomanCharacter = supportsColor && process.platform !== 'win32' | ||
? fs.readFileSync(path.join(__dirname, 'yeoman.txt'), 'utf8') | ||
: fallback; | ||
export default yeomanCharacter; |
{ | ||
"name": "yeoman-character", | ||
"version": "1.1.0", | ||
"description": "The Yeoman character in your CLI. Like wat.", | ||
"license": "MIT", | ||
"repository": "yeoman/yeoman-character", | ||
"author": "Yeoman", | ||
"bin": "cli.js", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "node test.js" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"cli.js", | ||
"yeoman.txt" | ||
], | ||
"keywords": [ | ||
"cli-app", | ||
"cli", | ||
"bin", | ||
"yeoman", | ||
"character", | ||
"figure", | ||
"logo", | ||
"color", | ||
"ansi", | ||
"ascii", | ||
"art" | ||
], | ||
"dependencies": { | ||
"supports-color": "^3.1.2" | ||
}, | ||
"devDependencies": { | ||
"ava": "0.0.4" | ||
} | ||
"name": "yeoman-character", | ||
"version": "2.0.0", | ||
"description": "The Yeoman character in your CLI. Like wat.", | ||
"license": "MIT", | ||
"repository": "yeoman/yeoman-character", | ||
"author": "Yeoman", | ||
"type": "module", | ||
"bin": "./cli.js", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"cli.js", | ||
"yeoman.txt" | ||
], | ||
"keywords": [ | ||
"cli-app", | ||
"cli", | ||
"bin", | ||
"yeoman", | ||
"character", | ||
"figure", | ||
"logo", | ||
"color", | ||
"ansi", | ||
"ascii", | ||
"art" | ||
], | ||
"dependencies": { | ||
"supports-color": "^9.4.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^5.3.1", | ||
"xo": "^0.56.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# yeoman-character [![Build Status](https://travis-ci.org/yeoman/yeoman-character.svg?branch=master)](https://travis-ci.org/yeoman/yeoman-character) | ||
# yeoman-character | ||
@@ -7,24 +7,19 @@ > The Yeoman character in your CLI. Like wat. | ||
## Usage | ||
```sh | ||
$ npm install --save yeoman-character | ||
npm install yeoman-character | ||
``` | ||
```js | ||
console.log(require('yeoman-character')); | ||
import yeomanCharacter from 'yeoman-character'; | ||
console.log(yeomanCharacter); | ||
``` | ||
## CLI | ||
```sh | ||
$ npm install --global yeoman-character | ||
$ yeoman-character | ||
npm install --global yeoman-character | ||
yeoman-character | ||
``` | ||
## License | ||
MIT © Yeoman team |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
26527
24
1
Yes
2
25
+ Addedsupports-color@9.4.0(transitive)
- Removedhas-flag@1.0.0(transitive)
- Removedsupports-color@3.2.3(transitive)
Updatedsupports-color@^9.4.0