orak-util-ts 0.0.1 → 0.0.3

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.
@@ -0,0 +1,8 @@
1
+ declare class Fibean {
2
+ mapData: Map<any, any>;
3
+ constructor();
4
+ }
5
+
6
+ declare function greet(name: string): string;
7
+
8
+ export { Fibean, greet };
@@ -0,0 +1,8 @@
1
+ declare class Fibean {
2
+ mapData: Map<any, any>;
3
+ constructor();
4
+ }
5
+
6
+ declare function greet(name: string): string;
7
+
8
+ export { Fibean, greet };
package/dist/index.js ADDED
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ Fibean: () => Fibean,
24
+ greet: () => greet
25
+ });
26
+ module.exports = __toCommonJS(src_exports);
27
+
28
+ // src/Fibean.ts
29
+ var Fibean = class {
30
+ mapData = /* @__PURE__ */ new Map();
31
+ constructor() {
32
+ }
33
+ };
34
+
35
+ // src/index.ts
36
+ function greet(name) {
37
+ return `Hello, ${name}!`;
38
+ }
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ Fibean,
42
+ greet
43
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,15 @@
1
+ // src/Fibean.ts
2
+ var Fibean = class {
3
+ mapData = /* @__PURE__ */ new Map();
4
+ constructor() {
5
+ }
6
+ };
7
+
8
+ // src/index.ts
9
+ function greet(name) {
10
+ return `Hello, ${name}!`;
11
+ }
12
+ export {
13
+ Fibean,
14
+ greet
15
+ };
package/package.json CHANGED
@@ -1,90 +1,36 @@
1
- {
2
- "name": "orak-util-ts",
3
- "version": "0.0.1",
4
- "description": "Orak Software Utility Library - Typescript",
5
- "main": "lib/main/index.js",
6
- "typings": "lib/main/index.d.ts",
7
- "module": "lib/module/index.js",
8
- "repository": "https://github.com/engtuncay/orak-util-ts.git",
9
- "author": "Tuncay Orak",
10
- "license": "MIT",
11
- "keywords": [
12
- "typescript",
13
- "library"
14
- ],
15
- "scripts": {
16
- "build": "run-p build:*",
17
- "build:main": "tsc -p tsconfig.json",
18
- "build:module": "tsc -p tsconfig.module.json",
19
- "fix": "run-s fix:*",
20
- "fix:prettier": "prettier \"src/**/*.ts\" --write",
21
- "fix:lint": "eslint src --ext .ts --fix",
22
- "test": "run-s build test:*",
23
- "test:lint": "eslint src --ext .ts",
24
- "test:prettier": "prettier \"src/**/*.ts\" --list-different",
25
- "test:unit": "nyc --silent ava",
26
- "watch:build": "tsc -p tsconfig.json -w",
27
- "watch:test": "nyc --silent ava --watch",
28
- "cov": "run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html",
29
- "cov:html": "nyc report --reporter=html",
30
- "cov:lcov": "nyc report --reporter=lcov",
31
- "cov:send": "run-s cov:lcov && codecov",
32
- "cov:check": "nyc report && nyc check-coverage --lines 100 --functions 100 --branches 100",
33
- "doc": "run-s doc:html && open-cli lib/docs/index.html",
34
- "doc:html": "typedoc src/ --exclude **/*.spec.ts --out lib/docs",
35
- "doc:json": "typedoc src/ --exclude **/*.spec.ts --json lib/docs/typedoc.json",
36
- "prepare": "husky install"
37
- },
38
- "devDependencies": {
39
- "@ava/typescript": "^3.0.1",
40
- "@istanbuljs/nyc-config-typescript": "^1.0.2",
41
- "@typescript-eslint/eslint-plugin": "^5.51.0",
42
- "@typescript-eslint/parser": "^5.51.0",
43
- "ava": "^5.2.0",
44
- "codecov": "^3.8.3",
45
- "eslint": "^8.34.0",
46
- "eslint-config-prettier": "^8.5.0",
47
- "eslint-plugin-eslint-comments": "^3.2.0",
48
- "eslint-plugin-import": "^2.26.0",
49
- "husky": "^8.0.3",
50
- "lint-staged": "^13.1.2",
51
- "npm-run-all": "^4.1.5",
52
- "nyc": "^15.1.0",
53
- "open-cli": "^7.0.1",
54
- "prettier": "^2.8.4",
55
- "ts-node": "^10.9.1",
56
- "typedoc": "^0.23.10",
57
- "typescript": "^4.9.5"
58
- },
59
- "files": [
60
- "lib/main",
61
- "lib/module",
62
- "!**/*.spec.*",
63
- "!**/*.json",
64
- "CHANGELOG.md",
65
- "LICENSE",
66
- "README.md"
67
- ],
68
- "ava": {
69
- "failFast": true,
70
- "timeout": "60s",
71
- "typescript": {
72
- "rewritePaths": {
73
- "src/": "lib/main/"
74
- },
75
- "compile": false
76
- },
77
- "files": [
78
- "!lib/module/**"
79
- ]
80
- },
81
- "prettier": {
82
- "singleQuote": true
83
- },
84
- "nyc": {
85
- "extends": "@istanbuljs/nyc-config-typescript",
86
- "exclude": [
87
- "**/*.spec.js"
88
- ]
89
- }
90
- }
1
+ {
2
+ "name": "orak-util-ts",
3
+ "version": "0.0.3",
4
+ "description": "Orak Software Utility Typescript Library",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "tsup",
13
+ "dev": "tsup --watch",
14
+ "test": "vitest run",
15
+ "test:watch": "vitest"
16
+ },
17
+ "keywords": [
18
+ "typescript",
19
+ "library"
20
+ ],
21
+ "author": "Tuncay Orak",
22
+ "license": "MIT",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/engtuncay/orak-util-ts.git"
26
+ },
27
+ "bugs": {
28
+ "url": "https://github.com/engtuncay/orak-util-ts.git/issues"
29
+ },
30
+ "homepage": "https://github.com/engtuncay/orak-util-ts#readme",
31
+ "devDependencies": {
32
+ "tsup": "^8.3.0",
33
+ "typescript": "^5.6.3",
34
+ "vitest": "^2.1.2"
35
+ }
36
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Amel Spahic
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/README.md DELETED
@@ -1,103 +0,0 @@
1
- # typescript-library-template
2
-
3
- A starter template for TypeScript libraries. Use this repository as a starting point for your own TypeScript library. This template includes the following features:
4
-
5
- - Compiles TypeScript code using both the `tsconfig.json` and `tsconfig.module.json` files.
6
- - Formats TypeScript code using [Prettier](https://prettier.io).
7
- - Lints TypeScript code using [ESLint](https://eslint.org).
8
- - Runs unit tests using [AVA](https://github.com/avajs/ava).
9
- - Generates code coverage reports using NYC.
10
- - Generates HTML documentation using [TypeDoc](https://typedoc.org).
11
- - Uses [Husky](https://github.com/typicode/husky) Git hooks and [Lint-staged](https://github.com/okonet/lint-staged) pre-commit hooks.
12
-
13
- ## Installation
14
-
15
- Clone the repository:
16
-
17
- ```bash
18
- git clone https://github.com/amelspahic/typescript-library-template.git
19
- ```
20
-
21
- Install the dependencies:
22
-
23
- ```bash
24
- npm install
25
- ```
26
-
27
- There are several scripts available to help you get started:
28
-
29
- ---
30
-
31
- Compile the TypeScript code using both the `tsconfig.json` and `tsconfig.module.json` files.
32
-
33
- ```bash
34
- npm run build
35
- ```
36
-
37
- ---
38
-
39
- Formats the TypeScript code using Prettier and lints the code using ESLint, fixing any issues found.
40
-
41
- ```bash
42
- npm run fix
43
- ```
44
-
45
- ---
46
-
47
- Lints the TypeScript code using ESLint, checks the code formatting using Prettier, and runs the unit tests using AVA.
48
-
49
- ```bash
50
- npm run test
51
- ```
52
-
53
- ---
54
-
55
- Watches for changes in the TypeScript code and recompiles the code using `tsconfig.json`.
56
-
57
- ```bash
58
- npm run watch:build
59
- ```
60
-
61
- ---
62
-
63
- Watches for changes in the TypeScript code and re-runs the unit tests using AVA.
64
-
65
- ```bash
66
- npm run watch:test
67
- ```
68
-
69
- ---
70
-
71
- Generates an HTML report of the code coverage using NYC and opens the report in the browser.
72
-
73
- ```bash
74
- npm run cov
75
- ```
76
-
77
- ---
78
-
79
- Generates HTML documentation of the TypeScript code and opens the documentation in the browser.
80
-
81
- ```bash
82
- npm run doc
83
- ```
84
-
85
- ---
86
-
87
- The template uses [Husky](https://github.com/typicode/husky) and [Lint-staged](https://github.com/okonet/lint-staged) to run pre-commit hooks that ensure your code is formatted, linted, tested, and documented before committing.
88
-
89
- ---
90
-
91
- For more information on available scripts, see the `Scripts` section of the `package.json` file.
92
-
93
- ## Contributing
94
-
95
- To contribute to the project, please follow the guidelines for submitting issues and pull requests.
96
-
97
- ## License
98
-
99
- This project is licensed under the MIT License.
100
-
101
- ## Acknowledgements
102
-
103
- This project uses Prettier, ESLint, AVA, NYC, Husky, Lint-staged, TypeDoc.