Skip to content

Commit ed41ace

Browse files
committed
update build
1 parent 44386df commit ed41ace

10 files changed

Lines changed: 713 additions & 23 deletions

File tree

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# kaiware-lib

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
{
22
"name": "@nothing-special/kaiware-lib",
3-
"private": true,
4-
"version": "0.1.0",
3+
"version": "0.2.0",
54
"type": "module",
5+
"author": {
6+
"name": "Garrett Downs",
7+
"url": "https://nothingspecial.io"
8+
},
9+
"homepage": "https://github.com/nothingspecialdev/kaiware-lib",
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/nothingspecialdev/kaiware-lib"
13+
},
614
"scripts": {
715
"dev": "vite",
816
"build": "rimraf build && rollup -c --bundleConfigAsCjs",

rollup.config.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ import path from 'node:path';
77
/** @type {import('rollup').RollupOptions[]} */
88
export default [
99
{
10-
input: ['src/index.ts'],
10+
input: [
11+
'src/index.ts',
12+
'src/enums/index.ts',
13+
'src/lib/index.ts',
14+
'src/types/index.ts',
15+
'src/utils/index.ts'
16+
],
1117
output: {
1218
dir: 'build/esm',
1319
format: 'esm',
@@ -51,7 +57,13 @@ export default [
5157
]
5258
},
5359
{
54-
input: ['src/index.ts'],
60+
input: [
61+
'src/index.ts',
62+
'src/enums/index.ts',
63+
'src/lib/index.ts',
64+
'src/types/index.ts',
65+
'src/utils/index.ts'
66+
],
5567
output: {
5668
dir: 'build/cjs',
5769
format: 'cjs',

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { Kaiware } from '$/lib/kaiware';
1+
import { Kaiware } from './lib/kaiware';
22

33
export { Kaiware };

src/lib/connection.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
import { LogLevel } from '$/enums';
2-
import { MessageType } from '$/enums/MessageType';
3-
import { Log } from '$/types';
4-
import { Config } from '$/types/Config';
5-
import { Message } from '$/types/Message';
6-
import { isJson } from '$/utils/isJson';
71
import { z } from 'zod';
2+
import { LogLevel, MessageType } from '../enums';
3+
import { Config, Log, Message } from '../types';
4+
import { isJson } from '../utils';
85

96
export class Connection {
107
private socket: WebSocket | null = null;

src/lib/kaiware.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { LogLevel } from '$/enums/LogLevel';
2-
import { MessageType } from '$/enums/MessageType';
3-
import { Connection } from '$/lib/connection';
4-
import { Config } from '$/types/Config';
5-
import { Log } from '$/types/Log';
1+
import { LogLevel, MessageType } from '../enums';
2+
import { Config, Log } from '../types';
3+
import { Connection } from './connection';
64

75
export class Kaiware {
86
private static config: Config | null = null;

src/types/Log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LogLevel } from '$/enums/LogLevel';
1+
import { LogLevel } from '../enums';
22

33
export type Log = {
44
id: number;

src/types/Message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MessageType } from '$/enums/MessageType';
1+
import { MessageType } from '../enums';
22

33
export type Message<TData = undefined> = {
44
type: MessageType;

tsconfig.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"compilerOptions": {
33
"target": "ES6",
44
"module": "ES2015",
5-
"baseUrl": ".",
6-
"paths": {
7-
"$": ["./src"],
8-
"$/*": ["./src/*"]
9-
},
5+
// "baseUrl": ".",
6+
// "paths": {
7+
// "$": ["./src"],
8+
// "$/*": ["./src/*"]
9+
// },
1010
"strict": true,
1111
"strictNullChecks": true,
1212
"noUnusedParameters": true,

0 commit comments

Comments
 (0)