Skip to content

Workspace platform starter React Wrapper #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: frameworks/v21.0.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions frameworks/react/workspace-platform-starter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Runtime files copied to public folder
public/openfin
public/common
66 changes: 66 additions & 0 deletions frameworks/react/workspace-platform-starter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# React Wrapper for Workspace Platform Starter

This project provides a React wrapper for the [workspace-platform-starter](https://github.com/built-on-openfin/workspace-starter/tree/main/how-to/workspace-platform-starter) for teams
who prefer to use the build tooling available in the React ecosystem such as hot reloading.

The workspace platform starter source files are for demonstration purposes and to help get started building your own project. Once the source is added to your project, consider it your
source code to manage for your production build. Once initial setup is complete, you should review the features you need and turn off many of the modules in the manifest.fin.json, and
remove many of the app endpoints listed in "appProvider" / "endpointIds".

## Prerequsites

Please follow the [getting started](https://resources.here.io/docs/core/develop/) guide to install the OpenFin RVM.

## Copy workspace-platform-starter source files

Manually add the original workspace-platform-starter source files into this project:

Clone the main workspace-starter repo:

```
git clone https://github.com/built-on-openfin/workspace-starter.git --depth=1
```

Manually copy the following folders from the **how-to/workspace-platform-starter** directory:

```
client/src/framework
client/src/modules
public/common
```

And paste them into the **/openfin** folder in this project so that you have:

```
/openfin/common
/openfin/framework
/openfin/modules
```

### Develop

```
npm install
npm start
```

Launch [fin://localhost:8080/manifest.fin.json](fin://localhost:8080/manifest.fin.json)

### Build for production

```
npm install
npm run build
```

The files to deploy will be in the `dist` folder

### Preview production build

```
npm run preview
```
Launch [fin://localhost:8080/manifest.fin.json](fin://localhost:8080/manifest.fin.json)



25 changes: 25 additions & 0 deletions frameworks/react/workspace-platform-starter/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";

export default tseslint.config(
{ ignores: ["dist", "openfin/**", "public"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
}
},
);
13 changes: 13 additions & 0 deletions frameworks/react/workspace-platform-starter/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenFin Workspace Platform Starter</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
framework/
modules/
common/
Loading