Skip to content

Commit

Permalink
Other: Removed debug build, made it an extension
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Apr 17, 2017
1 parent 2dcae25 commit 5867f07
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 30 deletions.
2 changes: 0 additions & 2 deletions debug.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions debug.js

This file was deleted.

4 changes: 4 additions & 0 deletions ext/debug/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
protobufjs/ext/debug
=========================

Experimental debugging extension.
7 changes: 2 additions & 5 deletions src/index-debug.js → ext/debug/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// WARNING: highly experimental.
// might eventually become a starting point for a real debug build.

"use strict";
var protobuf = module.exports = require("./index");
var protobuf = require("../..");

/**
* Debugging utility functions. Only present in debug builds.
* @namespace
*/
var debug = protobuf.debug = {};
var debug = protobuf.debug = module.exports = {};

var codegen = protobuf.util.codegen;

Expand Down
17 changes: 0 additions & 17 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,23 +338,6 @@ export interface IExtensionField extends IField {
*/
type FieldDecorator = (prototype: object, fieldName: string) => void;

/** Debugging utility functions. Only present in debug builds. */
export namespace debug {

/**
* Returns a list of unused types within the specified root.
* @param ns Namespace to search
* @returns Unused types
*/
function unusedTypes(ns: NamespaceBase): Type[];

/** Enables debugging extensions. */
function enable(): void;

/** Disables debugging extensions. */
function disable(): void;
}

/**
* A node-style callback as used by {@link load} and {@link Root#load}.
* @param error Error, if any, otherwise `null`
Expand Down
4 changes: 2 additions & 2 deletions tests/other_basics-debug.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var tape = require("tape");
/* var tape = require("tape");
var protobuf = require("../debug");
Expand Down Expand Up @@ -105,4 +105,4 @@ tape.test("google.protobuf.Any type", function(test) {
test.end();
});
});
}); */

0 comments on commit 5867f07

Please sign in to comment.