Skip to content

Commit b2f5dcd

Browse files
authored
Merge pull request #45 from polywrap/extract-config-bundles
feat: config bundle packages
2 parents 2a533d0 + 1f1f714 commit b2f5dcd

87 files changed

Lines changed: 1412 additions & 1016 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

integration-tests/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "integration-tests-root",
3+
"license": "MIT",
4+
"private": true,
5+
"workspaces": {
6+
"packages": [
7+
"./**",
8+
"../packages/**"
9+
]
10+
},
11+
"scripts": {
12+
"build": "yarn build:react",
13+
"build:react": "cd react-app && yarn build"
14+
}
15+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "integration-test-react-app",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@polywrap/client-js": "~0.10.1",
7+
"@polywrap/sys-config-bundle-js": "~0.10.1",
8+
"@types/react": "^18.2.13",
9+
"@types/react-dom": "^18.2.6",
10+
"react": "^18.2.0",
11+
"react-dom": "^18.2.0",
12+
"react-scripts": "5.0.1",
13+
"typescript": "4.9.5"
14+
},
15+
"scripts": {
16+
"start": "react-scripts start",
17+
"build": "react-scripts build"
18+
},
19+
"browserslist": {
20+
"production": [
21+
">0.2%",
22+
"not dead",
23+
"not op_mini all"
24+
],
25+
"development": [
26+
"last 1 chrome version",
27+
"last 1 firefox version",
28+
"last 1 safari version"
29+
]
30+
}
31+
}
3.78 KB
Binary file not shown.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<title>React App</title>
13+
</head>
14+
<body>
15+
<noscript>You need to enable JavaScript to run this app.</noscript>
16+
<div id="root"></div>
17+
<!--
18+
This HTML file is a template.
19+
If you open it directly in the browser, you will see an empty page.
20+
21+
You can add webfonts, meta tags, or analytics to this file.
22+
The build step will place the bundled scripts into the <body> tag.
23+
24+
To begin the development, run `npm start` or `yarn start`.
25+
To create a production bundle, use `npm run build` or `yarn build`.
26+
-->
27+
</body>
28+
</html>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react';
2+
import { PolywrapClient } from "@polywrap/client-js";
3+
import { bundle } from "@polywrap/sys-config-bundle-js";
4+
5+
function App() {
6+
const client = new PolywrapClient();
7+
8+
// Make extra sure the sys bundle works in the browser
9+
console.log(bundle);
10+
11+
return (
12+
<div className="App">
13+
<header className="App-header">
14+
<div>Some text...</div>
15+
</header>
16+
</div>
17+
);
18+
}
19+
20+
export default App;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom/client';
3+
import App from './App';
4+
5+
const root = ReactDOM.createRoot(
6+
document.getElementById('root') as HTMLElement
7+
);
8+
root.render(
9+
<React.StrictMode>
10+
<App />
11+
</React.StrictMode>
12+
);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="react-scripts" />
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
9+
"allowJs": true,
10+
"skipLibCheck": true,
11+
"esModuleInterop": true,
12+
"allowSyntheticDefaultImports": true,
13+
"strict": true,
14+
"forceConsistentCasingInFileNames": true,
15+
"noFallthroughCasesInSwitch": true,
16+
"module": "esnext",
17+
"moduleResolution": "node",
18+
"resolveJsonModule": true,
19+
"isolatedModules": true,
20+
"noEmit": true,
21+
"jsx": "react-jsx"
22+
},
23+
"include": [
24+
"src"
25+
]
26+
}

jest.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module.exports = {
33
preset: 'ts-jest',
44
testEnvironment: 'node',
55
testMatch: ["**/?(*.)+(spec|test).[jt]s?(x)"],
6-
modulePathIgnorePatterns: ['./src/__tests__/apis'],
76
transform: {
87
"/.*\.ts$/": ["ts-jest"]
98
}

0 commit comments

Comments
 (0)