tkeron 3.0.1 → 3.1.1

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/changelog.md CHANGED
@@ -1,3 +1,13 @@
1
+ # v3.1.1
2
+
3
+ - placed the extensions.d.ts file in the root directory so that vscode recognizes css files, images, html, among others, as modules.
4
+
5
+ # v3.1.0
6
+
7
+ ## Breaking changes
8
+
9
+ - the tkeron library and util files was removed, simplify the project.
10
+
1
11
  # v3.0.0
2
12
 
3
13
  - changed the argument input for the "dev" command to accept named arguments as well.
package/dist/cmdInit.js CHANGED
@@ -4,12 +4,9 @@ exports.cmdInit = void 0;
4
4
  const promises_1 = require("fs/promises");
5
5
  const path_1 = require("path");
6
6
  const buildLoaders_1 = require("./buildLoaders");
7
- const copyDir_1 = require("./copyDir");
8
- const createModFile_1 = require("./createModFile");
9
7
  const createTsConfigFile_1 = require("./createTsConfigFile");
10
8
  const fileExist_1 = require("./fileExist");
11
9
  const getOptions_1 = require("./getOptions");
12
- const libFiles_ts_1 = require("./libFiles.ts");
13
10
  const cmdInit = async ({ sourceDir, outputDir } = { sourceDir: "", outputDir: "" }) => {
14
11
  const options = (0, getOptions_1.getOptions)({ sourceDir, outputDir });
15
12
  sourceDir = options.sourceDir;
@@ -17,20 +14,11 @@ const cmdInit = async ({ sourceDir, outputDir } = { sourceDir: "", outputDir: ""
17
14
  await (0, createTsConfigFile_1.createTsConfigFile)();
18
15
  if (!(await (0, fileExist_1.fileExists)(sourceDir)))
19
16
  await (0, promises_1.mkdir)(sourceDir, { recursive: true });
20
- const tklibs = (0, path_1.join)(sourceDir, "tklibs");
21
- if (!(await (0, fileExist_1.fileExists)(tklibs)))
22
- await (0, promises_1.mkdir)(tklibs, { recursive: true });
23
- for (const file of libFiles_ts_1.libFiles) {
24
- const dest = (0, path_1.join)(tklibs, file);
25
- const src = (0, path_1.join)(__dirname, "..", "distFiles", file);
26
- await (0, promises_1.copyFile)(src, dest);
27
- }
28
- await (0, createModFile_1.createModFile)(sourceDir);
17
+ const dotTkeron = (0, path_1.join)(sourceDir, "..", ".tkeron");
18
+ if (!(await (0, fileExist_1.fileExists)(dotTkeron)))
19
+ await (0, promises_1.mkdir)(dotTkeron, { recursive: true });
29
20
  const extModules = (0, buildLoaders_1.getExtModules)();
30
- const extModName = (0, path_1.join)(tklibs, "extensions.d.ts");
21
+ const extModName = (0, path_1.join)(dotTkeron, "..", "extensions.d.ts");
31
22
  await (0, promises_1.writeFile)(extModName, extModules, { encoding: "utf-8" });
32
- const rxjsSrc = (0, path_1.join)(__dirname, "..", "node_modules", "rxjs", "src");
33
- const rxjsDest = (0, path_1.join)(tklibs, "rxjs");
34
- await (0, copyDir_1.copyDir)(rxjsSrc, rxjsDest);
35
23
  };
36
24
  exports.cmdInit = cmdInit;
@@ -16,15 +16,9 @@ const createTsConfigFile = async () => {
16
16
  "skipLibCheck": true,
17
17
  "baseUrl": "${sourceDir}",
18
18
  "paths": {
19
- "@tkeron": [
20
- "tklibs/mod"
21
- ],
22
19
  "@comps/*": [
23
20
  "comps/*"
24
21
  ],
25
- "@rxjs": [
26
- "tklibs/rxjs/index"
27
- ],
28
22
  }
29
23
  },
30
24
  "compileOnSave": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tkeron",
3
- "version": "3.0.1",
3
+ "version": "3.1.1",
4
4
  "description": "Micro framework for developing web user interfaces with typescript.",
5
5
  "bin": {
6
6
  "tkeron": "dist/index.js",
package/dist/copyDir.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const copyDir: (sourceDir: string, outputDir: string) => Promise<void>;
package/dist/copyDir.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.copyDir = void 0;
4
- const promises_1 = require("fs/promises");
5
- const path_1 = require("path");
6
- const fileExist_1 = require("./fileExist");
7
- const getFilesRecursive_1 = require("./getFilesRecursive");
8
- const copyDir = async (sourceDir, outputDir) => {
9
- for (const file of (0, getFilesRecursive_1.getFilesRecursive)(sourceDir, { useDirectoryBase: true })) {
10
- const sourcePath = (0, path_1.join)(sourceDir, file);
11
- const outPath = (0, path_1.join)(outputDir, file);
12
- const dir = (0, path_1.dirname)(outPath);
13
- if (!(await (0, fileExist_1.fileExists)(dir)))
14
- await (0, promises_1.mkdir)(dir, { recursive: true });
15
- await (0, promises_1.copyFile)(sourcePath, outPath);
16
- }
17
- };
18
- exports.copyDir = copyDir;
@@ -1 +0,0 @@
1
- export declare const createModFile: (sourceDir: string) => Promise<void>;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createModFile = void 0;
4
- const promises_1 = require("fs/promises");
5
- const path_1 = require("path");
6
- const libFiles_ts_1 = require("./libFiles.ts");
7
- const createModFile = async (sourceDir) => {
8
- let modFile = "";
9
- const modFilePath = (0, path_1.join)(sourceDir, "tklibs", "mod.ts");
10
- for (const file of libFiles_ts_1.libFiles)
11
- modFile += `export * from "./${file.replace(/\.ts$/, "")}";\n`;
12
- await (0, promises_1.writeFile)(modFilePath, modFile, { encoding: "utf-8" });
13
- };
14
- exports.createModFile = createModFile;