Refactor code

This commit is contained in:
Tyler Long
2017-04-16 18:27:48 +08:00
parent b9b991c5fe
commit 3d500800f1
3 changed files with 2 additions and 29 deletions

View File

@@ -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)

View File

@@ -1,26 +0,0 @@
'use strict'
var Stream = require('stream')
// var Path = require('path')
function gulpRename (obj) {
var stream = new Stream.Transform({objectMode: true})
// function parsePath (path) {
// var extname = Path.extname(path)
// return {
// dirname: Path.dirname(path),
// basename: Path.basename(path, extname),
// extname: extname
// }
// }
stream._transform = function (file, unused, callback) {
console.log('a file')
callback(null, file)
}
return stream
}
module.exports = gulpRename

View File

@@ -3,3 +3,4 @@
- Problem is it's for d3 v4 only
- node console output colors like Chrome console
- default theme doesn't work for class diagram
- mermaidAPI.js cannot be required directly