Skip to content
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

Feature: share plugin #61

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
fe896a1
share plugin
Amoki Mar 1, 2021
8e99ddd
Not use localhost and update name plugin for deploy
Jul 8, 2021
7c27f11
feat(share-plugin): refactor plugin components/styles
NicolasRichel Aug 30, 2021
6ee1d04
chore: change 'serve' command to 'dev' to be compliant with our conve…
NicolasRichel Aug 30, 2021
72904bb
fix(plugin-template): change 'windowed' by 'panel' in template commen…
NicolasRichel Aug 30, 2021
5b89263
chore: update viewer versio to 1.7.0-rc.34
NicolasRichel Aug 30, 2021
f8aa76b
feat(share-plugin): dipslay plugin in 'free' mode
NicolasRichel Aug 30, 2021
4886a7f
chore: restore 'serve' npm script and set 'dev' as an alias for it
NicolasRichel Aug 30, 2021
cba229b
fix(share-plugin): set a default expiration date in 2099 in the backe…
NicolasRichel Aug 31, 2021
7e088a5
feat(share-plugin): handle blank expiration date
NicolasRichel Sep 1, 2021
66821a7
chore: use iframeShare dist bundle for local development
NicolasRichel Sep 1, 2021
4df2ddd
chore: split main install and plugins install in 2 separate steps + u…
NicolasRichel Sep 1, 2021
d1e36b0
feat(share-plugin): add share name input
NicolasRichel Sep 1, 2021
9746fb0
feat(share-plugin): refactor compnents and UI
NicolasRichel Sep 15, 2021
0143d73
feat(share-plugin): create custom share-link-cell for shares table
NicolasRichel Sep 15, 2021
1f2127d
feat(share-plugin): refactor + create token duration input
NicolasRichel Sep 17, 2021
3ed6c18
feat(share-plugin): reafactor components file structure + create Shar…
NicolasRichel Sep 28, 2021
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
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
BIMData viewer SDK
==================
# BIMData viewer SDK

This repo is a pre-configured environment to develop BIMData Viewer plugins.
You can develop, test, build, package and share your plugin easily.

## Setup

First, you must create a BIMData Application (see https://developers.bimdata.io/tutorials/dev_create_an_application.html)
The SDK needs at least `cloud:read` and `ifc:read` scopes.
The default BCF Plugin needs `bcf:read` and `bcf:write` scopes, plus you can add any scope you need for your plugin.

The redirect URI is by default http://localhost:8080/oidc-callback

Then you can copy the `.env.example` file and add your `client_id`:

```
npm install
cp .env.example .env
Expand All @@ -20,11 +21,13 @@ cp .env.example .env
Edit `.env` file with your data (your `client_id`)

### Compiles and hot-reloads for development

```
npm run serve
npm run dev
```

### Usage

When going on http://localhost:8080, a simple interface will parse your projects and models and let you open the one you want.
You can directly open one by opening an URL using specific Ids: http://localhost:8080/viewer?cloudId=391&projectId=634&ifcId=1491

Expand Down Expand Up @@ -72,15 +75,18 @@ To publish it, update the `package.json` file with the proper information and ju

The code is minified to protect your code as much as possible.


### More info about how it works
The SDK itself uses *Webpack* to build. The packaging uses *Rollup*. If you need a complex JS flow, it may lead to some issues.

The SDK itself uses _Webpack_ to build. The packaging uses _Rollup_. If you need a complex JS flow, it may lead to some issues.
To see these issues before deploying, load the packaged version in the SDK:

```bash
cd src/plugins/{your_plugin}
npm run watch
```

And load the dist version of the plugin:

```js
import SplitPlugin from "@/plugins/split/dist/split.plugin.js";

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"dev": "vue-cli-service serve",
NicolasRichel marked this conversation as resolved.
Show resolved Hide resolved
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"init-plugin": "node tools/init-plugin.js",
Expand Down
22 changes: 11 additions & 11 deletions src/plugins/iframeShare/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/plugins/iframeShare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
"iframeShare"
],
"dependencies": {
"@bimdata/design-system": "^0.2.3",
"@bimdata/design-system": "^0.3.16",
"vuejs-datepicker": "^1.6.2"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-url": "^6.0.0",
"rollup": "^2.35.1",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-url": "^6.1.0",
"rollup": "^2.56.3",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-scss": "^2.6.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-vue": "^5.1.7"
"rollup-plugin-vue": "^5.1.9"
}
}
}
Loading