fodec 1.0.3 → 1.0.4-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { Fodec } from "./Fodec";
1
+ export { Fodec } from "./makes/Fodec";
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Fodec = void 0;
4
- var Fodec_1 = require("./Fodec");
4
+ var Fodec_1 = require("./makes/Fodec");
5
5
  Object.defineProperty(exports, "Fodec", { enumerable: true, get: function () { return Fodec_1.Fodec; } });
package/lib/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/lib/main.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const App_1 = require("./makes/App");
5
+ const app = new App_1.App();
6
+ app.run();
@@ -17,7 +17,7 @@ const cli_1 = require("@kearisp/cli");
17
17
  const utils_1 = require("@wocker/utils");
18
18
  const fs_1 = require("fs");
19
19
  const path_1 = __importDefault(require("path"));
20
- const Fodec_1 = require("../Fodec");
20
+ const Fodec_1 = require("./Fodec");
21
21
  const generateKey_1 = require("../utils/generateKey");
22
22
  class App {
23
23
  constructor() {
@@ -57,7 +57,7 @@ class App {
57
57
  }
58
58
  init() {
59
59
  return __awaiter(this, void 0, void 0, function* () {
60
- const configPath = "./fodec-2.json";
60
+ const configPath = "./fodec.json";
61
61
  if ((0, fs_1.existsSync)(configPath)) {
62
62
  throw new Error("Config already exists");
63
63
  }
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.Fodec = void 0;
16
16
  const path_1 = __importDefault(require("path"));
17
17
  const fs_1 = require("fs");
18
- const encodeFont_1 = require("./utils/encodeFont");
18
+ const encodeFont_1 = require("../utils/encodeFont");
19
19
  class Fodec {
20
20
  constructor(key) {
21
21
  this.key = key;
@@ -1,4 +1,6 @@
1
1
  import { AlphabetType } from "./MapAlphabets";
2
+ import { FontResource } from "./FontResource";
3
+ import { JsonResource } from "./JsonResource";
2
4
  export type Config = {
3
5
  basePath?: string;
4
6
  output?: {
@@ -11,16 +13,3 @@ export type Config = {
11
13
  }[];
12
14
  resources: (FontResource | JsonResource)[];
13
15
  };
14
- type FontResource = {
15
- type: "font";
16
- format: string;
17
- name: string;
18
- path: string;
19
- output?: string;
20
- };
21
- type JsonResource = {
22
- type: "json";
23
- path: string;
24
- output?: string;
25
- };
26
- export {};
@@ -0,0 +1,7 @@
1
+ export type FontResource = {
2
+ type: "font";
3
+ format: string;
4
+ name: string;
5
+ path: string;
6
+ output?: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export type JsonResource = {
2
+ type: "json";
3
+ path: string;
4
+ output?: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fodec",
3
- "version": "1.0.3",
3
+ "version": "1.0.4-beta.0",
4
4
  "author": "Kris Papercut <krispcut@gmail.com>",
5
5
  "description": "Font encoder",
6
6
  "license": "MIT",
@@ -10,11 +10,12 @@
10
10
  "cli": "./lib/cli"
11
11
  },
12
12
  "bin": {
13
- "fodec": "./bin/fodec.js"
13
+ "fodec": "lib/main.js"
14
14
  },
15
15
  "scripts": {
16
16
  "prepublishOnly": "npm run build",
17
17
  "build": "tsc --project tsconfig.build.json",
18
+ "postbuild": "chmod +x ./lib/main.js",
18
19
  "watch": "tsc -w --project tsconfig.build.json",
19
20
  "test": "echo \"Error: no test specified\" && exit 1"
20
21
  },
package/bin/fodec.js DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const {app} = require("../lib/cli/index.js");
4
-
5
- app.run();
@@ -1,2 +0,0 @@
1
- import { App } from "./App";
2
- export declare const app: App;
package/lib/cli/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.app = void 0;
4
- const App_1 = require("./App");
5
- exports.app = new App_1.App();
File without changes
File without changes