-
Notifications
You must be signed in to change notification settings - Fork 47
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
1 parent
ef07f3a
commit 15a0dd0
Showing
23 changed files
with
151 additions
and
102 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 |
---|---|---|
@@ -1 +1 @@ | ||
[{"/Users/kennethcassel/slip/wasm-run/example/src/App.test.tsx":"1","/Users/kennethcassel/slip/wasm-run/example/src/App.tsx":"2","/Users/kennethcassel/slip/wasm-run/example/src/index.tsx":"3","/Users/kennethcassel/slip/wasm-run/example/src/react-app-env.d.ts":"4","/Users/kennethcassel/slip/wasm-run/example/src/reportWebVitals.ts":"5","/Users/kennethcassel/slip/wasm-run/example/src/setupTests.ts":"6","/Users/kennethcassel/slip/wasm-run/lib/cjs/index.js":"7","/Users/kennethcassel/slip/wasm-run/lib/esm/index.js":"8"},{"size":273,"mtime":1631826131482,"results":"9","hashOfConfig":"10"},{"size":237,"mtime":1631827909755,"results":"11","hashOfConfig":"10"},{"size":500,"mtime":1631826131483,"results":"12","hashOfConfig":"10"},{"size":40,"mtime":1631826136013,"results":"13","hashOfConfig":"10"},{"size":425,"mtime":1631826131483,"results":"14","hashOfConfig":"10"},{"size":241,"mtime":1631826131483,"results":"15","hashOfConfig":"10"},{"size":503,"mtime":1631827732531,"results":"16","hashOfConfig":"17"},{"size":252,"mtime":1631827730165,"results":"18","hashOfConfig":"17"},{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1dkp7er",{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xxoj97",{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/kennethcassel/slip/wasm-run/example/src/App.test.tsx",[],"/Users/kennethcassel/slip/wasm-run/example/src/App.tsx",[],"/Users/kennethcassel/slip/wasm-run/example/src/index.tsx",[],"/Users/kennethcassel/slip/wasm-run/example/src/react-app-env.d.ts",[],"/Users/kennethcassel/slip/wasm-run/example/src/reportWebVitals.ts",[],"/Users/kennethcassel/slip/wasm-run/example/src/setupTests.ts",[],"/Users/kennethcassel/slip/wasm-run/lib/cjs/index.js",[],"/Users/kennethcassel/slip/wasm-run/lib/esm/index.js",[]] | ||
[{"/Users/kennethcassel/slip/wasm-run/example/src/App.test.tsx":"1","/Users/kennethcassel/slip/wasm-run/example/src/App.tsx":"2","/Users/kennethcassel/slip/wasm-run/example/src/index.tsx":"3","/Users/kennethcassel/slip/wasm-run/example/src/react-app-env.d.ts":"4","/Users/kennethcassel/slip/wasm-run/example/src/reportWebVitals.ts":"5","/Users/kennethcassel/slip/wasm-run/example/src/setupTests.ts":"6","/Users/kennethcassel/slip/wasm-run/lib/cjs/index.js":"7","/Users/kennethcassel/slip/wasm-run/lib/esm/index.js":"8","/Users/kennethcassel/slip/wasm-run/src/index.tsx":"9","/Users/kennethcassel/slip/wasm-run/commitlint.config.js":"10","/Users/kennethcassel/slip/wasm-run/.eslintrc.js":"11"},{"size":266,"mtime":1631830539170,"results":"12","hashOfConfig":"13"},{"size":232,"mtime":1631830539170,"results":"14","hashOfConfig":"13"},{"size":493,"mtime":1631830539170,"results":"15","hashOfConfig":"13"},{"size":40,"mtime":1631826136013,"results":"16","hashOfConfig":"13"},{"size":416,"mtime":1631830539171,"results":"17","hashOfConfig":"13"},{"size":240,"mtime":1631830539171,"results":"18","hashOfConfig":"13"},{"size":499,"mtime":1631828279481,"results":"19","hashOfConfig":"20"},{"size":264,"mtime":1631828279481,"results":"21","hashOfConfig":"20"},{"size":207,"mtime":1631830547355,"results":"22","hashOfConfig":"23"},{"size":66,"mtime":1631830539170,"results":"24","hashOfConfig":"23"},{"size":387,"mtime":1631830591252,"results":"25","hashOfConfig":"23"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"o9lio9",{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xxoj97",{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":1,"source":null},"5140dk",{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/kennethcassel/slip/wasm-run/example/src/App.test.tsx",[],"/Users/kennethcassel/slip/wasm-run/example/src/App.tsx",[],"/Users/kennethcassel/slip/wasm-run/example/src/index.tsx",[],"/Users/kennethcassel/slip/wasm-run/example/src/react-app-env.d.ts",[],"/Users/kennethcassel/slip/wasm-run/example/src/reportWebVitals.ts",[],"/Users/kennethcassel/slip/wasm-run/example/src/setupTests.ts",[],"/Users/kennethcassel/slip/wasm-run/lib/cjs/index.js",[],"/Users/kennethcassel/slip/wasm-run/lib/esm/index.js",[],"/Users/kennethcassel/slip/wasm-run/src/index.tsx",["48","49"],"/Users/kennethcassel/slip/wasm-run/commitlint.config.js",[],"/Users/kennethcassel/slip/wasm-run/.eslintrc.js",[],{"ruleId":"50","severity":1,"message":"51","line":3,"column":17,"nodeType":"52","messageId":"53","endLine":13,"endColumn":2,"fix":"54"},{"ruleId":"55","severity":1,"message":"56","line":15,"column":1,"nodeType":"57","endLine":15,"endColumn":23},"react/function-component-definition","Function component is not a function declaration","ArrowFunctionExpression","function-declaration",{"range":"58","text":"59"},"import/no-default-export","Prefer named exports.","ExportDefaultDeclaration",[27,182],"function RunWasm({\n language,\n code,\n}: {\n language: string\n code: string\n}): JSX.Element {\n return <div>\n Run {language} and execute {code}\n </div>\n}"] |
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 @@ | ||
lib/* |
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,15 @@ | ||
module.exports = { | ||
extends: 'galex', | ||
rules: { | ||
'new-cap': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'import/dynamic-import-chunkname': 'off', | ||
'prefer-destructuring': 'off', | ||
'import/order': 'off', | ||
'@typescript-eslint/no-floating-promises': 'off', | ||
'@typescript-eslint/consistent-type-definitions': 'off', | ||
}, | ||
env: { | ||
jest: 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 @@ | ||
_ |
Empty file.
Empty file.
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 @@ | ||
{ | ||
"semi": false, | ||
"arrowParens": "always", | ||
"singleQuote": true, | ||
"proseWrap": "never" | ||
} |
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 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] } |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import App from './App'; | ||
import React from 'react' | ||
import { render, screen } from '@testing-library/react' | ||
import App from './App' | ||
|
||
test('renders learn react link', () => { | ||
render(<App />); | ||
const linkElement = screen.getByText(/learn react/i); | ||
expect(linkElement).toBeInTheDocument(); | ||
}); | ||
render(<App />) | ||
const linkElement = screen.getByText(/learn react/i) | ||
expect(linkElement).toBeInTheDocument() | ||
}) |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import React from "react"; | ||
import RunWasm from "run-wasm"; | ||
import "./App.css"; | ||
import React from 'react' | ||
import RunWasm from 'run-wasm' | ||
import './App.css' | ||
|
||
function App() { | ||
return ( | ||
<div className='App'> | ||
<RunWasm language='Python' code="print('hello world')" /> | ||
<div className="App"> | ||
<RunWasm language="Python" code="print('hello world')" /> | ||
</div> | ||
); | ||
) | ||
} | ||
|
||
export default App; | ||
export default App |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import './index.css'; | ||
import App from './App'; | ||
import reportWebVitals from './reportWebVitals'; | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import './index.css' | ||
import App from './App' | ||
import reportWebVitals from './reportWebVitals' | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
); | ||
) | ||
|
||
// If you want to start measuring performance in your app, pass a function | ||
// to log results (for example: reportWebVitals(console.log)) | ||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals | ||
reportWebVitals(); | ||
reportWebVitals() |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { ReportHandler } from 'web-vitals'; | ||
import { ReportHandler } from 'web-vitals' | ||
|
||
const reportWebVitals = (onPerfEntry?: ReportHandler) => { | ||
if (onPerfEntry && onPerfEntry instanceof Function) { | ||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { | ||
getCLS(onPerfEntry); | ||
getFID(onPerfEntry); | ||
getFCP(onPerfEntry); | ||
getLCP(onPerfEntry); | ||
getTTFB(onPerfEntry); | ||
}); | ||
getCLS(onPerfEntry) | ||
getFID(onPerfEntry) | ||
getFCP(onPerfEntry) | ||
getLCP(onPerfEntry) | ||
getTTFB(onPerfEntry) | ||
}) | ||
} | ||
}; | ||
} | ||
|
||
export default reportWebVitals; | ||
export default reportWebVitals |
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
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
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
/// <reference types="react" /> | ||
declare const RunWasm: ({ language, code, }: { | ||
language: string; | ||
code: string; | ||
}) => JSX.Element; | ||
export default RunWasm; | ||
declare const RunWasm: ({ | ||
language, | ||
code, | ||
}: { | ||
language: string | ||
code: string | ||
}) => JSX.Element | ||
export default RunWasm |
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 |
---|---|---|
@@ -1,15 +1,21 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var react_1 = __importDefault(require("react")); | ||
'use strict' | ||
var __importDefault = | ||
(this && this.__importDefault) || | ||
function (mod) { | ||
return mod && mod.__esModule ? mod : { default: mod } | ||
} | ||
Object.defineProperty(exports, '__esModule', { value: true }) | ||
var react_1 = __importDefault(require('react')) | ||
var RunWasm = function (_a) { | ||
var language = _a.language, code = _a.code; | ||
return (react_1.default.createElement("div", null, | ||
"Run ", | ||
language, | ||
" and execute ", | ||
code)); | ||
}; | ||
exports.default = RunWasm; | ||
var language = _a.language, | ||
code = _a.code | ||
return react_1.default.createElement( | ||
'div', | ||
null, | ||
'Run ', | ||
language, | ||
' and execute ', | ||
code | ||
) | ||
} | ||
exports.default = RunWasm |
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
/// <reference types="react" /> | ||
declare const RunWasm: ({ language, code, }: { | ||
language: string; | ||
code: string; | ||
}) => JSX.Element; | ||
export default RunWasm; | ||
declare const RunWasm: ({ | ||
language, | ||
code, | ||
}: { | ||
language: string | ||
code: string | ||
}) => JSX.Element | ||
export default RunWasm |
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import React from "react"; | ||
import React from 'react' | ||
// Run Wasm | ||
var RunWasm = function (_a) { | ||
var language = _a.language, code = _a.code; | ||
return (React.createElement("div", null, | ||
"Run ", | ||
language, | ||
" and execute ", | ||
code)); | ||
}; | ||
export default RunWasm; | ||
var language = _a.language, | ||
code = _a.code | ||
return React.createElement( | ||
'div', | ||
null, | ||
'Run ', | ||
language, | ||
' and execute ', | ||
code | ||
) | ||
} | ||
export default RunWasm |
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
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import React from "react"; | ||
import React from 'react' | ||
|
||
const RunWasm = ({ | ||
language, | ||
code, | ||
}: { | ||
language: string; | ||
code: string; | ||
language: string | ||
code: string | ||
}): JSX.Element => ( | ||
<div> | ||
Run {language} and execute {code} | ||
</div> | ||
); | ||
) | ||
|
||
export default RunWasm; | ||
export default RunWasm |
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 |
---|---|---|
@@ -1,22 +1,37 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "lib/esm", | ||
"module": "esnext", | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/components/*": ["components/*"], | ||
"@/pages/*": ["pages/*"], | ||
"@/constants/*": ["constants/*"], | ||
"@/styles/*": ["styles/*"], | ||
"@/utils/*": ["utils/*"], | ||
"@/lib/*": ["lib/*"], | ||
"@/types/*": ["types/*"], | ||
"@/hooks/*": ["hooks/*"] | ||
}, | ||
"target": "es5", | ||
"lib": ["es6", "dom", "es2016", "es2017"], | ||
"jsx": "react", | ||
"declaration": true, | ||
"moduleResolution": "node", | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"allowSyntheticDefaultImports": true | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve" | ||
}, | ||
"include": ["src"], | ||
"exclude": ["node_modules", "lib"] | ||
"include": [ | ||
"next-env.d.ts", | ||
"**/*.ts", | ||
"**/*.tsx", | ||
"components/LessonSortableItem.js", | ||
"components/FileUploader.js", | ||
"pages/api/stripe/webhook.ts" | ||
], | ||
"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