Skip to content

Commit

Permalink
prepare for typescript conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
n-peugnet committed Apr 20, 2019
1 parent abecb0f commit d643caa
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/image-map-creator.bundle.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
},
"homepage": "https://github.com/n-peugnet/image-map-creator#readme",
"devDependencies": {
"@types/p5": "^0.7.1",
"@types/downloadjs": "^1.4.1",
"@types/p5": "^0.7.2",
"css-loader": "^1.0.1",
"style-loader": "^0.23.1",
"ts-loader": "^5.3.3",
Expand Down
6 changes: 4 additions & 2 deletions src/class.area.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { between, round } from "./utils";
//@ts-check

import { round } from "./utils";
import { Coord } from "./class.coord";
import p5 from "p5";
import * as p5 from "p5";

export class Area {
/**
Expand Down
2 changes: 2 additions & 0 deletions src/class.coord.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ts-check

import { round } from "./utils";

/**
Expand Down
2 changes: 2 additions & 0 deletions src/class.image-map.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ts-check

import { Area, AreaDefault } from "./class.area";

export class ImageMap {
Expand Down
2 changes: 2 additions & 0 deletions src/class.selection.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ts-check

import { Area } from "./class.area";
import { Coord } from "./class.coord";

Expand Down
2 changes: 2 additions & 0 deletions src/p5.bg-layer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ts-check

import { imageMapCreator } from "./p5.image-map-creator";

/**
Expand Down
8 changes: 5 additions & 3 deletions src/p5.image-map-creator.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
//@ts-check

import { version } from "../package.json";
import { ImageMap } from "./class.image-map";
import { BgLayer } from "./p5.bg-layer";
import { Area, AreaCircle, AreaRect, AreaPoly } from "./class.area";
import { Coord } from "./class.coord";
import { Selection } from "./class.selection";
import { openWindow } from './utils';
import download from "downloadjs";
import * as download from "downloadjs";
import UndoManager from "undo-manager";
import QuickSettings from "quicksettings";
import p5 from "p5";
import ContextMenu from "../lib/contextmenu/contextmenu";
import * as p5 from "p5";
import * as ContextMenu from "../lib/contextmenu/contextmenu";
import '../lib/contextmenu/contextmenu.css';

/**
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"compilerOptions": {
"strict": true,
"module": "es6",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "es5",
// "allowJs": true,
"allowJs": true,
"sourceMap": true,
}
}

0 comments on commit d643caa

Please sign in to comment.