pankosmia-rcl 0.1.13 → 0.1.15

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,15 @@
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ }
10
+ ],
11
+ "start_url": ".",
12
+ "display": "standalone",
13
+ "theme_color": "#000000",
14
+ "background_color": "#ffffff"
15
+ }
package/build.js ADDED
@@ -0,0 +1,36 @@
1
+ // build.js
2
+ import path from "path";
3
+ import { fileURLToPath } from "url";
4
+ import { build as viteBuild } from "vite";
5
+
6
+ // Get __dirname equivalent in ES modules
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = path.dirname(__filename);
9
+
10
+ // 1️⃣ Build the app (HTML + assets)
11
+ await viteBuild({
12
+ configFile: path.resolve(__dirname, "vite.config.js"),
13
+ build: {
14
+ outDir: "build",
15
+ emptyOutDir: true
16
+ }
17
+ });
18
+
19
+ // 2️⃣ Build the library
20
+ await viteBuild({
21
+ configFile: path.resolve(__dirname, "vite.config.js"),
22
+ build: {
23
+ lib: {
24
+ entry: path.resolve(__dirname, "./src/rcl/index.js"),
25
+ name: "pankosmia-rcl",
26
+ fileName: (format) => `pankosmia-rcl.${format}.js`, // Fixed template literal
27
+ },
28
+ outDir: "dist",
29
+ emptyOutDir: false, // keep assets
30
+ rollupOptions: {
31
+ external: ["react", "react-dom"]
32
+ }
33
+ }
34
+ });
35
+
36
+ console.log("✅ Build finished!");
package/package.json CHANGED
@@ -1,22 +1,20 @@
1
1
  {
2
2
  "name": "pankosmia-rcl",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "private": false,
5
5
  "homepage": "/clients/core-client-rcl",
6
- "main": "build/pankosmia-rcl.umd.js",
7
- "module": "build/pankosmia-rcl.es.js",
6
+ "main": "dist/pankosmia-rcl.umd.js",
7
+ "module": "dist/pankosmia-rcl.es.js",
8
+ "type": "module",
8
9
  "dependencies": {
9
- "eslint-config-react-app": "^7.0.1",
10
10
  "notistack": "^3.0.1",
11
11
  "pithekos-lib": "^0.11.4",
12
12
  "react": "^17.0.0 || ^18.0.0",
13
13
  "react-dom": "^17.0.0 || ^18.0.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
17
- "@vitejs/plugin-react": "^4.3.4",
18
- "react-scripts": "5.0.1",
19
- "vite": "^6.0.7"
16
+ "vite": "^6.0.7",
17
+ "@vitejs/plugin-react": "^4.3.4"
20
18
  },
21
19
  "peerDependencies": {
22
20
  "@emotion/react": "^11.13.3",
@@ -27,8 +25,7 @@
27
25
  "react-dom": "^17.0.0 || ^18.0.0"
28
26
  },
29
27
  "scripts": {
30
- "start": "react-scripts start",
31
- "build": "react-scripts build",
28
+ "build": "node build.js",
32
29
  "build:vite": "vite build",
33
30
  "build:package": "vite build",
34
31
  "dev": "vite",
package/vite.config.js CHANGED
@@ -1,12 +1,12 @@
1
- import path from 'path';
2
1
  import { defineConfig } from 'vite'
3
2
  import react from '@vitejs/plugin-react'
3
+ import path from 'path'
4
4
 
5
5
  // https://vitejs.dev/config/
6
6
  export default defineConfig({
7
7
  plugins: [react()],
8
8
  server: {
9
- port: 5174, // Unique port for new_project
9
+ port: 5174,
10
10
  strictPort: true,
11
11
  host: true,
12
12
  cors: true,
@@ -16,17 +16,9 @@ export default defineConfig({
16
16
  outDir: 'build',
17
17
  emptyOutDir: true,
18
18
  rollupOptions: {
19
- external: ["react", "react-dom"],
20
- /* output: {
21
- name: "pankosmia-rcl",
22
- globals: { 'react': 'React', 'react-dom': 'ReactDom' }
23
- }*/
19
+ // You can remove `external` for an app build
20
+ // external: ["react", "react-dom"],
24
21
  },
25
- lib: {
26
- entry: path.resolve(__dirname, './src/rcl/index.js'),
27
- name: 'pankosmia-rcl',
28
- fileName: (format) => `pankosmia-rcl.${format}.js`
29
- }
30
22
  },
31
23
  base: '/clients/core-client-rcl/'
32
24
  })