-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: boostrap
viewer-render
project
Related to #1166
- Loading branch information
Showing
12 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ node_modules | |
test-results/ | ||
playwright-report/ | ||
playwright/.cache/ | ||
lerna-debug.log |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { foo } from './src/index.js'; | ||
import { Fragment } from 'preact'; | ||
|
||
const RenderPlayground = () => { | ||
return <Fragment>{foo()}</Fragment>; | ||
}; | ||
|
||
export { RenderPlayground }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<meta name="description" content="@bpmn-io/form-js-viewer-core" /> | ||
<title>@bpmn-io/form-js-viewer-render</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<script type="module"> | ||
import { render } from "preact"; | ||
import { RenderPlayground } from "./RenderPlayground"; | ||
render(RenderPlayground(), document.body); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"allowImportingTsExtensions": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"strict": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"declaration": true, | ||
"useUnknownInCatchVariables": true, | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
} | ||
}, | ||
"include": ["src"], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "@bpmn-io/form-js-viewer-render", | ||
"version": "1.8.6", | ||
"description": "Render form state - powered by bpmn.io", | ||
"type": "module", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"types": "dist/types/index.d.ts", | ||
"scripts": { | ||
"all": "run-s test build", | ||
"build": "run-p bundle generate-types", | ||
"bundle": "vite build", | ||
"dev": "vite", | ||
"generate-types": "tsc --allowJs --skipLibCheck --declaration --emitDeclarationOnly --outDir dist/types src/index.js && copyfiles --flat src/*.d.ts dist/types", | ||
"test": "vitest", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
"license": "SEE LICENSE IN LICENSE", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/bpmn-io/form-js.git", | ||
"directory": "packages/form-js-viewer-render" | ||
}, | ||
"author": { | ||
"name": "bpmn.io contributors", | ||
"url": "https://github.com/bpmn-io" | ||
}, | ||
"sideEffects": false, | ||
"files": [ | ||
"dist" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function foo() { | ||
return 'foo'; | ||
} | ||
|
||
export { foo }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "../jsconfig.json", | ||
"compilerOptions": { | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": [ | ||
"plugin:vitest-globals/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"env": { | ||
"vitest-globals/env": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { foo } from '@/index.js'; | ||
|
||
it('should pass a test', () => { | ||
expect(foo()).toBe('foo'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "../jsconfig.json", | ||
"compilerOptions": { | ||
"lib": ["ES2020"], | ||
"types": ["@types/node", "vitest/globals"], | ||
"esModuleInterop": true, | ||
"declaration": false, | ||
"resolveJsonModule": true | ||
}, | ||
"include": ["**/*.spec.js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { resolve } from 'path'; | ||
import { defineConfig } from 'vite'; | ||
import preact from '@preact/preset-vite'; | ||
|
||
export default defineConfig({ | ||
plugins: [preact()], | ||
build: { | ||
lib: { | ||
entry: resolve(__dirname, 'src/index.js'), | ||
fileName: 'index', | ||
formats: ['es', 'cjs'], | ||
}, | ||
}, | ||
resolve: { | ||
alias: { | ||
'@': resolve(__dirname, 'src'), | ||
}, | ||
}, | ||
test: { | ||
globals: true, | ||
files: ['test/**/*.spec.js'], | ||
}, | ||
}); |