https://github.com/codetheweb/nodesplash
🌊 port of qdm12/gosplash to TypeScript
https://github.com/codetheweb/nodesplash
Last synced: 29 days ago
JSON representation
🌊 port of qdm12/gosplash to TypeScript
- Host: GitHub
- URL: https://github.com/codetheweb/nodesplash
- Owner: codetheweb
- License: mit
- Created: 2021-12-13T16:58:57.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-14T00:57:48.000Z (over 3 years ago)
- Last Synced: 2025-03-18T10:11:39.395Z (about 1 month ago)
- Language: TypeScript
- Size: 98.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🌊 NodeSplash [](https://codecov.io/gh/codetheweb/nodesplash)
Library to show log lines at the start of a program.
Direct port of [qdm12](https://github.com/qdm12)'s excellent [GoSplash](https://github.com/qdm12/gosplash) library.
For example, this
```typescript
import {makeLines} from "nodesplash";console.log(makeLines({
separator: '=',
user: 'codetheweb',
repository: 'nodesplash',
emails: ['[email protected]'],
version: 'v1.1.1',
commit: 'c892ef2',
buildDate: new Date('7/13/2021'),
paypalUser: 'codetheweb',
githubSponsor: 'codetheweb'
}).join('\n'));
```will result in this:
```log
========================================
========================================
============== nodesplash ==============
========================================
=========== Made with ❤️ by ============
==== https://github.com/codetheweb =====
========================================
========================================Running version v1.1.1 built on 7/13/2021 (commit c892ef2)
🔧 Need help? https://github.com/codetheweb/nodesplash/discussions/new
🐛 Bug? https://github.com/codetheweb/nodesplash/issues/new
✨ New feature? https://github.com/codetheweb/nodesplash/issues/new
☕ Discussion? https://github.com/codetheweb/nodesplash/discussions/new
💻 Email? [email protected]
💰 Help me? https://www.paypal.me/codetheweb https://github.com/sponsors/codetheweb
```## Usage
`yarn add nodesplash` or `npm i nodesplash -s`. Then:
- `const {makeLines} = require('nodesplash')` for JavaScript or
- `import {makeLines} from 'nodesplash'` for TypeScript.All settings:
```typescript
interface Settings {
// Formatting settings
lineLength?: number; // defaults to 40
separator?: string; // defaults to '='
madeByPrefix?: string; // defaults to 'Made with ❤️ by '// Project information
rootURL?: string; // defaults to https://github.com
user?: string;
repository?: string;
authors?: string[]; // defaults to `${rootURL}/${user}`
emails?: string[];// Program information
version?: string; // defaults to 'unknown'
commit?: string; // defaults to 'unknown'
buildDate?: Date; // defaults to 'unknown date'
announcement?: string;
announceExp?: Date; // don't include to disable expiration// Sponsor information
paypalUser?: string;
githubSponsor?: string;
}
```