Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to ESM #67

Merged
merged 5 commits into from
Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
fail-fast: false
matrix:
node-version:
- 16
- 14
- 12
- 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
18 changes: 9 additions & 9 deletions example.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
'use strict';
const chalk = require('chalk');
const boxen = require('.');
import process from 'node:process';
import chalk from 'chalk';
import boxen from './index.js';

console.log('\n\n' + boxen(chalk.cyan('unicorn'), {
padding: 1,
margin: 1,
borderColor: 'yellow'
borderColor: 'yellow',
}) + '\n');

console.log('\n\n' + boxen(chalk.cyan('unicorn'), {
padding: 1,
margin: 1,
borderColor: 'yellow',
borderStyle: 'double'
borderStyle: 'double',
}) + '\n');

console.log('\n\n' + boxen(chalk.cyan('unicorn'), {
padding: 1,
margin: 1,
borderColor: '#eebbaa',
borderStyle: 'double'
borderStyle: 'double',
}) + '\n');

console.log('\n\n' + boxen(chalk.black('unicorn'), {
padding: 1,
margin: 1,
borderColor: '#ffc0cb',
backgroundColor: '#00ffff',
borderStyle: 'double'
borderStyle: 'double',
}) + '\n');

console.log('\n\n' + boxen(chalk.black('unicorn'), {
Expand All @@ -41,8 +41,8 @@ console.log('\n\n' + boxen(chalk.black('unicorn'), {
bottomLeft: '+',
bottomRight: '+',
horizontal: '-',
vertical: '|'
}
vertical: '|',
},
}) + '\n');

const sentences = 'Unbreakable_text_because_it_has_no_spaces '.repeat(5);
Expand Down
Loading