refactor: rewrite on typescript
This commit is contained in:
@@ -13,7 +13,7 @@ var colors = require('ansi-colors');
|
||||
* @param {string} command
|
||||
* @param {object} options
|
||||
*/
|
||||
function Command(command, options) {
|
||||
export function Command(command, options?) {
|
||||
var previousPath;
|
||||
|
||||
this.command = command;
|
||||
@@ -191,5 +191,3 @@ Command.prototype.exec = function exec(stdin, callback) {
|
||||
Command.prototype.toString = function toString() {
|
||||
return this.command;
|
||||
};
|
||||
|
||||
module.exports = Command;
|
||||
@@ -3,9 +3,10 @@
|
||||
* @module gulp-run
|
||||
*/
|
||||
|
||||
var inherit = require('util').inherits;
|
||||
var Transform = require('stream').Transform;
|
||||
var Command = require('./command');
|
||||
import { Command } from "./command";
|
||||
|
||||
var inherit = require("util").inherits;
|
||||
var Transform = require("stream").Transform;
|
||||
|
||||
/**
|
||||
* Creates a GulpRunner.
|
||||
@@ -67,4 +68,4 @@ GulpRunner.prototype.exec = function exec(stdin, callback) {
|
||||
*/
|
||||
GulpRunner.Command = Command;
|
||||
|
||||
module.exports = GulpRunner;
|
||||
export default GulpRunner;
|
||||
Reference in New Issue
Block a user