Skip to content

Commit

Permalink
Other: Additional restructuring for moving configuration files out of…
Browse files Browse the repository at this point in the history
… the root folder
  • Loading branch information
dcodeIO committed Mar 12, 2017
1 parent c0b7c9f commit 5041fad
Show file tree
Hide file tree
Showing 42 changed files with 458 additions and 361 deletions.
4 changes: 3 additions & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
engines:
eslint:
enabled: true
config:
config: config/eslint.json
tslint:
enabled: true
channel: beta
config: .tslint.json
config: config/tslint.json
ratings:
paths:
- "src/**.js"
Expand Down
2 changes: 0 additions & 2 deletions .istanbul.yml

This file was deleted.

2 changes: 1 addition & 1 deletion bench/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ setTimeout(function() {
Test.fromObject(dataObject);
})
.run();

newSuite("message to object")
.add("Type.toObject", function() {
Test.toObject(dataMessage);
Expand Down
2 changes: 1 addition & 1 deletion cli/pbjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ exports.main = function main(args, callback) {
else
process.stdout.write(output, "utf8");
}
return callback
return callback
? callback(null)
: undefined;
});
Expand Down
2 changes: 1 addition & 1 deletion cli/pbts.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ exports.main = function(args, callback) {
// There is no proper API for jsdoc, so this executes the CLI and pipes the output
var basedir = path.join(__dirname, "..");
var moduleName = argv.name || "null";
var cmd = "node \"" + require.resolve("jsdoc/jsdoc.js") + "\" -c \"" + path.join(basedir, "scripts", "jsdoc.types.json") + "\" -q \"module=" + encodeURIComponent(moduleName) + "&comments=" + Boolean(argv.comments) + "\" " + files.map(function(file) { return "\"" + file + "\""; }).join(" ");
var cmd = "node \"" + require.resolve("jsdoc/jsdoc.js") + "\" -c \"" + path.join(basedir, "config", "jsdoc-types.json") + "\" -q \"module=" + encodeURIComponent(moduleName) + "&comments=" + Boolean(argv.comments) + "\" " + files.map(function(file) { return "\"" + file + "\""; }).join(" ");
var child = child_process.exec(cmd, {
cwd: process.cwd(),
argv0: "node",
Expand Down
2 changes: 1 addition & 1 deletion cli/targets/json-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var util = require("../util");
json_module.description = "JSON representation as a module";

function json_module(root, options, callback) {
try {
try {
var rootProp = util.safeProp(options.root || "default");
var output = [
(options.es6 ? "const" : "var") + " $root = ($protobuf.roots" + rootProp + " || ($protobuf.roots" + rootProp + " = new $protobuf.Root()))\n"
Expand Down
2 changes: 1 addition & 1 deletion cli/targets/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ module.exports = json_target;
json_target.description = "JSON representation";

function json_target(root, options, callback) {
callback(null, JSON.stringify(root, null, 2));
callback(null, JSON.stringify(root, null, 2));
}
2 changes: 1 addition & 1 deletion cli/targets/proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function underScore(str) {
var out = [];
var indent = 0;
var first = false;
var syntax = 3;
var syntax = 3;

function proto_target(root, options, callback) {
if (options) {
Expand Down
5 changes: 4 additions & 1 deletion .eslintrc.json → config/eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@
// Stylistic Issues
"semi": 1, // maybe next time
"no-extra-semi": 1,
"quotes": 1 // useful for gzip
"quotes": 1, // useful for gzip
"no-trailing-spaces": 1,
"no-unneeded-ternary": 1,
"unicode-bom": [2, "never"]

// ECMAScript 6 // maybe next time
}
Expand Down
5 changes: 5 additions & 0 deletions config/istanbul.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"instrumentation": {
"root": "./src"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5041fad

Please sign in to comment.