-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
133 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 |
---|---|---|
@@ -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-core</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<script type="module"> | ||
import { foo } from './src/index.js'; | ||
|
||
console.log(foo()); | ||
</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-core", | ||
"version": "1.8.6", | ||
"description": "View forms - 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-core" | ||
}, | ||
"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:bpmn-io/mocha", | ||
"plugin:prettier/recommended" | ||
], | ||
"globals": { | ||
"vite": 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,22 @@ | ||
// vite.config.js | ||
import { resolve } from 'path'; | ||
import { defineConfig } from 'vite'; | ||
|
||
export default defineConfig({ | ||
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'], | ||
}, | ||
}); |