@allior/wmake-streamelements-events 2.0.1 → 2.0.2
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/package.json +7 -2
- package/tsconfig.app.json +31 -0
- package/tsconfig.json +8 -0
- package/tsconfig.node.json +25 -0
- package/vite.config.ts +36 -0
- package/vite.iife.config.ts +52 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allior/wmake-streamelements-events",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Twitch/StreamElements subscription event normalizer for widgets (alerts).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/root/index.d.ts",
|
|
@@ -19,7 +19,12 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
21
21
|
"src",
|
|
22
|
-
"README.md"
|
|
22
|
+
"README.md",
|
|
23
|
+
"vite.config.ts",
|
|
24
|
+
"vite.iife.config.ts",
|
|
25
|
+
"tsconfig.app.json",
|
|
26
|
+
"tsconfig.json",
|
|
27
|
+
"tsconfig.node.json"
|
|
23
28
|
],
|
|
24
29
|
"scripts": {
|
|
25
30
|
"pub": "npm publish --access public",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable", "dom"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"verbatimModuleSyntax": true,
|
|
13
|
+
"moduleDetection": "force",
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"jsx": "react-jsx",
|
|
16
|
+
/* Linting */
|
|
17
|
+
"strict": true,
|
|
18
|
+
"noUnusedLocals": true,
|
|
19
|
+
"noUnusedParameters": true,
|
|
20
|
+
"erasableSyntaxOnly": false,
|
|
21
|
+
"noFallthroughCasesInSwitch": true,
|
|
22
|
+
"noUncheckedSideEffectImports": true,
|
|
23
|
+
"baseUrl": ".",
|
|
24
|
+
"paths": {
|
|
25
|
+
"#/*": ["./src/common/*"],
|
|
26
|
+
"@/*": ["./src/*"]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"include": ["src"],
|
|
30
|
+
"exclude": ["node_modules", "dist"]
|
|
31
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "ES2023",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"verbatimModuleSyntax": true,
|
|
13
|
+
"moduleDetection": "force",
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
|
|
16
|
+
/* Linting */
|
|
17
|
+
"strict": true,
|
|
18
|
+
"noUnusedLocals": true,
|
|
19
|
+
"noUnusedParameters": true,
|
|
20
|
+
"erasableSyntaxOnly": false,
|
|
21
|
+
"noFallthroughCasesInSwitch": true,
|
|
22
|
+
"noUncheckedSideEffectImports": true
|
|
23
|
+
},
|
|
24
|
+
"include": ["vite.config.ts"]
|
|
25
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { dirname, resolve } from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import react from "@vitejs/plugin-react";
|
|
4
|
+
import { defineConfig } from "vite";
|
|
5
|
+
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
plugins: [react()],
|
|
10
|
+
resolve: {
|
|
11
|
+
alias: {
|
|
12
|
+
"@": resolve(__dirname, "src"),
|
|
13
|
+
"@/root": resolve(__dirname, "src/root/index.ts"),
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
build: {
|
|
17
|
+
copyPublicDir: false,
|
|
18
|
+
lib: {
|
|
19
|
+
entry: {
|
|
20
|
+
"root/index": resolve(__dirname, "src/root/index.ts"),
|
|
21
|
+
"react/index": resolve(__dirname, "src/react/index.ts"),
|
|
22
|
+
},
|
|
23
|
+
formats: ["es"],
|
|
24
|
+
},
|
|
25
|
+
sourcemap: true,
|
|
26
|
+
outDir: "dist",
|
|
27
|
+
rollupOptions: {
|
|
28
|
+
external: ["react", "react/jsx-runtime"],
|
|
29
|
+
output: {
|
|
30
|
+
format: "es",
|
|
31
|
+
exports: "named",
|
|
32
|
+
entryFileNames: "[name].js",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import { resolve, dirname } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const entry = process.env.VITE_IIFE_ENTRY ?? "root";
|
|
8
|
+
const entryMap: Record<string, { path: string; name: string; out: string }> = {
|
|
9
|
+
root: {
|
|
10
|
+
path: "src/root/index.ts",
|
|
11
|
+
name: "WmakeStreamelementsEvents",
|
|
12
|
+
out: "root/index.iife.js",
|
|
13
|
+
},
|
|
14
|
+
react: {
|
|
15
|
+
path: "src/react/index.ts",
|
|
16
|
+
name: "WmakeStreamelementsEventsReact",
|
|
17
|
+
out: "react/index.iife.js",
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
const {
|
|
21
|
+
path: entryPath,
|
|
22
|
+
name: globalName,
|
|
23
|
+
out: entryFileNames,
|
|
24
|
+
} = entryMap[entry] ?? entryMap.root;
|
|
25
|
+
|
|
26
|
+
export default defineConfig({
|
|
27
|
+
plugins: [react()],
|
|
28
|
+
resolve: {
|
|
29
|
+
alias: { "@": resolve(__dirname, "src") },
|
|
30
|
+
},
|
|
31
|
+
build: {
|
|
32
|
+
emptyOutDir: false,
|
|
33
|
+
lib: {
|
|
34
|
+
entry: resolve(__dirname, entryPath),
|
|
35
|
+
name: globalName,
|
|
36
|
+
formats: ["iife"],
|
|
37
|
+
},
|
|
38
|
+
sourcemap: true,
|
|
39
|
+
outDir: "dist",
|
|
40
|
+
rollupOptions: {
|
|
41
|
+
external: ["react", "react/jsx-runtime"],
|
|
42
|
+
output: {
|
|
43
|
+
entryFileNames,
|
|
44
|
+
extend: true,
|
|
45
|
+
globals: {
|
|
46
|
+
react: "React",
|
|
47
|
+
"react/jsx-runtime": "ReactJSXRuntime",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
});
|