fansunited-frontend-components 0.0.1-RC2 → 0.0.1-RC3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../../vite.config.ts"],"names":[],"mappings":";AAKA,wBAyCG"}
1
+ {"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../../vite.config.ts"],"names":[],"mappings":";AAKA,wBAoCG"}
@@ -1 +1 @@
1
- {"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../vite.config.ts"],"names":[],"mappings":";AAKA,wBAyCG"}
1
+ {"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../vite.config.ts"],"names":[],"mappings":";AAKA,wBAoCG"}
@@ -11,13 +11,8 @@ export default defineConfig({
11
11
  ],
12
12
  resolve: {
13
13
  alias: {
14
- // "@": resolve(__dirname, "./src"),
15
14
  "@fansunited/common": resolve(__dirname, "../common/src"),
16
15
  "@fansunited/classic-quiz-play": resolve(__dirname, "../classic-quiz-play/src"),
17
- // "@fansunited/classic-quiz-awareness": resolve(
18
- // __dirname,
19
- // "../classic-quiz-awareness/src"
20
- // ),
21
16
  },
22
17
  },
23
18
  build: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-frontend-components",
3
- "version": "0.0.1-RC2",
3
+ "version": "0.0.1-RC3",
4
4
  "description": "Various user centric components for Fans United features",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/components.js",
@@ -11,13 +11,11 @@
11
11
  "require": "./dist/esm/components.js"
12
12
  }
13
13
  },
14
- "files": [
15
- "dist"
16
- ],
17
14
  "scripts": {
18
- "build": "npm run build:esm",
15
+ "build": "yarn build:esm",
19
16
  "build:esm": "tsc -b && vite build --config vite.config.ts",
20
- "build:umd": "tsc -b && vite build --config vite.config.umd.ts"
17
+ "build:umd": "tsc -b && vite build --config vite.config.umd.ts",
18
+ "publish:npm": "yarn publish --non-interactive"
21
19
  },
22
20
  "devDependencies": {
23
21
  "vite": "^5.0.0",
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ import ClassicQuizPlay from "@fansunited/classic-quiz-play";
2
+
3
+ export { ClassicQuizPlay };
@@ -0,0 +1,5 @@
1
+ import ClassicQuizPlay from "@fansunited/classic-quiz-play";
2
+
3
+ if (typeof window !== "undefined") {
4
+ (window as any).ClassicQuizPlay = ClassicQuizPlay;
5
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "declaration": true,
6
+ "declarationMap": true
7
+ },
8
+ "include": ["src/**/*", "vite.config.ts", "vite.config.umd.ts"],
9
+ "exclude": ["dist", "node_modules"]
10
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,42 @@
1
+ import { defineConfig } from "vite";
2
+ import { resolve } from "path";
3
+ import react from "@vitejs/plugin-react";
4
+ import dts from "vite-plugin-dts";
5
+
6
+ export default defineConfig({
7
+ plugins: [
8
+ react(),
9
+ dts({
10
+ insertTypesEntry: true,
11
+ }),
12
+ ],
13
+ resolve: {
14
+ alias: {
15
+ "@fansunited/common": resolve(__dirname, "../common/src"),
16
+ "@fansunited/classic-quiz-play": resolve(
17
+ __dirname,
18
+ "../classic-quiz-play/src"
19
+ ),
20
+ },
21
+ },
22
+ build: {
23
+ outDir: "dist/esm",
24
+ lib: {
25
+ entry: resolve(__dirname, "src/index.ts"),
26
+ name: "FansUnitedFrontendComponents",
27
+ formats: ["es"],
28
+ fileName(_, __) {
29
+ return `components.js`;
30
+ },
31
+ },
32
+ rollupOptions: {
33
+ external: ["react", "react-dom"],
34
+ output: {
35
+ globals: {
36
+ react: "React",
37
+ "react-dom": "ReactDOM",
38
+ },
39
+ },
40
+ },
41
+ },
42
+ });
@@ -0,0 +1,39 @@
1
+ import { defineConfig } from "vite";
2
+ import { resolve } from "path";
3
+ import react from "@vitejs/plugin-react";
4
+ import dts from "vite-plugin-dts";
5
+
6
+ export default defineConfig({
7
+ plugins: [
8
+ react(),
9
+ dts({
10
+ insertTypesEntry: true,
11
+ }),
12
+ ],
13
+ resolve: {
14
+ alias: {
15
+ // "@": resolve(__dirname, "./src"),
16
+ "@fansunited/common": resolve(__dirname, "../common/src"),
17
+ "@fansunited/classic-quiz-play": resolve(
18
+ __dirname,
19
+ "../classic-quiz-play/src"
20
+ ),
21
+ },
22
+ },
23
+ build: {
24
+ outDir: "dist/umd",
25
+ lib: {
26
+ entry: resolve(__dirname, "src/indexUmd.ts"),
27
+ fileName(_, __) {
28
+ return `components.js`;
29
+ },
30
+ name: "FansUnitedFrontendComponents",
31
+ formats: ["umd"],
32
+ },
33
+ rollupOptions: {
34
+ output: {
35
+ globals: {},
36
+ },
37
+ },
38
+ },
39
+ });
@@ -0,0 +1,30 @@
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
+ import dts from "vite-plugin-dts";
4
+ import { resolve } from "path";
5
+
6
+ export default defineConfig({
7
+ plugins: [
8
+ react(),
9
+ dts({
10
+ insertTypesEntry: true,
11
+ }),
12
+ ],
13
+ build: {
14
+ lib: {
15
+ entry: resolve(__dirname, "src/index.ts"),
16
+ name: "FansUnitedFrontendComponents",
17
+ formats: ["es", "umd"],
18
+ fileName: (format) => `index.${format === "es" ? "js" : "umd.js"}`,
19
+ },
20
+ rollupOptions: {
21
+ external: ["react", "react-dom"],
22
+ output: {
23
+ globals: {
24
+ react: "React",
25
+ "react-dom": "ReactDOM",
26
+ },
27
+ },
28
+ },
29
+ },
30
+ });