Skip to content

Commit

Permalink
Fix import bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Invoker committed Oct 11, 2020
1 parent 9a9bbb9 commit 3e987d0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
language: node_js
node_js:
- "10"
- "13"
- "14"
jobs:
include:
-
Expand All @@ -11,7 +11,7 @@ jobs:
script: npm run coveralls
-
stage: deploy
node_js: "13"
node_js: "14"
deploy:
provider: npm
email: "594404963@qq.com"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "war3map",
"version": "0.1.0",
"version": "0.1.1",
"description": "To translate between `war3map` and `json` formats for WarCraft III .w3x maps.",
"main": "dist/src/index.js",
"homepage": "https://invokerrrr.github.io/war3map/",
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ export * from "./BinaryBuffer";
export * from "./CamerasObject";
export * from "./EnvironmentObject";
export * from "./DoodadsObject";
export * from "./ObjectsObject";
export * from "./PathmapObject";
export * from "./RegionObject";
export * from "./ShadowObject";
17 changes: 6 additions & 11 deletions test/MapObject.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
/* eslint-disable jest/expect-expect */
import * as assert from "assert";
import { ReadDumpObject } from "../src/BinaryBuffer";

import { CamerasObject } from "../src/CamerasObject";
import { EnvironmentObject } from "../src/EnvironmentObject";
import { DoodadsObject } from "../src/DoodadsObject";
import { readFileSync } from "fs";
import { RegionObject } from "../src/RegionObject";
import { PathmapObject } from "../src/PathmapObject";
import { ShadowObject } from "../src/ShadowObject";

import { ObjectsObject } from "../src/ObjectsObject";
//import {resolve} from "path";
import {
ReadDumpObject, CamerasObject, EnvironmentObject,
DoodadsObject, RegionObject, PathmapObject,
ShadowObject, ObjectsObject
} from "../src/index";

function assertObjectReadDump<T extends ReadDumpObject>(obj1: T, obj2: T, map: string, fileType: string) {
const buff = readFileSync(`./test/${map}/war3map.${fileType}`);
Expand Down Expand Up @@ -58,7 +53,7 @@ describe("ShadowObject", () => {

describe("PathmapObject", () => {
it("should support map2", () => {
assertObjectReadDump(new PathmapObject(),new PathmapObject(), "map2", "wpm");
assertObjectReadDump(new PathmapObject(), new PathmapObject(), "map2", "wpm");
});
});
describe("ObjectsObject", () => {
Expand Down

0 comments on commit 3e987d0

Please sign in to comment.