Skip to content
Merged
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
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ <h1 class="pink-highlight">Yargs be a node.js library fer hearties tryin' ter pa
<code class="hljs language-javascript">
#!/usr/bin/env node

require('yargs')
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';

yargs()
.scriptName("pirate-parser")
.usage('$0 &lt;cmd&gt; [args]')
.command('hello [name]', 'welcome ter yargs!', (yargs) => {
Expand All @@ -74,7 +77,7 @@ <h1 class="pink-highlight">Yargs be a node.js library fer hearties tryin' ter pa
console.log('hello', argv.name, 'welcome to yargs!')
})
.help()
.argv
.parse(hideBin(process.argv))

</code>
</pre>
Expand Down
Loading