-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
Example:
const cliuiCJS = require('cliui')
import('cliui').then(({ default: cliuiESM }) => {
const uiCJS = cliuiCJS({})
const uiESM = cliuiESM({})
const text = `usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]
<tagname> [<commit> | <object>]
or: git tag -d <tagname>...
or: git tag [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]
[--points-at <object>] [--column[=<options>] | --no-column]
[--create-reflog] [--sort=<key>] [--format=<format>]
[--merged <commit>] [--no-merged <commit>] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...`
console.error('~ ~ ~ ~ ~ ~ ~ ~ ~ ~')
console.error('cjs')
uiCJS.div({
padding: [0, 0, 0, 0],
text,
})
console.log(uiCJS.toString())
console.error('~ ~ ~ ~ ~ ~ ~ ~ ~ ~')
console.error('esm')
uiESM.div({
padding: [0, 0, 0, 0],
text,
})
console.log(uiESM.toString())
})
/* output:
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
cjs
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]
<tagname> [<commit> | <object>]
or: git tag -d <tagname>...
or: git tag [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]
[--points-at <object>] [--column[=<options>] | --no-column]
[--create-reflog] [--sort=<key>] [--format=<format>]
[--merged <commit>] [--no-merged <commit>] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
esm
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]
<tagname> [<commit> | <object>]
or: git tag -d <tagname>...
or: git
tag [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]
[--points-at <object>] [--column[=<options>] | --no-column]
[--
create-reflog] [--sort=<key>] [--format=<format>]
[--merged <comm
it>] [--no-merged <commit>] [<pattern>...]
or: git tag -v [--format=<format>]
<tagname>...
*/I'm not sure why, but the esm results seem to wrap at very confusing places, differently from the cjs version.
zbyte64
Metadata
Metadata
Assignees
Labels
No labels