setCode(code)}
highlight={code => highlight(code, goSyntax, 'go')}
padding={10}
style={{
fontFamily: '"Fira code", "Fira Mono", monospace',
fontSize: 12
}}
/>
)
}
export default Index
================================================
FILE: postcss.config.js
================================================
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}
================================================
FILE: styles/global.css
================================================
/* ./styles/globals.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
html,
body,
body > div:first-child,
div#__next,
div#__next > div {
height: 100%;
}
/*
@font-face {
font-family: 'Fira Code';
src: url('woff2/FiraCode-Light.woff2') format('woff2'),
url("woff/FiraCode-Light.woff") format("woff");
font-weight: 300;
font-style: normal;
} */
@font-face {
font-family: 'Fira Code';
src: url('/FiraCode-Regular.woff2') format('woff2'),
url("/FiraCode-Regular.woff") format("woff");
font-weight: 400;
font-style: normal;
}
/*
@font-face {
font-family: 'Fira Code';
src: url('woff2/FiraCode-Medium.woff2') format('woff2'),
url("woff/FiraCode-Medium.woff") format("woff");
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: 'Fira Code';
src: url('woff2/FiraCode-SemiBold.woff2') format('woff2'),
url("woff/FiraCode-SemiBold.woff") format("woff");
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: 'Fira Code';
src: url('woff2/FiraCode-Bold.woff2') format('woff2'),
url("woff/FiraCode-Bold.woff") format("woff");
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: 'Fira Code VF';
src: url('woff2/FiraCode-VF.woff2') format('woff2-variations'),
url('woff/FiraCode-VF.woff') format('woff-variations');
font-weight: 300 700;
font-style: normal;
} */
================================================
FILE: tailwind.config.js
================================================
const colors = require('tailwindcss/colors')
module.exports = {
purge: ['**/*.tsx'],
mode: 'jit',
darkMode: false, // or 'media' or 'class'
theme: {
extend: {
colors: {
orange: colors.orange,
coolGray: colors.coolGray,
blueGray: colors.blueGray
}
},
fontFamily: {
sans: ['Fira code', 'Fira Mono', 'monospace']
}
},
variants: {
extend: {}
},
plugins: [require('@tailwindcss/aspect-ratio')]
}
================================================
FILE: tsconfig.json
================================================
{
"compilerOptions": {
"allowJs": true,
"alwaysStrict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "preserve",
"lib": ["dom", "es2017"],
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "esnext",
"baseUrl": ".",
"paths": {
"@styles*": ["styles*"],
"@components*": ["components*"],
"@type*": ["type*"],
"@utils*": ["utils*"]
}
},
"exclude": ["node_modules", "goscript/"],
"include": ["**/*.ts", "**/*.tsx"]
}
================================================
FILE: type/types.ts
================================================
export type WasmRunFn = (pathPtr: number) => number
export type WasmAlloc = (size: number) => number
export type WasmDealloc = (ptr: number) => number