create-pb-tririga-react-app 1.0.5 → 1.0.6

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 CHANGED
@@ -23,7 +23,4 @@ npx create-pb-tririga-react-app my-tririga-app
23
23
  Once created:
24
24
 
25
25
  1. `cd my-tririga-app`
26
- 2. `npm install -g pnpm`
27
- 2. `pnpm install`
28
- 3. Update configuration files (see `README.md`)
29
- 4. `pnpm run build:deploy`
26
+ 2. Follow setup instructions in the project `README.md`
package/index.js CHANGED
@@ -49,6 +49,4 @@ pkgJson.name = projectName;
49
49
  fs.writeFileSync(pkgJsonPath, JSON.stringify(pkgJson, null, 2));
50
50
 
51
51
  console.log(`Success! Created ${projectName}.`);
52
- console.log(`cd ${projectName}`);
53
- console.log(`pnpm install`);
54
- console.log(`pnpm run dev`);
52
+ console.log(`cd ${projectName} and see the Readme.md inside the project folder for further instructions.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pb-tririga-react-app",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Scaffold a TRIRIGA React app with Vite and TypeScript",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -26,15 +26,27 @@ To deploy to a TRIRIGA environment:
26
26
 
27
27
  1. **Install Depoyment Tool** (If not already installed globally)
28
28
  ```
29
- pnpm install -g @tririga/tri-deploy
29
+ npm install -g @tririga/tri-deploy
30
30
  ```
31
31
  *Note: If you prefer not to install globally, you can add `@tririga/tri-deploy` to your devDependencies.*
32
32
 
33
33
  2. **Configure Credentials**
34
+ Copy `.env.example` to `.env` and update the values for your deployment settings.
35
+ ```
36
+ cp .env.example .env
37
+ ```
34
38
  Ensure your `.env` file has the correct `TRI_URL`, `TRI_USER`, and `TRI_PASSWORD`.
35
39
 
36
40
  3. **Configure tririgaService.js file**
37
- Update the TriAppConfig values (modelAndView, appExposedName) to match your application's configuration in TRIRIGA.
41
+ Update the TriAppConfig values `modelAndView` and `appExposedName` to match your app configuration in TRIRIGA.
42
+ Example:
43
+ `modelAndView: "myReactApp",`
44
+ `appExposedName: "myReactApp",`
45
+
46
+ 3. **Configure vite.config.ts file**
47
+ Update the base value to match your application's exposed name in TRIRIGA.
48
+ Example:
49
+ base: '/app/myReactApp/',
38
50
 
39
51
  4. **Run Deployment**
40
52
  The view name will be taken from the `name` field in `package.json`.
@@ -3,7 +3,7 @@ import react from '@vitejs/plugin-react'
3
3
 
4
4
  // https://vite.dev/config/
5
5
  export default defineConfig({
6
- // Use relative base path for portability across environments
7
- base: './',
6
+ // Base path must match the TRIRIGA view name /app/<appName>/
7
+ base: '/app/appName/',
8
8
  plugins: [react()],
9
9
  })