Skip to content

Commit fbaad9d

Browse files
HoldYourWaffledomoritz
authored andcommitted
Ignore compiled JS files (YousefED#294)
1 parent 2c07667 commit fbaad9d

11 files changed

+9
-1223
lines changed

.github/PULL_REQUEST_TEMPLATE.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
Please:
2-
- [ ] Do not include the compiled `.js`, `.js.map`, or `.d.ts` in your pull request as it makes it harder to merge your changes.
32
- [ ] Make your pull request atomic, fixing one issue at a time unless there are many relevant issues that cannot be decoupled.
43
- [ ] Provide a test case & update the documentation in the `Readme.md`

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ yarn-error.log
88
.idea
99
*~
1010
.#*
11+
dist/

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "typescript-json-schema",
33
"version": "0.38.1",
44
"description": "typescript-json-schema generates JSON Schema files from your Typescript sources",
5-
"main": "typescript-json-schema.js",
6-
"typings": "typescript-json-schema.d.ts",
5+
"main": "dist/typescript-json-schema.js",
6+
"typings": "dist/typescript-json-schema.d.ts",
77
"bin": {
88
"typescript-json-schema": "./bin/typescript-json-schema"
99
},
@@ -65,7 +65,8 @@
6565
"tslint": "^5.16.0"
6666
},
6767
"scripts": {
68-
"test": "npm run build && mocha -t 5000 --require source-map-support/register test",
68+
"prepublishOnly": "npm run build",
69+
"test": "npm run build && mocha -t 5000 --require source-map-support/register dist/test",
6970
"debug": "ts-node --inspect=19248 --debug-brk typescript-json-schema-cli.ts",
7071
"run": "ts-node typescript-json-schema-cli.ts",
7172
"build": "tsc -p .",

test/error.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { assert } from "chai";
22
import { exec, getDefaultArgs } from "../typescript-json-schema";
3-
import * as path from "path";
43

54
describe("error", () => {
65
it("error-check", () => {
76
assert.throws(() => {
87
// This needs a valid path. "dates" chosen basically at random
9-
exec(path.resolve(__dirname, "./programs/dates/"), "MyObject", getDefaultArgs());
8+
exec("test/programs/dates/", "MyObject", getDefaultArgs());
109
}, Error, "No output definition. Probably caused by errors prior to this?");
1110
});
1211
});

tsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "es5",
44
"module": "commonjs",
55
"moduleResolution": "node",
6+
"outDir": "dist",
67
"isolatedModules": false,
78
"experimentalDecorators": true,
89
"emitDecoratorMetadata": true,
@@ -28,7 +29,8 @@
2829
"exclude": [
2930
"node_modules",
3031
"example",
31-
"test/programs"
32+
"test/programs",
33+
"dist"
3234
],
3335
"compileOnSave": true,
3436
"buildOnSave": false

typescript-json-schema-cli.d.ts

-1
This file was deleted.

typescript-json-schema-cli.js

-72
This file was deleted.

typescript-json-schema-cli.js.map

-1
This file was deleted.

typescript-json-schema.d.ts

-112
This file was deleted.

0 commit comments

Comments
 (0)