mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-31 22:26:53 +02:00
Refactor code
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// var fs = require('fs')
|
||||
var chalk = require('chalk')
|
||||
var error = chalk.bold.red
|
||||
var cli = require('../lib/cli.js')
|
||||
var lib = require('../lib')
|
||||
|
||||
cli.parse(process.argv.slice(2), function (err, message, options) {
|
||||
if (err) {
|
||||
console.error(
|
||||
error('\nYou had errors in your syntax. Use --help for further information.')
|
||||
chalk.bold.red('\nYou had errors in your syntax. Use --help for further information.')
|
||||
)
|
||||
err.forEach(function (e) {
|
||||
console.error(e.message)
|
||||
|
Reference in New Issue
Block a user