saju-logic 0.0.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/README.md +80 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +12 -0
- package/package.json +23 -0
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# saju-logic
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/saju-logic)
|
|
4
|
+
|
|
5
|
+
A collection of reusable logic for Saju (사주), the traditional Korean astrology based on the Four Pillars of Destiny. This library aims to provide common functionalities for web or app services related to Saju.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
The goal of this project is to organize and standardize the complex logic used in Saju analysis, making it easy to integrate into various web and mobile applications.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Install the package using npm:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install saju-logic
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Here's a quick example of how to use the library. (Note: The function below is a placeholder and will be replaced with actual Saju logic.)
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { someSajuFunction } from 'saju-logic';
|
|
25
|
+
|
|
26
|
+
// Example usage will be updated as the library develops.
|
|
27
|
+
// const result = someSajuFunction(birthDate);
|
|
28
|
+
|
|
29
|
+
// console.log(result);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Scripts
|
|
33
|
+
|
|
34
|
+
### Build
|
|
35
|
+
|
|
36
|
+
To build the project from the TypeScript source, run:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm run build
|
|
40
|
+
```
|
|
41
|
+
This will compile the code from `src` into JavaScript files in the `dist` directory.
|
|
42
|
+
|
|
43
|
+
### Test
|
|
44
|
+
|
|
45
|
+
To run the tests using Vitest, use:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm test
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Publishing to npm
|
|
52
|
+
|
|
53
|
+
To publish the package to the npm registry, follow these steps:
|
|
54
|
+
|
|
55
|
+
1. **Login to npm (if not already logged in):**
|
|
56
|
+
```bash
|
|
57
|
+
npm login
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
2. **Update the version:** Before publishing a new version, it's crucial to update the package version in `package.json`. You can do this manually or use the `npm version` command.
|
|
61
|
+
```bash
|
|
62
|
+
# Examples of versioning
|
|
63
|
+
npm version patch # 1.0.0 -> 1.0.1
|
|
64
|
+
npm version minor # 1.0.0 -> 1.1.0
|
|
65
|
+
npm version major # 1.0.0 -> 2.0.0
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
3. **Build the project:** Ensure you have the latest code built.
|
|
69
|
+
```bash
|
|
70
|
+
npm run build
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
4. **Publish:**
|
|
74
|
+
```bash
|
|
75
|
+
npm publish
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
This project is licensed under the ISC License.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "saju-logic",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "rimraf dist && tsc",
|
|
9
|
+
"test": "vitest"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [],
|
|
12
|
+
"author": "",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/node": "^20.14.9",
|
|
16
|
+
"rimraf": "^5.0.10",
|
|
17
|
+
"typescript": "^5.5.2",
|
|
18
|
+
"vitest": "^1.6.0"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
]
|
|
23
|
+
}
|