├── frameworks
├── marko
│ ├── dist
│ ├── .gitignore
│ ├── src
│ │ ├── components
│ │ │ └── app-layout
│ │ │ │ ├── favicon.png
│ │ │ │ └── index.marko
│ │ └── pages
│ │ │ ├── todo.marko
│ │ │ ├── dashboard.marko
│ │ │ └── index.marko
│ ├── package.json
│ └── README.md
├── hydrogen
│ ├── src
│ │ ├── index.css
│ │ ├── components
│ │ │ ├── todo-app.client.jsx
│ │ │ └── dashboard.client.jsx
│ │ ├── routes
│ │ │ ├── todo.server.jsx
│ │ │ ├── dashboard.server.jsx
│ │ │ └── index.server.jsx
│ │ ├── App.server.jsx
│ │ └── assets
│ │ │ └── favicon.svg
│ ├── public
│ │ └── .gitkeep
│ ├── .gitignore
│ ├── mini-oxygen.config.json
│ ├── vite.config.js
│ ├── hydrogen.config.js
│ ├── jsconfig.json
│ ├── index.html
│ ├── package.json
│ └── README.md
├── lit
│ ├── docs-src
│ │ ├── .nojekyll
│ │ ├── package.json
│ │ ├── todo.md
│ │ ├── .eleventyignore
│ │ ├── index.md
│ │ ├── dashboard.md
│ │ ├── _includes
│ │ │ ├── relative-path.cjs
│ │ │ └── page.11ty.cjs
│ │ ├── _data
│ │ │ └── api.11tydata.js
│ │ ├── _README.md
│ │ └── install.md
│ ├── src
│ │ └── typings.d.ts
│ ├── .eslintignore
│ ├── .prettierrc.json
│ ├── dev
│ │ ├── README.md
│ │ └── index.html
│ ├── index.html
│ ├── .gitignore
│ ├── .vscode
│ │ └── extensions.json
│ ├── sever.js
│ ├── server.js
│ ├── web-dev-server.config.js
│ ├── .eleventy.cjs
│ ├── tsconfig.json
│ ├── rollup.config.js
│ ├── .eslintrc.json
│ └── LICENSE
├── qwik
│ ├── src
│ │ ├── typings.d.ts
│ │ ├── root.tsx
│ │ ├── routes
│ │ │ ├── todo
│ │ │ │ └── index.tsx
│ │ │ ├── index.tsx
│ │ │ ├── layout.tsx
│ │ │ └── dashboard
│ │ │ │ └── index.tsx
│ │ ├── global.css
│ │ ├── entry.ssr.tsx
│ │ ├── entry.dev.tsx
│ │ ├── entry.http.tsx
│ │ ├── components
│ │ │ └── head
│ │ │ │ └── head.tsx
│ │ └── entry.express.tsx
│ ├── public
│ │ ├── _headers
│ │ ├── favicon.ico
│ │ └── favicons
│ │ │ ├── apple-touch-icon.png
│ │ │ ├── android-chrome-192x192.png
│ │ │ └── android-chrome-256x256.png
│ ├── .prettierignore
│ ├── vite.config.ts
│ ├── .eslintignore
│ ├── .gitignore
│ ├── tsconfig.json
│ └── .eslintrc.cjs
├── angular
│ ├── src
│ │ ├── assets
│ │ │ └── .gitkeep
│ │ ├── app
│ │ │ ├── typings.d.ts
│ │ │ ├── app.component.css
│ │ │ ├── app.component.html
│ │ │ ├── app.component.ts
│ │ │ ├── app.server.module.ts
│ │ │ ├── app.module.ts
│ │ │ └── app-routing.module.ts
│ │ ├── environments
│ │ │ ├── environment.prod.ts
│ │ │ └── environment.ts
│ │ ├── styles.css
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── main.ts
│ │ ├── main.server.ts
│ │ └── test.ts
│ ├── .vscode
│ │ ├── extensions.json
│ │ ├── launch.json
│ │ └── tasks.json
│ ├── tsconfig.app.json
│ ├── .editorconfig
│ ├── tsconfig.server.json
│ ├── tsconfig.spec.json
│ ├── server.js
│ ├── .browserslistrc
│ ├── .gitignore
│ ├── tsconfig.json
│ ├── README.md
│ └── karma.conf.js
├── next
│ ├── styles
│ │ ├── Home.module.css
│ │ └── globals.css
│ ├── .eslintrc.json
│ ├── public
│ │ ├── favicon.ico
│ │ └── vercel.svg
│ ├── next.config.js
│ ├── pages
│ │ ├── todo.js
│ │ ├── api
│ │ │ └── hello.js
│ │ ├── dashboard.js
│ │ ├── index.js
│ │ ├── dashboard-ssr.js
│ │ └── _app.js
│ ├── next-env.d.ts
│ ├── .gitignore
│ ├── package.json
│ └── README.md
├── solid-start
│ ├── src
│ │ ├── root.css
│ │ ├── entry-client.tsx
│ │ ├── entry-server.tsx
│ │ ├── routes
│ │ │ ├── todo.tsx
│ │ │ ├── index.tsx
│ │ │ ├── dashboard.tsx
│ │ │ └── [...404].tsx
│ │ └── root.tsx
│ ├── public
│ │ └── favicon.ico
│ ├── vite.config.ts
│ ├── .gitignore
│ ├── tsconfig.json
│ ├── package.json
│ ├── README.md
│ └── vite.config.ts.timestamp-1660787794719.mjs
├── preact-ssr-node
│ ├── .gitignore
│ ├── package.json
│ └── http.jsx
├── react-ssr-node
│ ├── .gitignore
│ ├── package.json
│ └── http.jsx
├── solid-ssr-node
│ ├── .gitignore
│ ├── package.json
│ ├── rollup.config.js
│ └── http.jsx
├── svelte
│ ├── .npmrc
│ ├── .gitignore
│ ├── static
│ │ └── favicon.png
│ ├── .prettierrc
│ ├── vite.config.js
│ ├── .prettierignore
│ ├── src
│ │ ├── routes
│ │ │ ├── todo.svelte
│ │ │ ├── dashboard.svelte
│ │ │ └── index.svelte
│ │ └── app.html
│ ├── svelte.config.js
│ ├── package.json
│ └── README.md
├── react
│ ├── .env
│ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ └── manifest.json
│ ├── src
│ │ ├── setupTests.js
│ │ ├── App.test.js
│ │ ├── index.css
│ │ ├── reportWebVitals.js
│ │ ├── index.js
│ │ └── App.js
│ ├── .gitignore
│ ├── server.js
│ └── package.json
├── vue3
│ ├── env.d.ts
│ ├── .vscode
│ │ └── extensions.json
│ ├── public
│ │ └── favicon.ico
│ ├── src
│ │ ├── main.ts
│ │ ├── views
│ │ │ ├── HomeView.vue
│ │ │ └── AboutView.vue
│ │ ├── App.vue
│ │ └── router
│ │ │ └── index.ts
│ ├── index.html
│ ├── vite.config.ts
│ ├── .gitignore
│ ├── package.json
│ └── README.md
├── gatsby
│ ├── .gitignore
│ ├── gatsby-config.js
│ ├── src
│ │ └── pages
│ │ │ ├── todo.js
│ │ │ ├── index.js
│ │ │ ├── dashboard.js
│ │ │ ├── dashboard-ssr.js
│ │ │ └── 404.js
│ └── package.json
├── nuxt2
│ ├── .prettierrc
│ ├── static
│ │ └── favicon.ico
│ ├── pages
│ │ ├── todo.vue
│ │ ├── index.vue
│ │ └── dashboard.vue
│ ├── .editorconfig
│ ├── layouts
│ │ └── default.vue
│ ├── store
│ │ └── README.md
│ ├── tsconfig.json
│ ├── package.json
│ ├── nuxt.config.js
│ ├── components
│ │ └── NuxtLogo.vue
│ ├── .gitignore
│ └── .prettierignore
├── astro
│ ├── .npmrc
│ ├── public
│ │ └── favicon.ico
│ ├── .vscode
│ │ ├── extensions.json
│ │ └── launch.json
│ ├── src
│ │ ├── pages
│ │ │ ├── todo.astro
│ │ │ ├── index.astro
│ │ │ └── dashboard.astro
│ │ └── layouts
│ │ │ └── Layout.astro
│ ├── .gitignore
│ ├── server.mjs
│ ├── tsconfig.json
│ ├── astro.config.mjs
│ ├── package.json
│ └── README.md
├── remix
│ ├── .gitignore
│ ├── .eslintrc
│ ├── public
│ │ └── favicon.ico
│ ├── app
│ │ ├── entry.client.jsx
│ │ ├── routes
│ │ │ ├── todo.jsx
│ │ │ ├── index.jsx
│ │ │ └── dashboard.jsx
│ │ ├── entry.server.jsx
│ │ └── root.jsx
│ ├── remix.config.js
│ ├── jsconfig.json
│ ├── package.json
│ └── README.md
├── fresh
│ ├── .vscode
│ │ ├── extensions.json
│ │ └── settings.json
│ ├── static
│ │ ├── favicon.ico
│ │ └── logo.svg
│ ├── islands
│ │ ├── Todo.tsx
│ │ └── Dashboard.tsx
│ ├── package-lock.json
│ ├── dev.ts
│ ├── README.md
│ ├── deno.json
│ ├── routes
│ │ ├── [name].tsx
│ │ ├── index.tsx
│ │ ├── todo.tsx
│ │ ├── dashboard.tsx
│ │ └── api
│ │ │ └── joke.ts
│ ├── package.json
│ ├── utils
│ │ └── twind.ts
│ ├── components
│ │ └── Button.tsx
│ ├── import_map.json
│ ├── main.ts
│ └── fresh.gen.ts
├── nuxt3
│ ├── .gitignore
│ ├── tsconfig.json
│ ├── pages
│ │ ├── todo.vue
│ │ ├── dashboard-ssr.vue
│ │ ├── dashboard.vue
│ │ └── index.vue
│ ├── layouts
│ │ └── default.vue
│ ├── nuxt.config.ts
│ ├── package.json
│ └── README.md
├── react-ssr-bun
│ ├── bun.lockb
│ ├── package.json
│ └── http.js
└── react-ssr-deno
│ ├── deno.json
│ ├── package.json
│ ├── import_map.json
│ └── http.jsx
├── apps
├── components
│ ├── output
│ │ ├── marko
│ │ │ ├── dist
│ │ │ └── marko.json
│ │ └── vue
│ │ │ └── nuxt.js
│ ├── src
│ │ ├── components
│ │ │ ├── general
│ │ │ │ ├── report-table.lits.tsx
│ │ │ │ ├── chart.lite.tsx
│ │ │ │ ├── tabs.lite.tsx
│ │ │ │ ├── accordion.lite.tsx
│ │ │ │ ├── highlight.ts
│ │ │ │ ├── code-viewer.lite.tsx
│ │ │ │ ├── carousel.lite.tsx
│ │ │ │ ├── lh-report-chart.lite.tsx
│ │ │ │ └── lite-tooltip.lite.tsx
│ │ │ ├── dashboard
│ │ │ │ ├── search.ts
│ │ │ │ ├── benchmarks.ts
│ │ │ │ ├── frameworks.ts
│ │ │ │ └── framework-picker.lite.tsx
│ │ │ ├── hello-world.lite.tsx
│ │ │ ├── utils
│ │ │ │ ├── sort.ts
│ │ │ │ └── generate-csv.ts
│ │ │ ├── todo-item.lite.tsx
│ │ │ └── dashboard.lite.tsx
│ │ ├── index.ts
│ │ ├── utils
│ │ │ └── map-keys.ts
│ │ ├── reports
│ │ │ ├── astro_simple.ts
│ │ │ ├── qwik_simple.ts
│ │ │ ├── fresh_simple.ts
│ │ │ ├── marko_simple.ts
│ │ │ ├── react_simple.ts
│ │ │ ├── gatsby_simple.ts
│ │ │ ├── svelte_simple.ts
│ │ │ ├── todo
│ │ │ │ ├── astro_simple.ts
│ │ │ │ ├── lit_simple.ts
│ │ │ │ ├── qwik_simple.ts
│ │ │ │ ├── svelte_simple.ts
│ │ │ │ ├── nuxt2_simple.ts
│ │ │ │ ├── gatsby_simple.ts
│ │ │ │ ├── marko_simple.ts
│ │ │ │ ├── react_simple.ts
│ │ │ │ ├── vue3_simple.ts
│ │ │ │ ├── hydrogen_simple.ts
│ │ │ │ ├── nuxt3_simple.ts
│ │ │ │ ├── next_simple.ts
│ │ │ │ ├── solid_simple.ts
│ │ │ │ ├── angular_simple.ts
│ │ │ │ └── fresh_simple.ts
│ │ │ ├── dashboard
│ │ │ │ ├── astro_simple.ts
│ │ │ │ ├── hydrogen_simple.ts
│ │ │ │ ├── solid_simple.ts
│ │ │ │ ├── next-bun_simple.ts
│ │ │ │ ├── qwik_simple.ts
│ │ │ │ ├── angular_simple.ts
│ │ │ │ ├── lit_simple.ts
│ │ │ │ ├── marko_simple.ts
│ │ │ │ ├── next_simple.ts
│ │ │ │ ├── nuxt2_simple.ts
│ │ │ │ ├── vue3_simple.ts
│ │ │ │ ├── nuxt3_simple.ts
│ │ │ │ ├── react_simple.ts
│ │ │ │ ├── fresh_simple.ts
│ │ │ │ ├── gatsby_simple.ts
│ │ │ │ ├── remix_simple.ts
│ │ │ │ └── svelte_simple.ts
│ │ │ ├── next_simple.ts
│ │ │ ├── vue3_simple.ts
│ │ │ ├── nuxt3_simple.ts
│ │ │ ├── remix_simple.ts
│ │ │ ├── angular_simple.ts
│ │ │ ├── hydrogen_simple.ts
│ │ │ ├── lit_simple.ts
│ │ │ ├── nuxt2_simple.ts
│ │ │ └── solid_simple.ts
│ │ └── root-styles.ts
│ ├── README.md
│ ├── .gitignore
│ ├── tsconfig.node.json
│ ├── tsconfig.json
│ └── package.json
└── README.md
├── .prettierrc.json
├── src
├── helpers
│ ├── range.ts
│ ├── sort-by.ts
│ ├── get-port.ts
│ ├── lighthouse.d.ts
│ ├── kill-process.ts
│ ├── preview.ts
│ ├── get-frameworks.ts
│ ├── install.ts
│ ├── build.ts
│ ├── get-table.ts
│ ├── get-js-size.ts
│ └── get-simple-report.ts
├── scripts
│ ├── install.ts
│ ├── serve.ts
│ ├── kill.ts
│ ├── clean.ts
│ ├── dev.ts
│ ├── build.ts
│ └── gen-simple-reports.ts
└── typings.d.ts
└── .gitignore
/frameworks/marko/dist:
--------------------------------------------------------------------------------
1 | src
--------------------------------------------------------------------------------
/frameworks/hydrogen/src/index.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frameworks/lit/docs-src/.nojekyll:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frameworks/qwik/src/typings.d.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/components/output/marko/dist:
--------------------------------------------------------------------------------
1 | src
--------------------------------------------------------------------------------
/frameworks/angular/src/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/public/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frameworks/next/styles/Home.module.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frameworks/solid-start/src/root.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frameworks/angular/src/app/typings.d.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frameworks/preact-ssr-node/.gitignore:
--------------------------------------------------------------------------------
1 | dist
--------------------------------------------------------------------------------
/frameworks/react-ssr-node/.gitignore:
--------------------------------------------------------------------------------
1 | dist
--------------------------------------------------------------------------------
/frameworks/solid-ssr-node/.gitignore:
--------------------------------------------------------------------------------
1 | dist
--------------------------------------------------------------------------------
/frameworks/angular/src/app/app.component.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frameworks/svelte/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/frameworks/react/.env:
--------------------------------------------------------------------------------
1 | DISABLE_ESLINT_PLUGIN=true
2 |
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true
3 | }
4 |
--------------------------------------------------------------------------------
/frameworks/marko/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | build
3 | *.log
4 |
--------------------------------------------------------------------------------
/frameworks/vue3/env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/frameworks/gatsby/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .cache/
3 | public
4 |
--------------------------------------------------------------------------------
/frameworks/lit/docs-src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "commonjs"
3 | }
4 |
--------------------------------------------------------------------------------
/frameworks/lit/src/typings.d.ts:
--------------------------------------------------------------------------------
1 | ///
--------------------------------------------------------------------------------
/frameworks/next/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/apps/components/output/marko/marko.json:
--------------------------------------------------------------------------------
1 | {
2 | "tags-dir": "./src/components"
3 | }
4 |
--------------------------------------------------------------------------------
/frameworks/nuxt2/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "semi": false,
3 | "singleQuote": true
4 | }
5 |
--------------------------------------------------------------------------------
/frameworks/astro/.npmrc:
--------------------------------------------------------------------------------
1 | # Expose Astro dependencies for `pnpm` users
2 | shamefully-hoist=true
3 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | node_modules
3 | .DS_Store
4 | dist
5 | *.local
6 |
--------------------------------------------------------------------------------
/frameworks/remix/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
3 | /.cache
4 | /build
5 | /public/build
6 | .env
7 |
--------------------------------------------------------------------------------
/src/helpers/range.ts:
--------------------------------------------------------------------------------
1 | export const range = (n: number) => Array.from({ length: n }, (_, k) => k);
2 |
--------------------------------------------------------------------------------
/frameworks/react/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/frameworks/angular/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/frameworks/angular/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/frameworks/fresh/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "denoland.vscode-deno"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/frameworks/nuxt3/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.log*
3 | .nuxt
4 | .nitro
5 | .cache
6 | .output
7 | .env
8 | dist
9 |
--------------------------------------------------------------------------------
/frameworks/remix/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["@remix-run/eslint-config", "@remix-run/eslint-config/node"]
3 | }
4 |
--------------------------------------------------------------------------------
/frameworks/qwik/public/_headers:
--------------------------------------------------------------------------------
1 | /build/*
2 | Cache-Control: public, max-age=31536000, s-maxage=31536000, immutable
3 |
--------------------------------------------------------------------------------
/frameworks/vue3/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3 | }
4 |
--------------------------------------------------------------------------------
/frameworks/lit/docs-src/todo.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page.11ty.cjs
3 | title: Todo Example
4 | ---
5 |
6 |
7 |
--------------------------------------------------------------------------------
/apps/components/src/components/general/report-table.lits.tsx:
--------------------------------------------------------------------------------
1 | export default function ReportTable() {
2 | return
;
3 | }
4 |
--------------------------------------------------------------------------------
/frameworks/angular/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/angular/src/favicon.ico
--------------------------------------------------------------------------------
/frameworks/astro/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/astro/public/favicon.ico
--------------------------------------------------------------------------------
/frameworks/fresh/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/fresh/static/favicon.ico
--------------------------------------------------------------------------------
/frameworks/lit/docs-src/.eleventyignore:
--------------------------------------------------------------------------------
1 | # Ignore files with a leading underscore; useful for e.g. readmes in source documentation
2 | _*.md
--------------------------------------------------------------------------------
/frameworks/next/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/next/public/favicon.ico
--------------------------------------------------------------------------------
/frameworks/nuxt2/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/nuxt2/static/favicon.ico
--------------------------------------------------------------------------------
/frameworks/qwik/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/qwik/public/favicon.ico
--------------------------------------------------------------------------------
/frameworks/react-ssr-bun/bun.lockb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/react-ssr-bun/bun.lockb
--------------------------------------------------------------------------------
/frameworks/react/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/react/public/favicon.ico
--------------------------------------------------------------------------------
/frameworks/react/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/react/public/logo192.png
--------------------------------------------------------------------------------
/frameworks/react/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/react/public/logo512.png
--------------------------------------------------------------------------------
/frameworks/remix/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/remix/public/favicon.ico
--------------------------------------------------------------------------------
/frameworks/svelte/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /build
4 | /.svelte-kit
5 | /package
6 | .env
7 | .env.*
8 | !.env.example
9 |
--------------------------------------------------------------------------------
/frameworks/svelte/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/svelte/static/favicon.png
--------------------------------------------------------------------------------
/frameworks/vue3/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/vue3/public/favicon.ico
--------------------------------------------------------------------------------
/src/scripts/install.ts:
--------------------------------------------------------------------------------
1 | import { installAll } from '../helpers/install.js';
2 |
3 | await installAll(undefined, process.env.PACKAGE);
4 |
--------------------------------------------------------------------------------
/frameworks/astro/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["astro-build.astro-vscode"],
3 | "unwantedRecommendations": []
4 | }
5 |
--------------------------------------------------------------------------------
/frameworks/fresh/islands/Todo.tsx:
--------------------------------------------------------------------------------
1 | import Todo from '../components/generated-components/components/todo-app.js';
2 | export default Todo;
3 |
--------------------------------------------------------------------------------
/frameworks/fresh/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fresh",
3 | "lockfileVersion": 2,
4 | "requires": true,
5 | "packages": {}
6 | }
7 |
--------------------------------------------------------------------------------
/frameworks/lit/docs-src/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page.11ty.cjs
3 | title: Hello World
4 | ---
5 |
6 |
--------------------------------------------------------------------------------
/frameworks/svelte/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "useTabs": true,
3 | "singleQuote": true,
4 | "trailingComma": "none",
5 | "printWidth": 100
6 | }
7 |
--------------------------------------------------------------------------------
/frameworks/lit/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules/*
2 | docs/*
3 | docs-src/*
4 | rollup-config.js
5 | custom-elements.json
6 | web-dev-server.config.js
7 |
--------------------------------------------------------------------------------
/frameworks/lit/docs-src/dashboard.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page.11ty.cjs
3 | title: Dashboard Example
4 | ---
5 |
6 |
7 |
--------------------------------------------------------------------------------
/frameworks/solid-start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/solid-start/public/favicon.ico
--------------------------------------------------------------------------------
/frameworks/angular/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/frameworks/fresh/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "deno.enable": true,
3 | "deno.lint": true,
4 | "editor.defaultFormatter": "denoland.vscode-deno"
5 | }
6 |
--------------------------------------------------------------------------------
/frameworks/fresh/islands/Dashboard.tsx:
--------------------------------------------------------------------------------
1 | import Dashboard from '../components/generated-components/components/dashboard.js';
2 | export default Dashboard;
3 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/src/components/todo-app.client.jsx:
--------------------------------------------------------------------------------
1 | import TodoApp from '../generated-components/components/todo-app';
2 |
3 | export default TodoApp;
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | debug.json
4 | report.json
5 | report.js
6 | **/generated-components/**
7 |
8 | flow.report.json
9 | flow.report.html
--------------------------------------------------------------------------------
/frameworks/solid-start/src/entry-client.tsx:
--------------------------------------------------------------------------------
1 | import { mount, StartClient } from "solid-start/entry-client";
2 |
3 | mount(() => , document);
4 |
--------------------------------------------------------------------------------
/apps/README.md:
--------------------------------------------------------------------------------
1 | # Apps
2 |
3 | Small apps written in [Mitosis](https://github.com/builderio/mitosis) that get compiled and copied to the various output frameworks
4 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/src/components/dashboard.client.jsx:
--------------------------------------------------------------------------------
1 | import Dashboard from '../generated-components/components/dashboard';
2 |
3 | export default Dashboard;
4 |
--------------------------------------------------------------------------------
/frameworks/react-ssr-deno/deno.json:
--------------------------------------------------------------------------------
1 | {
2 | "tasks": {
3 | "preview": "deno run --unstable -A http.jsx"
4 | },
5 | "importMap": "./import_map.json"
6 | }
7 |
--------------------------------------------------------------------------------
/frameworks/fresh/dev.ts:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env -S deno run -A --watch=static/,routes/
2 |
3 | import dev from "$fresh/dev.ts";
4 |
5 | await dev(import.meta.url, "./main.ts");
6 |
--------------------------------------------------------------------------------
/frameworks/qwik/public/favicons/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/qwik/public/favicons/apple-touch-icon.png
--------------------------------------------------------------------------------
/frameworks/hydrogen/src/routes/todo.server.jsx:
--------------------------------------------------------------------------------
1 | import TodoApp from '../components/todo-app.client';
2 |
3 | export default function Todo() {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/frameworks/marko/src/components/app-layout/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/marko/src/components/app-layout/favicon.png
--------------------------------------------------------------------------------
/frameworks/remix/app/entry.client.jsx:
--------------------------------------------------------------------------------
1 | import { RemixBrowser } from "@remix-run/react";
2 | import { hydrate } from "react-dom";
3 |
4 | hydrate(, document);
5 |
--------------------------------------------------------------------------------
/apps/components/README.md:
--------------------------------------------------------------------------------
1 | # Components
2 |
3 | Example components written in [Mitosis](https://github.com/builderio/mitosis) to compile across frameworks to measure performance.
4 |
--------------------------------------------------------------------------------
/apps/components/src/components/dashboard/search.ts:
--------------------------------------------------------------------------------
1 | import Fuse from 'fuse.js';
2 | import { frameworks } from './frameworks';
3 |
4 | export const fuse = new Fuse(frameworks);
5 |
--------------------------------------------------------------------------------
/frameworks/lit/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "es5",
3 | "tabWidth": 2,
4 | "singleQuote": true,
5 | "bracketSpacing": false,
6 | "arrowParens": "always"
7 | }
8 |
--------------------------------------------------------------------------------
/frameworks/marko/src/pages/todo.marko:
--------------------------------------------------------------------------------
1 | import TodoApp from '../../../../apps/components/output/marko/src/components/todo-app.marko'
2 |
3 |
4 |
--------------------------------------------------------------------------------
/frameworks/qwik/public/favicons/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/qwik/public/favicons/android-chrome-192x192.png
--------------------------------------------------------------------------------
/frameworks/qwik/public/favicons/android-chrome-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BuilderIO/framework-benchmarks/HEAD/frameworks/qwik/public/favicons/android-chrome-256x256.png
--------------------------------------------------------------------------------
/frameworks/react-ssr-deno/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "port": 6015,
3 | "scripts": {
4 | "preview": "deno task preview",
5 | "build": "echo 'No need to build'"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/frameworks/remix/app/routes/todo.jsx:
--------------------------------------------------------------------------------
1 | import { ToDoApp } from '../../components/generated-components';
2 |
3 | export default function Index() {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/frameworks/angular/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3 | "recommendations": ["angular.ng-template"]
4 | }
5 |
--------------------------------------------------------------------------------
/frameworks/gatsby/gatsby-config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | siteMetadata: {
3 | title: `gatsby`,
4 | siteUrl: `https://www.yourdomain.tld`,
5 | },
6 | plugins: [],
7 | }
8 |
--------------------------------------------------------------------------------
/frameworks/remix/app/routes/index.jsx:
--------------------------------------------------------------------------------
1 | import { HelloWorld } from '../../components/generated-components';
2 |
3 | export default function Index() {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/frameworks/marko/src/pages/dashboard.marko:
--------------------------------------------------------------------------------
1 | import Dashboard from '../../../../apps/components/output/marko/src/components/dashboard.marko'
2 |
3 |
4 |
--------------------------------------------------------------------------------
/frameworks/solid-start/vite.config.ts:
--------------------------------------------------------------------------------
1 | import solid from "solid-start/vite";
2 | import { defineConfig } from "vite";
3 |
4 | export default defineConfig({
5 | plugins: [solid()],
6 | });
7 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/src/routes/dashboard.server.jsx:
--------------------------------------------------------------------------------
1 | import Dashboard from '../components/dashboard.client';
2 |
3 | export default function DashboardPage() {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/frameworks/next/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | swcMinify: true,
5 | }
6 |
7 | module.exports = nextConfig
8 |
--------------------------------------------------------------------------------
/frameworks/marko/src/pages/index.marko:
--------------------------------------------------------------------------------
1 | import HelloWorld from '../../../../apps/components/output/marko/src/components/hello-world.marko'
2 |
3 |
4 |
--------------------------------------------------------------------------------
/frameworks/nuxt3/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | // https://v3.nuxtjs.org/concepts/typescript
3 | "extends": "./.nuxt/tsconfig.json",
4 | "compilerOptions": {
5 | "esModuleInterop": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/apps/components/src/components/dashboard/benchmarks.ts:
--------------------------------------------------------------------------------
1 | export type Benchmark = 'todo' | 'hello world' | 'dashboard';
2 |
3 | export const benchmarks: Benchmark[] = ['todo', 'hello world', 'dashboard'];
4 |
--------------------------------------------------------------------------------
/frameworks/lit/dev/README.md:
--------------------------------------------------------------------------------
1 | This directory contains HTML files containing your element for development. By running `npm run build:watch` and `npm run serve` you can edit and see changes without bundling.
2 |
--------------------------------------------------------------------------------
/frameworks/next/pages/todo.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ToDoApp from '../generated-components/components/todo-app';
3 |
4 | export default function Todo() {
5 | return ;
6 | }
7 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/src/routes/index.server.jsx:
--------------------------------------------------------------------------------
1 | import HelloWorld from '../generated-components/components/hello-world';
2 |
3 | export default function Home() {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/frameworks/remix/app/routes/dashboard.jsx:
--------------------------------------------------------------------------------
1 | import Dashboard from '../../components/generated-components/components/dashboard';
2 |
3 | export default function DashboardPage() {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/frameworks/fresh/README.md:
--------------------------------------------------------------------------------
1 | # fresh project
2 |
3 | ### Usage
4 |
5 | Start the project:
6 |
7 | ```
8 | deno task start
9 | ```
10 |
11 | This will watch the project directory and restart as necessary.
12 |
--------------------------------------------------------------------------------
/frameworks/svelte/vite.config.js:
--------------------------------------------------------------------------------
1 | import { sveltekit } from '@sveltejs/kit/vite';
2 |
3 | /** @type {import('vite').UserConfig} */
4 | const config = {
5 | plugins: [sveltekit()]
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/frameworks/next/pages/api/hello.js:
--------------------------------------------------------------------------------
1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2 |
3 | export default function handler(req, res) {
4 | res.status(200).json({ name: 'John Doe' })
5 | }
6 |
--------------------------------------------------------------------------------
/frameworks/next/pages/dashboard.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Dashboard from '../generated-components/components/dashboard';
3 |
4 | export default function DashboardPage() {
5 | return ;
6 | }
7 |
--------------------------------------------------------------------------------
/src/helpers/sort-by.ts:
--------------------------------------------------------------------------------
1 | export type AnyObject = Record;
2 |
3 | export function sortBy(key: keyof T) {
4 | return (a: T, b: T) => (a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0);
5 | }
6 |
--------------------------------------------------------------------------------
/frameworks/fresh/deno.json:
--------------------------------------------------------------------------------
1 | {
2 | "tasks": {
3 | "start": "deno run -A --watch=static/,routes/ dev.ts",
4 | "preview": "DENO_DEPLOYMENT_ID=abc deno run -A main.ts"
5 | },
6 | "importMap": "./import_map.json"
7 | }
8 |
--------------------------------------------------------------------------------
/frameworks/next/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import HelloWorld from '../generated-components/components/hello-world';
3 |
4 | export default function Home() {
5 | return ;
6 | }
7 |
--------------------------------------------------------------------------------
/frameworks/vue3/src/main.ts:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue';
2 | import App from './App.vue';
3 | import router from './router';
4 |
5 | const app = createApp(App);
6 |
7 | app.use(router);
8 |
9 | app.mount('#app');
10 |
--------------------------------------------------------------------------------
/frameworks/astro/src/pages/todo.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import Layout from '../layouts/Layout.astro';
3 | import ToDoApp from '../generated-components/components/todo-app.jsx';
4 | ---
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/frameworks/vue3/src/views/HomeView.vue:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/scripts/serve.ts:
--------------------------------------------------------------------------------
1 | import { getFrameworks } from '../helpers/get-frameworks.js';
2 | import { preview } from '../helpers/preview.js';
3 |
4 | const frameworks = await getFrameworks();
5 | frameworks.forEach((fw) => preview(fw));
6 |
--------------------------------------------------------------------------------
/apps/components/.gitignore:
--------------------------------------------------------------------------------
1 | output/**/src
2 | **/reports/*.json
3 | **/reports/*.js
4 | **/reports/*.ts
5 | !**/reports/*_simple.ts
6 | **/reports/*/*.json
7 | **/reports/*/*.js
8 | **/reports/*/*.ts
9 | !**/reports/*/*_simple.ts
10 |
--------------------------------------------------------------------------------
/src/scripts/kill.ts:
--------------------------------------------------------------------------------
1 | import { getFrameworks } from '../helpers/get-frameworks.js';
2 | import { killAll } from '../helpers/kill-process.js';
3 |
4 | // Kill all processes running on our framework ports
5 | killAll(await getFrameworks());
6 |
--------------------------------------------------------------------------------
/apps/components/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "module": "CommonJS",
5 | "moduleResolution": "node",
6 | "esModuleInterop": true
7 | },
8 | "include": ["e2e.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/frameworks/astro/src/pages/index.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import Layout from '../layouts/Layout.astro';
3 | import HelloWorld from '../generated-components/components/hello-world.jsx';
4 | ---
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/frameworks/astro/src/pages/dashboard.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import Layout from '../layouts/Layout.astro';
3 | import Dashboard from '../generated-components/components/dashboard.jsx';
4 | ---
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/frameworks/fresh/routes/[name].tsx:
--------------------------------------------------------------------------------
1 | /** @jsx h */
2 | import { h } from "preact";
3 | import { PageProps } from "$fresh/server.ts";
4 |
5 | export default function Greet(props: PageProps) {
6 | return Hello {props.params.name}
;
7 | }
8 |
--------------------------------------------------------------------------------
/frameworks/next/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/basic-features/typescript for more information.
6 |
--------------------------------------------------------------------------------
/frameworks/fresh/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "port": 8000,
3 | "scripts": {
4 | "build": "echo \"Fresh doesn't build :)\"",
5 | "dev": "deno task start",
6 | "start": "npm run dev",
7 | "preview": "deno task preview"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/frameworks/nuxt2/pages/todo.vue:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/frameworks/nuxt3/pages/todo.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
--------------------------------------------------------------------------------
/frameworks/svelte/.prettierignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /build
4 | /.svelte-kit
5 | /package
6 | .env
7 | .env.*
8 | !.env.example
9 |
10 | # Ignore files for PNPM, NPM and YARN
11 | pnpm-lock.yaml
12 | package-lock.json
13 | yarn.lock
14 |
--------------------------------------------------------------------------------
/frameworks/lit/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Lit Starter Kit
7 |
8 |
9 | Component Demo
10 |
11 |
12 |
--------------------------------------------------------------------------------
/frameworks/nuxt2/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
--------------------------------------------------------------------------------
/frameworks/solid-start/src/entry-server.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | StartServer,
3 | createHandler,
4 | renderAsync,
5 | } from "solid-start/entry-server";
6 |
7 | export default createHandler(
8 | renderAsync((event) => )
9 | );
10 |
--------------------------------------------------------------------------------
/frameworks/nuxt3/pages/dashboard-ssr.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
--------------------------------------------------------------------------------
/frameworks/nuxt3/pages/dashboard.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
--------------------------------------------------------------------------------
/frameworks/nuxt2/pages/dashboard.vue:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/frameworks/nuxt3/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
--------------------------------------------------------------------------------
/frameworks/fresh/utils/twind.ts:
--------------------------------------------------------------------------------
1 | import { IS_BROWSER } from "$fresh/runtime.ts";
2 | import { Configuration, setup } from "twind";
3 | export * from "twind";
4 | export const config: Configuration = {
5 | darkMode: "class",
6 | mode: "silent",
7 | };
8 | if (IS_BROWSER) setup(config);
9 |
--------------------------------------------------------------------------------
/frameworks/lit/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | /lib/
3 | /test/
4 | custom-elements.json
5 | # top level source
6 | my-element.js
7 | my-element.js.map
8 | my-element.d.ts
9 | my-element.d.ts.map
10 | # only generated for size check
11 | my-element.bundled.js
12 |
13 | docs
14 | dist
--------------------------------------------------------------------------------
/src/scripts/clean.ts:
--------------------------------------------------------------------------------
1 | import { glob, fs } from 'zx';
2 |
3 | const files = await glob([
4 | 'frameworks/**/generated-components/**',
5 | '!**/node_modules/**',
6 | ]);
7 | await Promise.all(
8 | files.map(async (file) => {
9 | await fs.remove(file);
10 | })
11 | );
12 |
--------------------------------------------------------------------------------
/frameworks/react/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/frameworks/astro/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "command": "./node_modules/.bin/astro dev",
6 | "name": "Development server",
7 | "request": "launch",
8 | "type": "node-terminal"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/frameworks/nuxt2/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/frameworks/svelte/src/routes/todo.svelte:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/components/src/components/general/chart.lite.tsx:
--------------------------------------------------------------------------------
1 | import { useStore } from '@builder.io/mitosis';
2 |
3 | export interface ChartProps {
4 | data: any[];
5 | }
6 |
7 | export default function Chart(props: ChartProps) {
8 | const state = useStore({});
9 | return ;
10 | }
11 |
--------------------------------------------------------------------------------
/apps/components/src/index.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | export { default as ToDoApp } from './components/todo-app.lite';
4 | export { default as HelloWorld } from './components/hello-world.lite';
5 | export { default as AppHeader } from './components/app-header.lite';
6 |
--------------------------------------------------------------------------------
/frameworks/react/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render();
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/mini-oxygen.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "port": 6011,
3 | "workerFile": "dist/worker/index.js",
4 | "assetsDir": "dist/client",
5 | "buildCommand": "yarn build",
6 | "modules": true,
7 | "watch": true,
8 | "buildWatchPaths": [
9 | "./src"
10 | ],
11 | "autoReload": true
12 | }
--------------------------------------------------------------------------------
/frameworks/svelte/src/routes/dashboard.svelte:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/components/src/components/general/tabs.lite.tsx:
--------------------------------------------------------------------------------
1 | import { useStore } from '@builder.io/mitosis';
2 |
3 | export type TabsProps = {};
4 |
5 | export default function Tabs(props: TabsProps) {
6 | const state = useStore({
7 | activeTab: 0,
8 | });
9 |
10 | return {/* TODO */}
;
11 | }
12 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import hydrogen from '@shopify/hydrogen/plugin';
3 | import compress from 'vite-plugin-compress';
4 |
5 | export default defineConfig({
6 | server: {
7 | port: 6011,
8 | },
9 | plugins: [hydrogen(), compress()],
10 | });
11 |
--------------------------------------------------------------------------------
/frameworks/svelte/src/routes/index.svelte:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/frameworks/angular/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/app"
6 | },
7 | "files": ["src/main.ts", "src/polyfills.ts"],
8 | "include": ["src/**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/src/helpers/get-port.ts:
--------------------------------------------------------------------------------
1 | import { fs } from 'zx';
2 |
3 | /**
4 | * Get the port a given framework runs on
5 | */
6 | export async function getPort(framework: string) {
7 | const { port } = JSON.parse(
8 | await fs.readFile(`./frameworks/${framework}/package.json`, 'utf8')
9 | );
10 | return port;
11 | }
12 |
--------------------------------------------------------------------------------
/apps/components/src/components/hello-world.lite.tsx:
--------------------------------------------------------------------------------
1 | export default function HelloWorld(props: { name?: string }) {
2 | return (
3 |
9 | Hello {props.name || 'world'}
10 |
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/hydrogen.config.js:
--------------------------------------------------------------------------------
1 | import {defineConfig} from '@shopify/hydrogen/config';
2 |
3 | export default defineConfig({
4 | shopify: {
5 | storeDomain: 'hydrogen-preview.myshopify.com',
6 | storefrontToken: '3b580e70970c4528da70c98e097c2fa0',
7 | storefrontApiVersion: '2022-07',
8 | },
9 | });
10 |
--------------------------------------------------------------------------------
/frameworks/nuxt3/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
--------------------------------------------------------------------------------
/frameworks/vue3/src/views/AboutView.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
This is an about page
4 |
5 |
6 |
7 |
16 |
--------------------------------------------------------------------------------
/apps/components/src/components/general/accordion.lite.tsx:
--------------------------------------------------------------------------------
1 | import { useStore } from '@builder.io/mitosis';
2 |
3 | export type AccordionProps = {};
4 |
5 | export default function Accordion(props: AccordionProps) {
6 | const state = useStore({
7 | activeTab: 0,
8 | });
9 |
10 | return {/* TODO */}
;
11 | }
12 |
--------------------------------------------------------------------------------
/frameworks/astro/.gitignore:
--------------------------------------------------------------------------------
1 | # build output
2 | dist/
3 | .output/
4 |
5 | # dependencies
6 | node_modules/
7 |
8 | # logs
9 | npm-debug.log*
10 | yarn-debug.log*
11 | yarn-error.log*
12 | pnpm-debug.log*
13 |
14 |
15 | # environment variables
16 | .env
17 | .env.production
18 |
19 | # macOS-specific files
20 | .DS_Store
21 |
--------------------------------------------------------------------------------
/frameworks/astro/server.mjs:
--------------------------------------------------------------------------------
1 | import express from 'express';
2 | import { handler as ssrHandler } from './dist/server/entry.mjs';
3 |
4 | const app = express();
5 | app.use(ssrHandler);
6 |
7 | const port = Number(process.env.PORT || 6001);
8 | app.listen(port);
9 |
10 | console.log(`Listening on http://localhost:${port}`);
11 |
--------------------------------------------------------------------------------
/apps/components/src/utils/map-keys.ts:
--------------------------------------------------------------------------------
1 | export function mapValues(
2 | obj: { [key: string]: T },
3 | fn: (value: T, key: string) => U
4 | ): { [key: string]: U } {
5 | return Object.keys(obj).reduce((result, key) => {
6 | result[key] = fn(obj[key], key);
7 | return result;
8 | }, {} as { [key: string]: U });
9 | }
10 |
--------------------------------------------------------------------------------
/frameworks/lit/docs-src/_includes/relative-path.cjs:
--------------------------------------------------------------------------------
1 | const path = require('path').posix;
2 |
3 | module.exports = (base, p) => {
4 | const relativePath = path.relative(base, p);
5 | if (p.endsWith('/') && !relativePath.endsWith('/') && relativePath !== '') {
6 | return relativePath + '/';
7 | }
8 | return relativePath;
9 | };
10 |
--------------------------------------------------------------------------------
/frameworks/nuxt2/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
12 |
--------------------------------------------------------------------------------
/frameworks/solid-start/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | dist
3 | .solid
4 | .output
5 | .vercel
6 | .netlify
7 | netlify
8 |
9 | # dependencies
10 | /node_modules
11 |
12 | # IDEs and editors
13 | /.idea
14 | .project
15 | .classpath
16 | *.launch
17 | .settings/
18 |
19 | # Temp
20 | gitignore
21 |
22 | # System Files
23 | .DS_Store
24 | Thumbs.db
25 |
--------------------------------------------------------------------------------
/apps/components/src/reports/astro_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 0,
3 | "totalKb": 9,
4 | "fcpDisplay": "0.7 s",
5 | "fcpNumber": 659.3279,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.7 s",
9 | "ttiNumber": 659.3279,
10 | "lcpDisplay": "0.7 s",
11 | "lcpNumber": 659.3279,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/qwik_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 0,
3 | "totalKb": 4,
4 | "fcpDisplay": "0.7 s",
5 | "fcpNumber": 654.4676,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.7 s",
9 | "ttiNumber": 654.4676,
10 | "lcpDisplay": "0.7 s",
11 | "lcpNumber": 654.4676,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/frameworks/qwik/src/root.tsx:
--------------------------------------------------------------------------------
1 | import { QwikCity, RouterOutlet } from '@builder.io/qwik-city';
2 | import { Head } from './components/head/head';
3 |
4 | export default () => {
5 | return (
6 |
7 |
8 |
9 |
10 |
11 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/frameworks/svelte/src/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %sveltekit.head%
8 |
9 |
10 | %sveltekit.body%
11 |
12 |
13 |
--------------------------------------------------------------------------------
/apps/components/src/reports/fresh_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 0,
3 | "totalKb": 27,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 753.7646,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.8 s",
9 | "ttiNumber": 753.7646,
10 | "lcpDisplay": "0.8 s",
11 | "lcpNumber": 753.7646,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/marko_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 15,
3 | "totalKb": 21,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 770.1965,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.8 s",
9 | "ttiNumber": 770.1965,
10 | "lcpDisplay": "1.1 s",
11 | "lcpNumber": 1090.393,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/react_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 154,
3 | "totalKb": 166,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 753.4726,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.8 s",
9 | "ttiNumber": 753.4726,
10 | "lcpDisplay": "2.2 s",
11 | "lcpNumber": 2229.6815,
12 | "score": 99
13 | }
--------------------------------------------------------------------------------
/frameworks/react-ssr-bun/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "port": 6016,
3 | "scripts": {
4 | "build": "echo 'No need to build :)'",
5 | "preview": "bun http.js --jsx-production"
6 | },
7 | "dependencies": {
8 | "@popperjs/core": "^2.11.6",
9 | "fuse.js": "^6.6.2",
10 | "react": "^18.2.0",
11 | "react-dom": "^18.2.0"
12 | }
13 | }
--------------------------------------------------------------------------------
/src/scripts/dev.ts:
--------------------------------------------------------------------------------
1 | import { $ } from 'zx/core';
2 | import { getFrameworks } from '../helpers/get-frameworks.js';
3 |
4 | const frameworks = await getFrameworks();
5 | frameworks.forEach((fw) =>
6 | $`cd frameworks/${fw} && npm run dev`.catch((err) => {
7 | console.error('Error in framework', fw, err);
8 | throw err;
9 | })
10 | );
11 |
--------------------------------------------------------------------------------
/apps/components/src/reports/gatsby_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 69,
3 | "totalKb": 73,
4 | "fcpDisplay": "0.6 s",
5 | "fcpNumber": 635.98915,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 3,
8 | "ttiDisplay": "1.4 s",
9 | "ttiNumber": 1414.96745,
10 | "lcpDisplay": "1.0 s",
11 | "lcpNumber": 982.472875,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/svelte_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 18,
3 | "totalKb": 22,
4 | "fcpDisplay": "1.5 s",
5 | "fcpNumber": 1453.37625,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "1.5 s",
9 | "ttiNumber": 1453.37625,
10 | "lcpDisplay": "1.5 s",
11 | "lcpNumber": 1453.37625,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/astro_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 20,
3 | "totalKb": 32,
4 | "fcpDisplay": "0.6 s",
5 | "fcpNumber": 642.60405,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.6 s",
9 | "ttiNumber": 642.60405,
10 | "lcpDisplay": "0.6 s",
11 | "lcpNumber": 642.60405,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/lit_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 16,
3 | "totalKb": 18,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 759.2055,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.8 s",
9 | "ttiNumber": 759.2055,
10 | "lcpDisplay": "1.1 s",
11 | "lcpNumber": 1066.109625,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/qwik_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 2,
3 | "totalKb": 25,
4 | "fcpDisplay": "0.7 s",
5 | "fcpNumber": 650.44375,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.7 s",
9 | "ttiNumber": 650.44375,
10 | "lcpDisplay": "1.2 s",
11 | "lcpNumber": 1219.053125,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/svelte_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 19,
3 | "totalKb": 24,
4 | "fcpDisplay": "1.5 s",
5 | "fcpNumber": 1467.396,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "1.5 s",
9 | "ttiNumber": 1467.396,
10 | "lcpDisplay": "1.5 s",
11 | "lcpNumber": 1467.396,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/frameworks/solid-start/src/routes/todo.tsx:
--------------------------------------------------------------------------------
1 | import AppHeader from '../generated-components/components/app-header';
2 | import Todo from '../generated-components/components/todo-app';
3 |
4 | export default function Home() {
5 | return (
6 | <>
7 |
8 |
9 | >
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/astro_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 3,
3 | "totalKb": 37,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 795.9838,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.9 s",
9 | "ttiNumber": 925.9676,
10 | "lcpDisplay": "1.1 s",
11 | "lcpNumber": 1130.9514,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/next_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 82,
3 | "totalKb": 93,
4 | "fcpDisplay": "0.7 s",
5 | "fcpNumber": 652.89135,
6 | "tbtDisplay": "40 ms",
7 | "tbtNumber": 43,
8 | "ttiDisplay": "2.1 s",
9 | "ttiNumber": 2067.9024249999998,
10 | "lcpDisplay": "0.8 s",
11 | "lcpNumber": 824.7827,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/nuxt2_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 95,
3 | "totalKb": 106,
4 | "fcpDisplay": "1.0 s",
5 | "fcpNumber": 997.0992,
6 | "tbtDisplay": "40 ms",
7 | "tbtNumber": 41,
8 | "ttiDisplay": "1.6 s",
9 | "ttiNumber": 1613.0992,
10 | "lcpDisplay": "1.0 s",
11 | "lcpNumber": 997.0992,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/vue3_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 31,
3 | "totalKb": 38,
4 | "fcpDisplay": "1.2 s",
5 | "fcpNumber": 1206.7486,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 4,
8 | "ttiDisplay": "1.2 s",
9 | "ttiNumber": 1235.7486,
10 | "lcpDisplay": "1.5 s",
11 | "lcpNumber": 1510.1228999999998,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/hydrogen_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 44,
3 | "totalKb": 68,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 768.11625,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.8 s",
9 | "ttiNumber": 792.61625,
10 | "lcpDisplay": "1.3 s",
11 | "lcpNumber": 1297.2325,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/solid_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 24,
3 | "totalKb": 29,
4 | "fcpDisplay": "0.6 s",
5 | "fcpNumber": 634.52195,
6 | "tbtDisplay": "10 ms",
7 | "tbtNumber": 9.5,
8 | "ttiDisplay": "0.9 s",
9 | "ttiNumber": 872.304875,
10 | "lcpDisplay": "1.3 s",
11 | "lcpNumber": 1262.60975,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/nuxt3_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 122,
3 | "totalKb": 130,
4 | "fcpDisplay": "2.0 s",
5 | "fcpNumber": 2006.986875,
6 | "tbtDisplay": "10 ms",
7 | "tbtNumber": 12.5,
8 | "ttiDisplay": "2.0 s",
9 | "ttiNumber": 2006.986875,
10 | "lcpDisplay": "2.2 s",
11 | "lcpNumber": 2169.650625,
12 | "score": 97
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/remix_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 358,
3 | "totalKb": 363,
4 | "fcpDisplay": "1.3 s",
5 | "fcpNumber": 1300.179675,
6 | "tbtDisplay": "240 ms",
7 | "tbtNumber": 242,
8 | "ttiDisplay": "3.6 s",
9 | "ttiNumber": 3628.353775,
10 | "lcpDisplay": "1.3 s",
11 | "lcpNumber": 1300.179675,
12 | "score": 94
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/gatsby_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 70,
3 | "totalKb": 75,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 801.5748000000001,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 4,
8 | "ttiDisplay": "1.6 s",
9 | "ttiNumber": 1583.1496,
10 | "lcpDisplay": "1.1 s",
11 | "lcpNumber": 1147.0059,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/marko_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 17,
3 | "totalKb": 23,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 778.1565,
6 | "tbtDisplay": "10 ms",
7 | "tbtNumber": 8,
8 | "ttiDisplay": "1.1 s",
9 | "ttiNumber": 1057.273875,
10 | "lcpDisplay": "0.9 s",
11 | "lcpNumber": 942.2347500000001,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/react_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 159,
3 | "totalKb": 171,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 753.8594,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.8 s",
9 | "ttiNumber": 753.8594,
10 | "lcpDisplay": "2.2 s",
11 | "lcpNumber": 2225.6485000000002,
12 | "score": 99
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/vue3_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 33,
3 | "totalKb": 41,
4 | "fcpDisplay": "1.2 s",
5 | "fcpNumber": 1207.7398,
6 | "tbtDisplay": "10 ms",
7 | "tbtNumber": 8.5,
8 | "ttiDisplay": "1.2 s",
9 | "ttiNumber": 1241.2398,
10 | "lcpDisplay": "1.8 s",
11 | "lcpNumber": 1815.4796000000003,
12 | "score": 99
13 | }
--------------------------------------------------------------------------------
/frameworks/qwik/.prettierignore:
--------------------------------------------------------------------------------
1 | **/*.log
2 | **/.DS_Store
3 | *.
4 | .vscode/settings.json
5 | .history
6 | .yarn
7 | dist
8 | dist-dev
9 | etc
10 | external
11 | node_modules
12 | temp
13 | tsc-out
14 | tsdoc-metadata.json
15 | target
16 | output
17 | rollup.config.js
18 | build
19 | .cache
20 | .vscode
21 | .rollup.cache
22 | dist
23 | tsconfig.tsbuildinfo
24 |
--------------------------------------------------------------------------------
/frameworks/remix/remix.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('@remix-run/dev').AppConfig} */
2 | module.exports = {
3 | ignoredRouteFiles: ['**/.*'],
4 | serverDependenciesToBundle: ['@builder.io/todo-app'],
5 | // appDirectory: "app",
6 | // assetsBuildDirectory: "public/build",
7 | // serverBuildPath: "build/index.js",
8 | // publicPath: "/build/",
9 | };
10 |
--------------------------------------------------------------------------------
/frameworks/solid-start/src/routes/index.tsx:
--------------------------------------------------------------------------------
1 | import AppHeader from '../generated-components/components/app-header';
2 | import HelloWorld from '../generated-components/components/hello-world';
3 |
4 | export default function Home() {
5 | return (
6 | <>
7 |
8 |
9 | >
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/apps/components/src/reports/angular_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 72,
3 | "totalKb": 74,
4 | "fcpDisplay": "1.5 s",
5 | "fcpNumber": 1523.7797,
6 | "tbtDisplay": "150 ms",
7 | "tbtNumber": 148.80869999999993,
8 | "ttiDisplay": "1.7 s",
9 | "ttiNumber": 1732.7797,
10 | "lcpDisplay": "1.5 s",
11 | "lcpNumber": 1523.7797,
12 | "score": 98
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/next-bun_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 91,
3 | "totalKb": 104,
4 | "fcpDisplay": "0.7 s",
5 | "fcpNumber": 655.32395,
6 | "tbtDisplay": "30 ms",
7 | "tbtNumber": 31,
8 | "ttiDisplay": "2.2 s",
9 | "ttiNumber": 2215.605675,
10 | "lcpDisplay": "2.1 s",
11 | "lcpNumber": 2137.9437,
12 | "score": 99
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/qwik_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 2,
3 | "totalKb": 38,
4 | "fcpDisplay": "0.6 s",
5 | "fcpNumber": 635.10875,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.6 s",
9 | "ttiNumber": 646.10875,
10 | "lcpDisplay": "1.5 s",
11 | "lcpNumber": 1483.9893749999997,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/hydrogen_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 160,
3 | "totalKb": 172,
4 | "fcpDisplay": "0.6 s",
5 | "fcpNumber": 641.10705,
6 | "tbtDisplay": "30 ms",
7 | "tbtNumber": 34.5,
8 | "ttiDisplay": "1.8 s",
9 | "ttiNumber": 1790.2141,
10 | "lcpDisplay": "1.6 s",
11 | "lcpNumber": 1581.2141000000001,
12 | "score": 91
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/lit_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 15,
3 | "totalKb": 16,
4 | "fcpDisplay": "0.6 s",
5 | "fcpNumber": 639.52875,
6 | "tbtDisplay": "10 ms",
7 | "tbtNumber": 8.5,
8 | "ttiDisplay": "0.8 s",
9 | "ttiNumber": 820.5574999999999,
10 | "lcpDisplay": "0.9 s",
11 | "lcpNumber": 928.8218749999999,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/nuxt2_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 93,
3 | "totalKb": 103,
4 | "fcpDisplay": "0.9 s",
5 | "fcpNumber": 916.9411249999999,
6 | "tbtDisplay": "120 ms",
7 | "tbtNumber": 119,
8 | "ttiDisplay": "1.5 s",
9 | "ttiNumber": 1546.1058,
10 | "lcpDisplay": "0.9 s",
11 | "lcpNumber": 916.9411249999999,
12 | "score": 99
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/hydrogen_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 163,
3 | "totalKb": 178,
4 | "fcpDisplay": "0.6 s",
5 | "fcpNumber": 638.73715,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.6 s",
9 | "ttiNumber": 638.73715,
10 | "lcpDisplay": "1.6 s",
11 | "lcpNumber": 1582.4742999999999,
12 | "score": 91
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/nuxt3_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 122,
3 | "totalKb": 131,
4 | "fcpDisplay": "2.2 s",
5 | "fcpNumber": 2166.76525,
6 | "tbtDisplay": "10 ms",
7 | "tbtNumber": 8.5,
8 | "ttiDisplay": "2.2 s",
9 | "ttiNumber": 2166.76525,
10 | "lcpDisplay": "2.3 s",
11 | "lcpNumber": 2260.9917750000004,
12 | "score": 96
13 | }
--------------------------------------------------------------------------------
/frameworks/angular/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Inject } from '@angular/core';
2 | import { Router } from '@angular/router';
3 |
4 | @Component({
5 | selector: 'app-root',
6 | templateUrl: './app.component.html',
7 | styleUrls: ['./app.component.css'],
8 | })
9 | export class AppComponent {
10 | constructor(public router: Router) {}
11 | }
12 |
--------------------------------------------------------------------------------
/frameworks/fresh/routes/index.tsx:
--------------------------------------------------------------------------------
1 | /** @jsx h */
2 | import { h } from 'preact';
3 | import {
4 | AppHeader,
5 | HelloWorld,
6 | } from '../components/generated-components/index.js';
7 |
8 | export default function Home() {
9 | return (
10 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/frameworks/vue3/src/App.vue:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/angular_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 272,
3 | "totalKb": 299,
4 | "fcpDisplay": "2.6 s",
5 | "fcpNumber": 2573.346925,
6 | "tbtDisplay": "210 ms",
7 | "tbtNumber": 210,
8 | "ttiDisplay": "2.8 s",
9 | "ttiNumber": 2843.35275,
10 | "lcpDisplay": "2.6 s",
11 | "lcpNumber": 2573.346925,
12 | "score": 89
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/lit_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 23,
3 | "totalKb": 25,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 752.5255999999999,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.8 s",
9 | "ttiNumber": 763.0255999999999,
10 | "lcpDisplay": "1.1 s",
11 | "lcpNumber": 1129.4198,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/marko_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 24,
3 | "totalKb": 38,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 755.6697999999999,
6 | "tbtDisplay": "10 ms",
7 | "tbtNumber": 12.5,
8 | "ttiDisplay": "1.0 s",
9 | "ttiNumber": 1022.42215,
10 | "lcpDisplay": "1.1 s",
11 | "lcpNumber": 1133.5047,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/next_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 92,
3 | "totalKb": 104,
4 | "fcpDisplay": "0.7 s",
5 | "fcpNumber": 667.1722,
6 | "tbtDisplay": "10 ms",
7 | "tbtNumber": 10.5,
8 | "ttiDisplay": "1.7 s",
9 | "ttiNumber": 1678.0331999999999,
10 | "lcpDisplay": "1.2 s",
11 | "lcpNumber": 1215.4305,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/nuxt2_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 107,
3 | "totalKb": 118,
4 | "fcpDisplay": "1.4 s",
5 | "fcpNumber": 1377.138225,
6 | "tbtDisplay": "190 ms",
7 | "tbtNumber": 189,
8 | "ttiDisplay": "1.9 s",
9 | "ttiNumber": 1879.274175,
10 | "lcpDisplay": "1.4 s",
11 | "lcpNumber": 1377.138225,
12 | "score": 97
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/vue3_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 41,
3 | "totalKb": 50,
4 | "fcpDisplay": "1.2 s",
5 | "fcpNumber": 1206.6862,
6 | "tbtDisplay": "10 ms",
7 | "tbtNumber": 7.5,
8 | "ttiDisplay": "1.8 s",
9 | "ttiNumber": 1768.3650750000002,
10 | "lcpDisplay": "2.1 s",
11 | "lcpNumber": 2146.708175,
12 | "score": 94
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/solid_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 16,
3 | "totalKb": 18,
4 | "fcpDisplay": "0.9 s",
5 | "fcpNumber": 866.5088750000001,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.9 s",
9 | "ttiNumber": 866.5088750000001,
10 | "lcpDisplay": "1.1 s",
11 | "lcpNumber": 1101.1124250000003,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/next_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 83,
3 | "totalKb": 94,
4 | "fcpDisplay": "0.7 s",
5 | "fcpNumber": 676.1899,
6 | "tbtDisplay": "110 ms",
7 | "tbtNumber": 110,
8 | "ttiDisplay": "2.2 s",
9 | "ttiNumber": 2169.0444499999994,
10 | "lcpDisplay": "0.8 s",
11 | "lcpNumber": 845.3797999999999,
12 | "score": 99
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/solid_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 17,
3 | "totalKb": 19,
4 | "fcpDisplay": "0.7 s",
5 | "fcpNumber": 673.5325,
6 | "tbtDisplay": "40 ms",
7 | "tbtNumber": 39,
8 | "ttiDisplay": "1.0 s",
9 | "ttiNumber": 1047.3312500000002,
10 | "lcpDisplay": "1.3 s",
11 | "lcpNumber": 1316.6625000000001,
12 | "score": 86
13 | }
--------------------------------------------------------------------------------
/frameworks/angular/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.ts]
12 | quote_type = single
13 |
14 | [*.md]
15 | max_line_length = off
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/frameworks/nuxt3/nuxt.config.ts:
--------------------------------------------------------------------------------
1 | import { defineNuxtConfig } from 'nuxt';
2 |
3 | // https://v3.nuxtjs.org/api/configuration/nuxt.config
4 | export default defineNuxtConfig({
5 | nitro: {
6 | compressPublicAssets: true,
7 | prerender: {
8 | routes: [
9 | '/',
10 | '/dashboard',
11 | '/todo'
12 | ]
13 | }
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/frameworks/solid-start/src/routes/dashboard.tsx:
--------------------------------------------------------------------------------
1 | import AppHeader from '../generated-components/components/app-header';
2 | import Dashboard from '../generated-components/components/dashboard';
3 |
4 | export default function Home() {
5 | return (
6 | <>
7 |
8 |
9 | >
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/angular_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 72,
3 | "totalKb": 74,
4 | "fcpDisplay": "1.5 s",
5 | "fcpNumber": 1535.190575,
6 | "tbtDisplay": "30 ms",
7 | "tbtNumber": 33.91832499999998,
8 | "ttiDisplay": "1.6 s",
9 | "ttiNumber": 1634.190575,
10 | "lcpDisplay": "1.6 s",
11 | "lcpNumber": 1584.690575,
12 | "score": 99
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/todo/fresh_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 9,
3 | "totalKb": 37,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 754.8344999999999,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "0.8 s",
9 | "ttiNumber": 754.8344999999999,
10 | "lcpDisplay": "0.9 s",
11 | "lcpNumber": 906.0431249999999,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/frameworks/angular/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Angular
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2020",
4 | "module": "esnext",
5 | "moduleResolution": "node16",
6 | "lib": ["dom", "dom.iterable", "scripthost", "es2020"],
7 | "jsx": "react",
8 | "types": ["vite/client"]
9 | },
10 | "exclude": ["node_modules", "dist"],
11 | "include": ["**/*.js", "**/*.jsx"]
12 | }
13 |
--------------------------------------------------------------------------------
/frameworks/next/styles/globals.css:
--------------------------------------------------------------------------------
1 | html,
2 | body {
3 | padding: 0;
4 | margin: 0;
5 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
6 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
7 | }
8 |
9 | a {
10 | color: inherit;
11 | text-decoration: none;
12 | }
13 |
14 | * {
15 | box-sizing: border-box;
16 | }
17 |
--------------------------------------------------------------------------------
/frameworks/qwik/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import { qwikVite } from '@builder.io/qwik/optimizer';
3 | import { qwikCity } from '@builder.io/qwik-city/vite';
4 | import tsconfigPaths from 'vite-tsconfig-paths';
5 |
6 | export default defineConfig(() => {
7 | return {
8 | plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
9 | };
10 | });
11 |
--------------------------------------------------------------------------------
/frameworks/react-ssr-node/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "port": 6014,
3 | "dependencies": {
4 | "fuse.js": "^6.6.2",
5 | "react": "^18.2.0",
6 | "react-dom": "^18.2.0"
7 | },
8 | "devDependencies": {
9 | "typescript": "^4.7.4"
10 | },
11 | "type": "module",
12 | "scripts": {
13 | "build": "tsc",
14 | "preview": "node dist/http.js"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/nuxt3_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 3784,
3 | "totalKb": 3801,
4 | "fcpDisplay": "20.8 s",
5 | "fcpNumber": 20793.972499999996,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 1,
8 | "ttiDisplay": "20.8 s",
9 | "ttiNumber": 20793.972499999996,
10 | "lcpDisplay": "21.0 s",
11 | "lcpNumber": 21011.367,
12 | "score": 45
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/react_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 187,
3 | "totalKb": 199,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 752.2442000000001,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0.5,
8 | "ttiDisplay": "2.0 s",
9 | "ttiNumber": 2025.9884000000002,
10 | "lcpDisplay": "2.4 s",
11 | "lcpNumber": 2423.17155,
12 | "score": 98
13 | }
--------------------------------------------------------------------------------
/frameworks/gatsby/src/pages/todo.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import AppHeader from '../generated-components/components/app-header';
3 | import ToDoApp from '../generated-components/components/todo-app';
4 |
5 | export default function Todo() {
6 | return (
7 | <>
8 |
9 |
10 | >
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/fresh_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 17,
3 | "totalKb": 46,
4 | "fcpDisplay": "1.1 s",
5 | "fcpNumber": 1054.1068500000001,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 0,
8 | "ttiDisplay": "1.1 s",
9 | "ttiNumber": 1054.1068500000001,
10 | "lcpDisplay": "1.1 s",
11 | "lcpNumber": 1054.1068500000001,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/gatsby_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 83,
3 | "totalKb": 88,
4 | "fcpDisplay": "0.8 s",
5 | "fcpNumber": 759.2629999999999,
6 | "tbtDisplay": "10 ms",
7 | "tbtNumber": 5.5,
8 | "ttiDisplay": "1.2 s",
9 | "ttiNumber": 1191.7102499999999,
10 | "lcpDisplay": "1.1 s",
11 | "lcpNumber": 1134.2102499999999,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/remix_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 71,
3 | "totalKb": 77,
4 | "fcpDisplay": "1.8 s",
5 | "fcpNumber": 1769.4123249999998,
6 | "tbtDisplay": "30 ms",
7 | "tbtNumber": 34,
8 | "ttiDisplay": "1.9 s",
9 | "ttiNumber": 1933.3054749999997,
10 | "lcpDisplay": "1.8 s",
11 | "lcpNumber": 1769.4123249999998,
12 | "score": 99
13 | }
--------------------------------------------------------------------------------
/apps/components/src/reports/dashboard/svelte_simple.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | "jsKb": 29,
3 | "totalKb": 35,
4 | "fcpDisplay": "1.5 s",
5 | "fcpNumber": 1542.0183499999998,
6 | "tbtDisplay": "0 ms",
7 | "tbtNumber": 4.5,
8 | "ttiDisplay": "1.5 s",
9 | "ttiNumber": 1542.0183499999998,
10 | "lcpDisplay": "1.5 s",
11 | "lcpNumber": 1542.0183499999998,
12 | "score": 100
13 | }
--------------------------------------------------------------------------------
/frameworks/lit/docs-src/_data/api.11tydata.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @license
3 | * Copyright 2021 Google LLC
4 | * SPDX-License-Identifier: BSD-3-Clause
5 | */
6 |
7 | const fs = require('fs');
8 |
9 | module.exports = () => {
10 | const customElements = JSON.parse(
11 | fs.readFileSync('custom-elements.json', 'utf-8')
12 | );
13 | return {
14 | customElements,
15 | };
16 | };
17 |
--------------------------------------------------------------------------------
/frameworks/fresh/routes/todo.tsx:
--------------------------------------------------------------------------------
1 | /** @jsx h */
2 | import { h } from 'preact';
3 | import AppHeader from '../components/generated-components/components/app-header.js';
4 | import Todo from '../islands/Todo.tsx';
5 |
6 | export default function Home() {
7 | return (
8 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/frameworks/next/pages/dashboard-ssr.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Dashboard from '../generated-components/components/dashboard';
3 |
4 | // Special route for SSR
5 | export default function Todo() {
6 | return ;
7 | }
8 |
9 | // Include this to make sure this page is in SSR mode
10 | export async function getServerSideProps() {
11 | return { props: {} };
12 | }
13 |
--------------------------------------------------------------------------------
/frameworks/angular/tsconfig.server.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.app.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/server",
6 | "target": "es2019",
7 | "types": [
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "src/main.server.ts",
13 | "server.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/frameworks/react-ssr-deno/import_map.json:
--------------------------------------------------------------------------------
1 | {
2 | "imports": {
3 | "fuse.js": "https://esm.sh/v92/fuse.js",
4 | "fuse.js/": "https://esm.sh/v92/fuse.js/",
5 | "react": "https://esm.sh/v92/react",
6 | "react/": "https://esm.sh/v92/react/",
7 | "@popperjs/core": "https://esm.sh/v92/@popperjs/core",
8 | "@popperjs/core/": "https://esm.sh/v92/@popperjs/core/"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/frameworks/gatsby/src/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import AppHeader from '../generated-components/components/app-header';
3 | import HelloWorld from '../generated-components/components/hello-world';
4 |
5 | export default function Home() {
6 | return (
7 | <>
8 |
9 |
10 | >
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/apps/components/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "strict": true,
5 | "jsx": "preserve",
6 | "module": "ES2022",
7 | "moduleResolution": "node",
8 | "resolveJsonModule": true,
9 | "jsxImportSource": "@builder.io/mitosis"
10 | },
11 | "include": ["src", "cases", "reports"],
12 | "references": [{ "path": "./tsconfig.node.json" }]
13 | }
14 |
--------------------------------------------------------------------------------
/frameworks/gatsby/src/pages/dashboard.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import AppHeader from '../generated-components/components/app-header';
3 | import Dashboard from '../generated-components/components/dashboard';
4 |
5 | export default function DashboardPage() {
6 | return (
7 | <>
8 |
9 |
10 | >
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/src/typings.d.ts:
--------------------------------------------------------------------------------
1 | import { Page } from 'puppeteer';
2 |
3 | declare module 'lighthouse/core/lib/median-run.js' {
4 | export function computeMedianRun(runs: LH.Result[]): LH.Result;
5 | }
6 |
7 | declare module 'lighthouse/core/fraggle-rock/api.js' {
8 | export async function startFlow(page: Page, options: any): any;
9 | export async function auditFlowArtifacts(artifact: any): Promise;
10 | }
11 |
--------------------------------------------------------------------------------
/frameworks/fresh/routes/dashboard.tsx:
--------------------------------------------------------------------------------
1 | /** @jsx h */
2 | import { h } from 'preact';
3 | import AppHeader from '../components/generated-components/components/app-header.js';
4 | import Dashboard from '../islands/Dashboard.tsx';
5 |
6 | export default function Home() {
7 | return (
8 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/frameworks/vue3/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite App
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/frameworks/angular/src/app/app.server.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { ServerModule } from '@angular/platform-server';
3 |
4 | import { AppModule } from './app.module';
5 | import { AppComponent } from './app.component';
6 |
7 | @NgModule({
8 | imports: [
9 | AppModule,
10 | ServerModule,
11 | ],
12 | bootstrap: [AppComponent],
13 | })
14 | export class AppServerModule {}
15 |
--------------------------------------------------------------------------------
/frameworks/preact-ssr-node/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "port": 6017,
3 | "dependencies": {
4 | "@popperjs/core": "^2.11.6",
5 | "fuse.js": "^6.6.2",
6 | "preact": "^10.10.6",
7 | "preact-render-to-string": "^5.2.3"
8 | },
9 | "devDependencies": {
10 | "typescript": "^4.7.4"
11 | },
12 | "type": "module",
13 | "scripts": {
14 | "build": "tsc",
15 | "preview": "node dist/http.js"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/frameworks/react/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/frameworks/solid-start/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowSyntheticDefaultImports": true,
4 | "esModuleInterop": true,
5 | "target": "ESNext",
6 | "module": "ESNext",
7 | "moduleResolution": "node",
8 | "jsxImportSource": "solid-js",
9 | "jsx": "preserve",
10 | "types": ["vite/client"],
11 | "baseUrl": "./",
12 | "paths": {
13 | "~/*": ["./src/*"]
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/frameworks/vue3/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { fileURLToPath, URL } from 'node:url';
2 |
3 | import { defineConfig } from 'vite';
4 | import vue from '@vitejs/plugin-vue';
5 | import compress from 'vite-plugin-compress';
6 |
7 | // https://vitejs.dev/config/
8 | export default defineConfig({
9 | plugins: [vue()],
10 | resolve: {
11 | alias: {
12 | '@': fileURLToPath(new URL('./src', import.meta.url)),
13 | },
14 | },
15 | });
16 |
--------------------------------------------------------------------------------
/frameworks/angular/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/spec",
6 | "types": [
7 | "jasmine"
8 | ]
9 | },
10 | "files": [
11 | "src/test.ts",
12 | "src/polyfills.ts"
13 | ],
14 | "include": [
15 | "src/**/*.spec.ts",
16 | "src/**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/frameworks/react/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/frameworks/fresh/components/Button.tsx:
--------------------------------------------------------------------------------
1 | /** @jsx h */
2 | import { h } from "preact";
3 | import { IS_BROWSER } from "$fresh/runtime.ts";
4 | import { tw } from "@twind";
5 |
6 | export function Button(props: h.JSX.HTMLAttributes) {
7 | return (
8 |
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/frameworks/qwik/src/routes/todo/index.tsx:
--------------------------------------------------------------------------------
1 | import { component$ } from '@builder.io/qwik';
2 | import type { DocumentHead } from '@builder.io/qwik-city';
3 | import ToDoApp_ from '../../components/generated-components/components/todo-app';
4 |
5 | export const ToDoApp: any = ToDoApp_;
6 |
7 | export default component$(() => {
8 | return ;
9 | });
10 |
11 | export const head: DocumentHead = {
12 | title: 'Welcome to Qwik City',
13 | };
14 |
--------------------------------------------------------------------------------
/frameworks/react/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/frameworks/vue3/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | .DS_Store
12 | dist
13 | dist-ssr
14 | coverage
15 | *.local
16 |
17 | /cypress/videos/
18 | /cypress/screenshots/
19 |
20 | # Editor directories and files
21 | .vscode/*
22 | !.vscode/extensions.json
23 | .idea
24 | *.suo
25 | *.ntvs*
26 | *.njsproj
27 | *.sln
28 | *.sw?
29 |
--------------------------------------------------------------------------------
/apps/components/src/components/general/highlight.ts:
--------------------------------------------------------------------------------
1 | import hljs from 'highlight.js/lib/core';
2 | import json from 'highlight.js/lib/languages/json';
3 | import javascript from 'highlight.js/lib/languages/javascript';
4 | import typescript from 'highlight.js/lib/languages/typescript';
5 |
6 | hljs.registerLanguage('json', json);
7 | hljs.registerLanguage('javascript', javascript);
8 | hljs.registerLanguage('javascript', typescript);
9 |
10 | export { hljs };
11 |
--------------------------------------------------------------------------------
/frameworks/qwik/src/global.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
5 | sans-serif;
6 | }
7 |
8 | main {
9 | padding: 10px 20px;
10 | max-width: 800px;
11 | margin: 0 auto;
12 | }
13 |
14 | .full-screen main {
15 | max-width: 100%;
16 | }
17 |
18 | a {
19 | color: #006eb3;
20 | }
21 |
22 | a:hover {
23 | text-decoration: none;
24 | }
25 |
--------------------------------------------------------------------------------
/frameworks/nuxt2/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Vuex Store files.
6 | Vuex Store option is implemented in the Nuxt.js framework.
7 |
8 | Creating a file in this directory automatically activates the option in the framework.
9 |
10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
11 |
--------------------------------------------------------------------------------
/frameworks/qwik/.eslintignore:
--------------------------------------------------------------------------------
1 | **/*.log
2 | **/.DS_Store
3 | *.
4 | .vscode/settings.json
5 | .history
6 | .yarn
7 | bazel-*
8 | bazel-bin
9 | bazel-out
10 | bazel-qwik
11 | bazel-testlogs
12 | dist
13 | dist-dev
14 | lib
15 | etc
16 | external
17 | node_modules
18 | temp
19 | tsc-out
20 | tsdoc-metadata.json
21 | target
22 | output
23 | rollup.config.js
24 | build
25 | .cache
26 | .vscode
27 | .rollup.cache
28 | dist
29 | tsconfig.tsbuildinfo
30 | vite.config.ts
31 |
--------------------------------------------------------------------------------
/frameworks/next/pages/_app.js:
--------------------------------------------------------------------------------
1 | import { useRouter } from 'next/router';
2 | import AppHeader from '../generated-components/components/app-header';
3 |
4 | Error.stackTraceLimit = Infinity;
5 |
6 | function MyApp({ Component, pageProps }) {
7 | const router = useRouter();
8 |
9 | return (
10 | <>
11 |
12 |
13 | >
14 | );
15 | }
16 |
17 | export default MyApp;
18 |
--------------------------------------------------------------------------------
/frameworks/qwik/src/routes/index.tsx:
--------------------------------------------------------------------------------
1 | import { component$ } from '@builder.io/qwik';
2 | import type { DocumentHead } from '@builder.io/qwik-city';
3 | import HelloWorld_ from '../components/generated-components/components/hello-world';
4 |
5 | export const HelloWorld: any = HelloWorld_;
6 |
7 | export default component$(() => {
8 | return ;
9 | });
10 |
11 | export const head: DocumentHead = {
12 | title: 'Welcome to Qwik City',
13 | };
14 |
--------------------------------------------------------------------------------
/frameworks/qwik/src/routes/layout.tsx:
--------------------------------------------------------------------------------
1 | import { component$, Slot } from '@builder.io/qwik';
2 | import { useLocation } from '@builder.io/qwik-city';
3 | import { AppHeader as AppHeader_ } from '../components/generated-components';
4 |
5 | export const AppHeader: any = AppHeader_;
6 |
7 | export default component$(() => {
8 | const { pathname } = useLocation();
9 |
10 | return (
11 | <>
12 |
13 |
14 | >
15 | );
16 | });
17 |
--------------------------------------------------------------------------------
/src/helpers/lighthouse.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare module 'lighthouse' {
4 | function lighthouse(
5 | url: string,
6 | options: Partial,
7 | config?: any
8 | ): Promise;
9 | export default lighthouse;
10 | }
11 |
12 | declare module 'lighthouse/report/generator/report-generator.js' {
13 | export class ReportGenerator {
14 | static generateReport(lhr: LH.LHResult, type: string): string;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/frameworks/lit/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4 |
5 | // List of extensions which should be recommended for users of this workspace.
6 | "recommendations": ["runem.lit-plugin"],
7 | // List of extensions recommended by VS Code that should not be recommended for users of this workspace.
8 | "unwantedRecommendations": []
9 | }
10 |
--------------------------------------------------------------------------------
/frameworks/next/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 | .pnpm-debug.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
--------------------------------------------------------------------------------
/frameworks/gatsby/src/pages/dashboard-ssr.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import AppHeader from '../generated-components/components/app-header';
3 | import Dashboard from '../generated-components/components/dashboard';
4 |
5 | export default function DashboardPage() {
6 | return (
7 | <>
8 |
9 |
10 | >
11 | );
12 | }
13 |
14 | export async function getServerData() {
15 | return { props: { random: Math.random() } };
16 | }
17 |
--------------------------------------------------------------------------------
/frameworks/nuxt3/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "build": "nuxt build",
5 | "dev": "nuxt dev -p 6005",
6 | "generate": "nuxt generate",
7 | "preview": "PORT=6005 nuxt preview"
8 | },
9 | "devDependencies": {
10 | "@popperjs/core": "^2.11.6",
11 | "fuse.js": "^6.6.2",
12 | "highlight.js": "^11.6.0",
13 | "nuxt": "npm:nuxt3@3.0.0-rc.8-27697847.a520185"
14 | },
15 | "port": 6005,
16 | "dependencies": {
17 | "color-hash": "^2.0.1"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/frameworks/svelte/svelte.config.js:
--------------------------------------------------------------------------------
1 | import adapter from '@sveltejs/adapter-auto';
2 | import preprocess from 'svelte-preprocess';
3 |
4 | /** @type {import('@sveltejs/kit').Config} */
5 | const config = {
6 | kit: {
7 | adapter: adapter()
8 | },
9 | preprocess: preprocess(),
10 | onwarn: (warning, handler) => {
11 | const { code, frame } = warning;
12 | // Allow unused selectors
13 | if (code === 'css-unused-selector') return;
14 |
15 | handler(warning);
16 | }
17 | };
18 |
19 | export default config;
20 |
--------------------------------------------------------------------------------
/frameworks/qwik/src/routes/dashboard/index.tsx:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import { component$ } from '@builder.io/qwik';
4 | import type { DocumentHead } from '@builder.io/qwik-city';
5 | import Dashboard_ from '../../components/generated-components/components/dashboard';
6 |
7 | export const Dashboard: any = Dashboard_;
8 |
9 | export default component$(() => {
10 | return ;
11 | });
12 |
13 | export const head: DocumentHead = {
14 | title: 'Welcome to Qwik City',
15 | };
16 |
--------------------------------------------------------------------------------
/frameworks/react/server.js:
--------------------------------------------------------------------------------
1 | const http = require('http');
2 | const express = require('express');
3 | const path = require('path');
4 | const app = express();
5 |
6 | app.use(express.json());
7 | app.use(express.static('build'));
8 |
9 | app.use('/', function (req, res) {
10 | res.sendFile(path.join(__dirname + '/build/index.html'));
11 | });
12 |
13 | const server = http.createServer(app);
14 | const port = Number(process.env.PORT);
15 | server.listen(port);
16 | console.debug('Server is running... http://localhost:' + port);
17 |
--------------------------------------------------------------------------------
/frameworks/qwik/src/entry.ssr.tsx:
--------------------------------------------------------------------------------
1 | import {renderToStream, RenderToStreamOptions } from '@builder.io/qwik/server';
2 | import { manifest } from '@qwik-client-manifest';
3 | import Root from './root';
4 |
5 | /**
6 | * Server-Side Render method to be called by a server.
7 | */
8 | export default function (opts: RenderToStreamOptions) {
9 | // Render the Root component to a string
10 | // Pass in the manifest that was generated from the client build
11 | return renderToStream(, {
12 | manifest,
13 | ...opts,
14 | });
15 | }
16 |
--------------------------------------------------------------------------------
/frameworks/nuxt2/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2018",
4 | "module": "esnext",
5 | "moduleResolution": "node",
6 | "lib": ["esnext", "esnext.asynciterable", "dom"],
7 | "esModuleInterop": true,
8 | "allowJs": true,
9 | "sourceMap": true,
10 | "strict": false,
11 | "noEmit": true,
12 | "baseUrl": ".",
13 | "paths": {
14 | "~/*": ["./*"],
15 | "@/*": ["./*"]
16 | },
17 | "types": ["@types/node", "@nuxt/types"]
18 | },
19 | "exclude": ["node_modules"]
20 | }
21 |
--------------------------------------------------------------------------------
/frameworks/qwik/.gitignore:
--------------------------------------------------------------------------------
1 | # Build
2 | build
3 | dist
4 | lib
5 | server
6 | functions/**/*.js
7 |
8 | # Development
9 | node_modules
10 |
11 | # Cache
12 | .cache
13 | .mf
14 | .vscode
15 | .rollup.cache
16 | tsconfig.tsbuildinfo
17 |
18 | # Logs
19 | logs
20 | *.log
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 | pnpm-debug.log*
25 | lerna-debug.log*
26 |
27 | # Editor
28 | !.vscode/extensions.json
29 | .idea
30 | .DS_Store
31 | *.suo
32 | *.ntvs*
33 | *.njsproj
34 | *.sln
35 | *.sw?
36 |
37 | # Yarn
38 | .yarn/*
39 | !.yarn/releases
--------------------------------------------------------------------------------
/frameworks/astro/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | // Enable top-level await, and other modern ESM features.
4 | "target": "ESNext",
5 | "module": "ESNext",
6 | // Enable node-style module resolution, for things like npm package imports.
7 | "moduleResolution": "node",
8 | // Enable JSON imports.
9 | "resolveJsonModule": true,
10 | // Enable stricter transpilation for better output.
11 | "isolatedModules": true,
12 | // Add type definitions for our Astro runtime.
13 | "types": ["astro/client"]
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/frameworks/remix/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": ["**/*.js", "**/*.jsx"],
3 | "compilerOptions": {
4 | "lib": ["DOM", "DOM.Iterable", "ES2019"],
5 | "isolatedModules": true,
6 | "esModuleInterop": true,
7 | "jsx": "react-jsx",
8 | "moduleResolution": "node",
9 | "resolveJsonModule": true,
10 | "target": "ES2019",
11 | "strict": true,
12 | "allowJs": true,
13 | "forceConsistentCasingInFileNames": true,
14 | "baseUrl": ".",
15 | "paths": {
16 | "~/*": ["./app/*"]
17 | },
18 | "noEmit": true
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/apps/components/src/components/dashboard/frameworks.ts:
--------------------------------------------------------------------------------
1 | export type Framework =
2 | | 'angular'
3 | | 'astro'
4 | | 'fresh'
5 | | 'gatsby'
6 | | 'hydrogen'
7 | | 'lit'
8 | | 'marko'
9 | | 'next'
10 | | 'nuxt2'
11 | | 'nuxt3'
12 | | 'qwik'
13 | | 'solid-start'
14 | | 'svelte';
15 |
16 | export const frameworks: Framework[] = [
17 | 'angular',
18 | 'astro',
19 | 'fresh',
20 | 'gatsby',
21 | 'hydrogen',
22 | 'lit',
23 | 'marko',
24 | 'next',
25 | 'nuxt2',
26 | 'nuxt3',
27 | 'qwik',
28 | 'solid-start',
29 | 'svelte',
30 | ];
31 |
--------------------------------------------------------------------------------
/frameworks/angular/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3 | "version": "0.2.0",
4 | "configurations": [
5 | {
6 | "name": "ng serve",
7 | "type": "pwa-chrome",
8 | "request": "launch",
9 | "preLaunchTask": "npm: start",
10 | "url": "http://localhost:4200/"
11 | },
12 | {
13 | "name": "ng test",
14 | "type": "chrome",
15 | "request": "launch",
16 | "preLaunchTask": "npm: test",
17 | "url": "http://localhost:9876/debug.html"
18 | }
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/frameworks/angular/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 |
4 | import { AppComponent } from './app.component';
5 | import { AppRoutingModule } from './app-routing.module';
6 | import AppHeader from './generated-components/components/app-header';
7 |
8 | @NgModule({
9 | declarations: [AppComponent],
10 | imports: [BrowserModule.withServerTransition({ appId: 'serverApp' }), AppRoutingModule, AppHeader],
11 | providers: [],
12 | bootstrap: [AppComponent],
13 | })
14 | export class AppModule {}
15 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Hydrogen App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/helpers/kill-process.ts:
--------------------------------------------------------------------------------
1 | import { $ } from 'zx';
2 | import { getPort } from './get-port.js';
3 |
4 | /**
5 | * Kill process by port
6 | */
7 | export async function killProcess(port: number) {
8 | return $`lsof -t -i tcp:${port} | xargs kill`.catch(() => null);
9 | }
10 |
11 | /**
12 | * Loop over all frameworks, find their port, and kill their
13 | * servers if running
14 | */
15 | export async function killAll(frameworks: string[]) {
16 | const ports = new Set(await Promise.all(frameworks.map(getPort)));
17 | return Promise.all(Array.from(ports).map(killProcess));
18 | }
19 |
--------------------------------------------------------------------------------
/frameworks/solid-start/src/routes/[...404].tsx:
--------------------------------------------------------------------------------
1 | import { Title } from "@solidjs/meta";
2 | import { HttpStatusCode } from "solid-start/server";
3 |
4 | export default function NotFound() {
5 | return (
6 |
7 | Not Found
8 |
9 | Page Not Found
10 |
11 | Visit{" "}
12 |
13 | docs.solidjs.com/start
14 | {" "}
15 | to learn how to build SolidStart apps.
16 |
17 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/frameworks/lit/sever.js:
--------------------------------------------------------------------------------
1 | const http = require('http');
2 | const express = require('express');
3 | const path = require('path');
4 | const compression = require('compression');
5 | const app = express();
6 |
7 | app.use(compression());
8 | app.use(express.json());
9 | app.use(express.static('docs'));
10 |
11 | app.use('/', function (req, res) {
12 | res.sendFile(path.join(__dirname + '/docs/index.html'));
13 | });
14 |
15 | const server = http.createServer(app);
16 | const port = Number(process.env.PORT);
17 | server.listen(port);
18 | console.debug('Server is running... http://localhost:' + port);
19 |
--------------------------------------------------------------------------------
/frameworks/remix/app/entry.server.jsx:
--------------------------------------------------------------------------------
1 | import { RemixServer } from "@remix-run/react";
2 | import { renderToString } from "react-dom/server";
3 |
4 | export default function handleRequest(
5 | request,
6 | responseStatusCode,
7 | responseHeaders,
8 | remixContext
9 | ) {
10 | let markup = renderToString(
11 |
12 | );
13 |
14 | responseHeaders.set("Content-Type", "text/html");
15 |
16 | return new Response("" + markup, {
17 | status: responseStatusCode,
18 | headers: responseHeaders,
19 | });
20 | }
21 |
--------------------------------------------------------------------------------
/apps/components/src/components/utils/sort.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Usage: array.sort(sortBy('key'))
3 | */
4 | export const sortBy = (key: any) => {
5 | return (a: any, b: any) => (a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0);
6 | };
7 |
8 | export const sortByNumeric = (key: any) => {
9 | return (a: any, b: any) => {
10 | let aVal = parseFloat(a[key]);
11 | let bVal = parseFloat(b[key]);
12 |
13 | if (isNaN(aVal)) {
14 | aVal = a[key];
15 | }
16 | if (isNaN(bVal)) {
17 | bVal = b[key];
18 | }
19 |
20 | return aVal > bVal ? 1 : bVal > aVal ? -1 : 0;
21 | };
22 | };
23 |
--------------------------------------------------------------------------------
/src/helpers/preview.ts:
--------------------------------------------------------------------------------
1 | import { $ } from 'zx';
2 | import { getPort } from './get-port.js';
3 |
4 | export async function preview(framework: string) {
5 | const port = await getPort(framework);
6 | if (!port) {
7 | throw new Error(
8 | `Could not find port for ${framework}, be sure to add it to package.json like: "port": 8080`
9 | );
10 | }
11 |
12 | const useBun = framework.endsWith('-bun');
13 |
14 | const process = $`cd frameworks/${framework} && ${
15 | useBun ? 'bun' : 'npm'
16 | } run preview`;
17 |
18 | return {
19 | process,
20 | port,
21 | };
22 | }
23 |
--------------------------------------------------------------------------------
/src/helpers/get-frameworks.ts:
--------------------------------------------------------------------------------
1 | import { fs } from 'zx';
2 |
3 | const FRAMEWORKS = process.env.FRAMEWORKS?.split(',');
4 |
5 | const IGNORE_FRAMEWORKS = ([] as string[]).concat(
6 | process.env.IGNORE_FRAMEWORKS ? process.env.IGNORE_FRAMEWORKS.split(',') : []
7 | );
8 |
9 | /**
10 | * Get the list of frameworks to test
11 | */
12 | export async function getFrameworks() {
13 | if (FRAMEWORKS) {
14 | return FRAMEWORKS;
15 | }
16 | const frameworks = await fs.readdir('./frameworks');
17 | return frameworks
18 | .filter((item) => !IGNORE_FRAMEWORKS.includes(item))
19 | .reverse();
20 | }
21 |
--------------------------------------------------------------------------------
/frameworks/lit/docs-src/_README.md:
--------------------------------------------------------------------------------
1 | This directory contains the sources for the static site contained in the /docs/ directory. The site is based on the [eleventy](11ty.dev) static site generator.
2 |
3 | The site is intended to be used with GitHub pages. To enable the site go to the GitHub settings and change the GitHub Pages "Source" setting to "master branch /docs folder".
4 |
5 | To view the site locally, run `npm run docs:serve`.
6 |
7 | To edit the site, add to or edit the files in this directory then run `npm run docs` to build the site. The built files must be checked in and pushed to GitHub to appear on GitHub pages.
8 |
--------------------------------------------------------------------------------
/frameworks/solid-ssr-node/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "port": 6018,
3 | "dependencies": {
4 | "@popperjs/core": "^2.11.6",
5 | "fuse.js": "^6.6.2",
6 | "solid-js": "^1.5.4"
7 | },
8 | "devDependencies": {
9 | "@babel/core": "^7.16.7",
10 | "@rollup/plugin-babel": "5.3.0",
11 | "@rollup/plugin-commonjs": "21.0.1",
12 | "@rollup/plugin-node-resolve": "13.1.2",
13 | "babel-preset-solid": "^1.5.4",
14 | "express": "^4.17.1",
15 | "rollup": "^2.75.5"
16 | },
17 | "type": "module",
18 | "scripts": {
19 | "build": "rollup -c",
20 | "preview": "node dist/http.js"
21 | }
22 | }
--------------------------------------------------------------------------------
/frameworks/lit/server.js:
--------------------------------------------------------------------------------
1 | const http = require('http');
2 | const express = require('express');
3 | const compression = require('compression');
4 | const path = require('path');
5 |
6 | const app = express();
7 |
8 | app.use(express.json());
9 | app.use(compression());
10 | app.use(express.static('docs'));
11 |
12 | app.use('/', function (req, res) {
13 | res.sendFile(path.join(__dirname + '/docs/index.html'));
14 | });
15 |
16 | const server = http.createServer(app);
17 | const port = Number(process.env.PORT || 6010);
18 | server.listen(port);
19 | console.debug('Server listening http://localhost:' + port + ' ...');
20 |
--------------------------------------------------------------------------------
/frameworks/react/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | const root = ReactDOM.createRoot(document.getElementById('root'));
8 | root.render(
9 |
10 |
11 |
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/frameworks/angular/server.js:
--------------------------------------------------------------------------------
1 | const http = require('http');
2 | const express = require('express');
3 | const compression = require('compression');
4 | const path = require('path');
5 |
6 | const app = express();
7 |
8 | app.use(compression());
9 | app.use(express.json());
10 | app.use(express.static('dist/angular'));
11 |
12 | app.use('/', function (req, res) {
13 | res.sendFile(path.join(__dirname + '/dist/angular/index.html'));
14 | });
15 |
16 | const server = http.createServer(app);
17 | const port = Number(process.env.PORT || 4200);
18 | server.listen(port);
19 | console.debug('Server is running... http://localhost:' + port);
20 |
--------------------------------------------------------------------------------
/frameworks/astro/src/layouts/Layout.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { AppHeader } from '../generated-components';
3 |
4 | export interface Props {
5 | title?: string;
6 | }
7 |
8 | const { title } = Astro.props as Props;
9 | ---
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {title || 'Hello Astro'}
19 |
20 |
21 |
22 | {title}
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/frameworks/react/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/frameworks/qwik/src/entry.dev.tsx:
--------------------------------------------------------------------------------
1 | import { render, RenderOptions } from '@builder.io/qwik';
2 | import Root from './root';
3 |
4 | /**
5 | * Development entry point using only client-side modules:
6 | * - Do not use this mode in production!
7 | * - No SSR
8 | * - No portion of the application is pre-rendered on the server.
9 | * - All of the application is running eagerly in the browser.
10 | * - More code is transferred to the browser than in SSR mode.
11 | * - Optimizer/Serialization/Deserialization code is not exercised!
12 | */
13 | export default function (opts: RenderOptions) {
14 | return render(document, , opts);
15 | }
16 |
--------------------------------------------------------------------------------
/frameworks/solid-start/src/root.tsx:
--------------------------------------------------------------------------------
1 | // @refresh reload
2 | import { Suspense } from 'solid-js';
3 | import {
4 | Body,
5 | FileRoutes,
6 | Head,
7 | Html,
8 | Meta,
9 | Routes,
10 | Scripts,
11 | } from 'solid-start';
12 |
13 | export default function Root() {
14 | return (
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | );
29 | }
30 |
--------------------------------------------------------------------------------
/frameworks/lit/dev/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <my-element> Demo
7 |
8 |
9 |
10 |
16 |
17 |
18 |
19 | This is child content
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/frameworks/angular/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | function bootstrap() {
12 | platformBrowserDynamic().bootstrapModule(AppModule)
13 | .catch(err => console.error(err));
14 | };
15 |
16 |
17 | if (document.readyState === 'complete') {
18 | bootstrap();
19 | } else {
20 | document.addEventListener('DOMContentLoaded', bootstrap);
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/frameworks/astro/astro.config.mjs:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'astro/config';
2 | import solid from '@astrojs/solid-js';
3 | import viteCompress from 'vite-plugin-compress';
4 | import node from '@astrojs/node';
5 | // This throws an error:
6 | // Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'node_modules/astro-compress/dist/options'
7 | // import compress from 'astro-compress';
8 |
9 | // https://astro.build/config
10 | export default defineConfig({
11 | server: {
12 | port: 6001,
13 | },
14 | vite: {
15 | plugins: [viteCompress.default()],
16 | },
17 | integrations: [solid()],
18 | adapter: node(),
19 | output: 'server',
20 | });
21 |
--------------------------------------------------------------------------------
/frameworks/marko/src/components/app-layout/index.marko:
--------------------------------------------------------------------------------
1 | import favicon from './favicon.png';
2 | import AppHeader from '../../../../../apps/components/output/marko/src/components/app-header.marko'
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | ${input.title}
12 |
13 |
14 |
15 | <${input.renderBody}/>
16 |
17 |
--------------------------------------------------------------------------------
/frameworks/marko/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "marko",
3 | "description": "The default Marko starter app",
4 | "version": "1.0.0",
5 | "port": 6002,
6 | "dependencies": {
7 | "@popperjs/core": "^2.11.6",
8 | "fuse.js": "^6.6.2",
9 | "highlight.js": "^11.6.0",
10 | "marko": "^5"
11 | },
12 | "devDependencies": {
13 | "@marko/build": "^4",
14 | "@marko/serve": "^4"
15 | },
16 | "private": true,
17 | "scripts": {
18 | "build": "marko-build ./src/pages",
19 | "dev": "marko-serve ./src/pages --port 6002",
20 | "start": "PORT=6002 NODE_ENV=production node ./build/index.js --port 6002",
21 | "preview": "npm run start"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/frameworks/next/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "next",
3 | "version": "0.1.0",
4 | "private": true,
5 | "port": 6003,
6 | "scripts": {
7 | "dev": "next dev -p 6003",
8 | "build": "next build",
9 | "start": "next start -p 6003",
10 | "lint": "next lint",
11 | "preview": "npm start"
12 | },
13 | "dependencies": {
14 | "@popperjs/core": "^2.11.6",
15 | "@types/react": "^18.0.17",
16 | "fuse.js": "^6.6.2",
17 | "highlight.js": "^11.6.0",
18 | "next": "12.2.3",
19 | "react": "18.2.0",
20 | "react-dom": "18.2.0"
21 | },
22 | "devDependencies": {
23 | "eslint": "8.21.0",
24 | "eslint-config-next": "12.2.3"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/frameworks/angular/.browserslistrc:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # For the full list of supported browsers by the Angular framework, please see:
6 | # https://angular.io/guide/browser-support
7 |
8 | # You can see what browsers were selected by your queries by running:
9 | # npx browserslist
10 |
11 | last 1 Chrome version
12 | last 1 Firefox version
13 | last 2 Edge major versions
14 | last 2 Safari major versions
15 | last 2 iOS major versions
16 | Firefox ESR
17 |
--------------------------------------------------------------------------------
/frameworks/lit/web-dev-server.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @license
3 | * Copyright 2021 Google LLC
4 | * SPDX-License-Identifier: BSD-3-Clause
5 | */
6 |
7 | import {legacyPlugin} from '@web/dev-server-legacy';
8 |
9 | const mode = process.env.MODE || 'dev';
10 | if (!['dev', 'prod'].includes(mode)) {
11 | throw new Error(`MODE must be "dev" or "prod", was "${mode}"`);
12 | }
13 |
14 | export default {
15 | nodeResolve: {exportConditions: mode === 'dev' ? ['development'] : []},
16 | preserveSymlinks: true,
17 | plugins: [
18 | legacyPlugin({
19 | polyfills: {
20 | // Manually imported in index.html file
21 | webcomponents: false,
22 | },
23 | }),
24 | ],
25 | };
26 |
--------------------------------------------------------------------------------
/frameworks/solid-ssr-node/rollup.config.js:
--------------------------------------------------------------------------------
1 | import nodeResolve from '@rollup/plugin-node-resolve';
2 | import common from '@rollup/plugin-commonjs';
3 | import babel from '@rollup/plugin-babel';
4 |
5 | export default {
6 | input: 'http.jsx',
7 | output: [
8 | {
9 | file: 'dist/http.js',
10 | format: 'esm'
11 | },
12 | ],
13 | external: ['solid-js', 'solid-js/web', 'path', 'stream', 'http'],
14 | plugins: [
15 | nodeResolve({ preferBuiltins: true, exportConditions: ['solid', 'node'] }),
16 | babel({
17 | babelHelpers: 'bundled',
18 | presets: [['solid', { generate: 'ssr' }]],
19 | }),
20 | common(),
21 | ],
22 | preserveEntrySignatures: false,
23 | };
24 |
--------------------------------------------------------------------------------
/frameworks/remix/app/root.jsx:
--------------------------------------------------------------------------------
1 | import {
2 | Links,
3 | LiveReload,
4 | Meta,
5 | Outlet,
6 | Scripts,
7 | ScrollRestoration,
8 | useLocation,
9 | } from '@remix-run/react';
10 | import { AppHeader } from '../components/generated-components';
11 |
12 | export const meta = () => ({
13 | charset: 'utf-8',
14 | title: 'New Remix App',
15 | viewport: 'width=device-width,initial-scale=1',
16 | });
17 |
18 | export default function App() {
19 | const { pathname } = useLocation();
20 | return (
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | );
30 | }
31 |
--------------------------------------------------------------------------------
/frameworks/qwik/src/entry.http.tsx:
--------------------------------------------------------------------------------
1 | import http from 'http';
2 | import render from './entry.ssr';
3 |
4 |
5 | const port = Number(process.env.port || 6006);
6 |
7 | http.createServer(function (req, res) {
8 |
9 | res.writeHead(200, {
10 | 'Content-Type': 'text/html',
11 | 'Cache-Control': 'no-transform',
12 | });
13 | render({}).then((r) => {
14 | res.end(r.html);
15 | })
16 | }).listen(port);
17 |
18 | console.log(`Listening at http://localhost:${port}`);
19 |
20 | // import http from 'http';
21 | // import render from './entry.ssr';
22 |
23 |
24 | // async function main() {
25 | // for (let i = 0; i < 1000; i++) {
26 | // await render({})
27 | // }
28 | // }
29 |
30 | // main();
31 |
32 |
33 |
--------------------------------------------------------------------------------
/frameworks/qwik/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowJs": true,
4 | "target": "ES2017",
5 | "module": "ES2020",
6 | "lib": ["es2020", "DOM"],
7 | "jsx": "react-jsx",
8 | "jsxImportSource": "@builder.io/qwik",
9 | "strict": true,
10 | "declaration": true,
11 | "declarationDir": "lib/types",
12 | "resolveJsonModule": true,
13 | "moduleResolution": "node",
14 | "esModuleInterop": true,
15 | "skipLibCheck": true,
16 | "incremental": true,
17 | "isolatedModules": true,
18 | "types": ["vite/client"],
19 | "paths": {
20 | "~/*": ["./src/*"]
21 | }
22 | },
23 | "include": ["src"],
24 | "exclude": ["**/generated-components/**/*.js"]
25 | }
26 |
--------------------------------------------------------------------------------
/apps/components/output/vue/nuxt.js:
--------------------------------------------------------------------------------
1 | import { join } from 'path';
2 |
3 | export default function () {
4 | // Make sure components is enabled
5 | if (!this.nuxt.options.components) {
6 | throw new Error(
7 | 'Please set `components: true` inside `nuxt.config` and ensure using `nuxt >= 2.13.0`'
8 | );
9 | }
10 |
11 | this.nuxt.hook('components:dirs', (dirs) => {
12 | // Add ./components dir to the list
13 | dirs.push({
14 | path: join(__dirname, 'vue2/src/components'),
15 | prefix: 'builder',
16 | });
17 | // Add ./blocks dir to the list
18 | dirs.push({
19 | path: join(__dirname, 'vue2/src/blocks'),
20 | prefix: 'builder',
21 | pattern: '**/index.*',
22 | });
23 | });
24 | }
25 |
--------------------------------------------------------------------------------
/frameworks/lit/.eleventy.cjs:
--------------------------------------------------------------------------------
1 | const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight');
2 |
3 | module.exports = function (eleventyConfig) {
4 | eleventyConfig.addPlugin(syntaxHighlight);
5 | eleventyConfig.addPassthroughCopy('docs-src/docs.css');
6 | eleventyConfig.addPassthroughCopy('docs-src/.nojekyll');
7 | eleventyConfig.addPassthroughCopy(
8 | 'node_modules/@webcomponents/webcomponentsjs'
9 | );
10 | eleventyConfig.addPassthroughCopy('node_modules/lit/polyfill-support.js');
11 | return {
12 | dir: {
13 | input: 'docs-src',
14 | output: 'docs',
15 | },
16 | templateExtensionAliases: {
17 | '11ty.cjs': '11ty.js',
18 | '11tydata.cjs': '11tydata.js',
19 | },
20 | };
21 | };
22 |
--------------------------------------------------------------------------------
/src/helpers/install.ts:
--------------------------------------------------------------------------------
1 | import { $ } from 'zx';
2 | import { getFrameworks } from './get-frameworks.js';
3 |
4 | export async function install(framework: string, packageName?: string) {
5 | return $`cd frameworks/${framework} && npm install ${packageName || ''}`;
6 | }
7 |
8 | // Fresh uses deno, so we do not npm install dependencies
9 | const noInstallFrameworks = new Set(['fresh']);
10 |
11 | export async function installAll(frameworks?: string[], packageName?: string) {
12 | if (!frameworks) {
13 | frameworks = await getFrameworks();
14 | }
15 | return Promise.all(
16 | frameworks
17 | .filter((framework) => !noInstallFrameworks.has(framework))
18 | .map((framework) => install(framework, packageName))
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/frameworks/vue3/src/router/index.ts:
--------------------------------------------------------------------------------
1 | import { createRouter, createWebHistory } from 'vue-router';
2 |
3 | const router = createRouter({
4 | history: createWebHistory(import.meta.env.BASE_URL),
5 | routes: [
6 | {
7 | path: '/',
8 | name: 'home',
9 | component: () =>
10 | import('../generated-components/components/hello-world.vue'),
11 | },
12 | {
13 | path: '/todo',
14 | name: 'todo',
15 | component: () => import('../generated-components/components/todo-app.vue'),
16 | },
17 | {
18 | path: '/dashboard',
19 | name: 'dashboard',
20 | component: () => import('../generated-components/components/dashboard.vue'),
21 | },
22 | ],
23 | });
24 |
25 | export default router;
26 |
--------------------------------------------------------------------------------
/frameworks/angular/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # Compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 | /bazel-out
8 |
9 | # Node
10 | /node_modules
11 | npm-debug.log
12 | yarn-error.log
13 |
14 | # IDEs and editors
15 | .idea/
16 | .project
17 | .classpath
18 | .c9/
19 | *.launch
20 | .settings/
21 | *.sublime-workspace
22 |
23 | # Visual Studio Code
24 | .vscode/*
25 | !.vscode/settings.json
26 | !.vscode/tasks.json
27 | !.vscode/launch.json
28 | !.vscode/extensions.json
29 | .history/*
30 |
31 | # Miscellaneous
32 | /.angular/cache
33 | .sass-cache/
34 | /connect.lock
35 | /coverage
36 | /libpeerconnection.log
37 | testem.log
38 | /typings
39 |
40 | # System files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/frameworks/gatsby/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gatsby",
3 | "version": "1.0.0",
4 | "private": true,
5 | "description": "gatsby",
6 | "author": "Chris LaRocque",
7 | "keywords": [
8 | "gatsby"
9 | ],
10 | "port": 8001,
11 | "scripts": {
12 | "develop": "gatsby develop -p 8001",
13 | "dev": "npm run develop",
14 | "start": "gatsby develop -p 8001",
15 | "build": "gatsby build",
16 | "serve": "gatsby serve -p 8001",
17 | "clean": "gatsby clean",
18 | "preview": "npm run serve"
19 | },
20 | "dependencies": {
21 | "@popperjs/core": "^2.11.6",
22 | "fuse.js": "^6.6.2",
23 | "gatsby": "^4.20.0",
24 | "highlight.js": "^11.6.0",
25 | "react": "^18.1.0",
26 | "react-dom": "^18.1.0"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/frameworks/angular/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/frameworks/marko/README.md:
--------------------------------------------------------------------------------
1 | # Thanks for checking out Marko
2 |
3 | # Installation
4 |
5 | ```
6 | npx @marko/create marko-app --template basic
7 | cd marko-app
8 | npm install
9 | npm run dev
10 | ```
11 |
12 | ## Overview
13 |
14 | This project is powered by `@marko/serve` and `@marko/build`.
15 |
16 | - Run `npm run dev` to start the development server
17 | - Run `npm run build` to build a production-ready node.js server
18 | - Run `npm start` to run the production server
19 |
20 | ## Adding Pages
21 |
22 | Pages map to the directory structure. You can add additional pages by creating files/directories under `src/pages` with `.marko` files. Learn more in the [`@marko/serve` docs](https://github.com/marko-js/cli/blob/master/packages/serve/README.md).
23 |
24 |
--------------------------------------------------------------------------------
/frameworks/angular/src/main.server.ts:
--------------------------------------------------------------------------------
1 | /***************************************************************************************************
2 | * Initialize the server environment - for example, adding DOM built-in types to the global scope.
3 | *
4 | * NOTE:
5 | * This import must come before any imports (direct or transitive) that rely on DOM built-ins being
6 | * available, such as `@angular/elements`.
7 | */
8 | import '@angular/platform-server/init';
9 |
10 | import { enableProdMode } from '@angular/core';
11 |
12 | import { environment } from './environments/environment';
13 |
14 | if (environment.production) {
15 | enableProdMode();
16 | }
17 |
18 | export { AppServerModule } from './app/app.server.module';
19 | export { renderModule } from '@angular/platform-server';
20 |
--------------------------------------------------------------------------------
/frameworks/remix/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "sideEffects": false,
4 | "scripts": {
5 | "build": "remix build",
6 | "dev": "remix dev",
7 | "start": "remix-serve build",
8 | "preview": "PORT=6007 npm start"
9 | },
10 | "port": 6007,
11 | "dependencies": {
12 | "@popperjs/core": "^2.11.6",
13 | "@remix-run/node": "^1.6.7",
14 | "@remix-run/react": "^1.6.7",
15 | "@remix-run/serve": "^1.6.7",
16 | "fuse.js": "^6.6.2",
17 | "highlight.js": "^11.6.0",
18 | "react": "^17.0.2",
19 | "react-dom": "^17.0.2"
20 | },
21 | "devDependencies": {
22 | "@remix-run/dev": "^1.6.7",
23 | "@remix-run/eslint-config": "^1.6.7",
24 | "eslint": "^8.20.0"
25 | },
26 | "engines": {
27 | "node": ">=14"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/src/App.server.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import renderHydrogen from '@shopify/hydrogen/entry-server';
3 | import { Router, FileRoutes, ShopifyProvider } from '@shopify/hydrogen';
4 | import { Suspense } from 'react';
5 | import { useUrl } from '@shopify/hydrogen';
6 | import AppHeader from './generated-components/components/app-header';
7 |
8 | function App() {
9 | const url = useUrl();
10 |
11 | return (
12 | <>
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | >
22 | );
23 | }
24 |
25 | export default renderHydrogen(App);
26 |
--------------------------------------------------------------------------------
/frameworks/vue3/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue3",
3 | "version": "0.0.0",
4 | "port": 6013,
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "npm run build-only",
8 | "preview": "vite preview --port 6013",
9 | "build-only": "vite build",
10 | "type-check": "vue-tsc --noEmit"
11 | },
12 | "dependencies": {
13 | "@popperjs/core": "^2.11.6",
14 | "fuse.js": "^6.6.2",
15 | "vite-plugin-compress": "^2.1.1",
16 | "vue": "^3.2.37",
17 | "vue-router": "^4.1.3"
18 | },
19 | "devDependencies": {
20 | "@types/node": "^16.11.47",
21 | "@vitejs/plugin-vue": "^3.0.1",
22 | "@vue/tsconfig": "^0.1.3",
23 | "npm-run-all": "^4.1.5",
24 | "typescript": "~4.7.4",
25 | "vite": "^3.0.4",
26 | "vue-tsc": "^0.39.5"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/frameworks/fresh/import_map.json:
--------------------------------------------------------------------------------
1 | {
2 | "imports": {
3 | "$fresh/": "https://deno.land/x/fresh@1.0.2/",
4 | "preact": "https://esm.sh/preact@10.10.0",
5 | "preact/": "https://esm.sh/preact@10.10.0/",
6 | "preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.1?external=preact",
7 | "@twind": "./utils/twind.ts",
8 | "twind": "https://esm.sh/twind@0.16.17",
9 | "highlight.js": "https://esm.sh/highlight.js@11.6.0",
10 | "highlight.js/": "https://esm.sh/highlight.js@11.6.0/",
11 | "fuse.js": "https://esm.sh/fuse.js",
12 | "fuse.js/": "https://esm.sh/fuse.js/",
13 | "@popperjs/core": "https://esm.sh/@popperjs/core",
14 | "@popperjs/core/": "https://esm.sh/@popperjs/core/",
15 | "twind/": "https://esm.sh/twind@0.16.17/"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/frameworks/nuxt3/README.md:
--------------------------------------------------------------------------------
1 | # Nuxt 3 Minimal Starter
2 |
3 | Look at the [nuxt 3 documentation](https://v3.nuxtjs.org) to learn more.
4 |
5 | ## Setup
6 |
7 | Make sure to install the dependencies:
8 |
9 | ```bash
10 | # yarn
11 | yarn install
12 |
13 | # npm
14 | npm install
15 |
16 | # pnpm
17 | pnpm install --shamefully-hoist
18 | ```
19 |
20 | ## Development Server
21 |
22 | Start the development server on http://localhost:3000
23 |
24 | ```bash
25 | npm run dev
26 | ```
27 |
28 | ## Production
29 |
30 | Build the application for production:
31 |
32 | ```bash
33 | npm run build
34 | ```
35 |
36 | Locally preview production build:
37 |
38 | ```bash
39 | npm run preview
40 | ```
41 |
42 | Checkout the [deployment documentation](https://v3.nuxtjs.org/guide/deploy/presets) for more information.
43 |
--------------------------------------------------------------------------------
/frameworks/astro/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@example/basics",
3 | "version": "0.0.1",
4 | "private": true,
5 | "port": 6001,
6 | "type": "module",
7 | "scripts": {
8 | "dev": "astro dev",
9 | "start": "astro dev",
10 | "build": "astro build",
11 | "ssg:preview": "astro preview",
12 | "preview": "node server.mjs",
13 | "bun:preview": "bun server.mjs"
14 | },
15 | "dependencies": {
16 | "@astrojs/node": "^1.0.0",
17 | "@popperjs/core": "^2.11.6",
18 | "express": "^4.18.1",
19 | "fuse.js": "^6.6.2",
20 | "highlight.js": "^11.6.0",
21 | "vite-plugin-compress": "^2.1.1"
22 | },
23 | "devDependencies": {
24 | "@astrojs/solid-js": "^1.0.0",
25 | "astro": "^1.0.6",
26 | "astro-compress": "^1.0.1",
27 | "solid-js": "^1.4.8"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/frameworks/lit/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2019",
4 | "module": "es2020",
5 | "lib": ["es2020", "DOM", "DOM.Iterable"],
6 | "declaration": true,
7 | "declarationMap": true,
8 | "sourceMap": true,
9 | "inlineSources": true,
10 | "outDir": "./dist",
11 | "rootDir": "./src",
12 | "strict": false,
13 | "moduleResolution": "node",
14 | "allowSyntheticDefaultImports": true,
15 | "experimentalDecorators": true,
16 | "forceConsistentCasingInFileNames": true,
17 | "allowJs": true,
18 | "checkJs": false,
19 | "plugins": [
20 | {
21 | "name": "ts-lit-plugin",
22 | "strict": false
23 | }
24 | ]
25 | },
26 | "include": ["src/**/*.tsx", "src/**/*.ts", "src/**/*.js"],
27 | "exclude": []
28 | }
29 |
--------------------------------------------------------------------------------
/frameworks/svelte/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "svelte",
3 | "version": "0.0.1",
4 | "port": 6009,
5 | "scripts": {
6 | "dev": "vite dev --port 6009",
7 | "build": "vite build",
8 | "package": "svelte-kit package",
9 | "preview": "vite preview --port 6009",
10 | "lint": "prettier --check --plugin-search-dir=. .",
11 | "format": "prettier --write --plugin-search-dir=. ."
12 | },
13 | "dependencies": {
14 | "@popperjs/core": "^2.11.6",
15 | "fuse.js": "^6.6.2",
16 | "highlight.js": "^11.6.0",
17 | "svelte-preprocess": "^4.10.7"
18 | },
19 | "devDependencies": {
20 | "@sveltejs/adapter-auto": "next",
21 | "@sveltejs/kit": "next",
22 | "prettier": "^2.6.2",
23 | "prettier-plugin-svelte": "^2.7.0",
24 | "svelte": "^3.44.0",
25 | "vite": "^3.0.0"
26 | },
27 | "type": "module"
28 | }
29 |
--------------------------------------------------------------------------------
/frameworks/solid-start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "solid-start",
3 | "port": 6008,
4 | "scripts": {
5 | "dev": "solid-start dev --port 6008",
6 | "build": "solid-start build",
7 | "start": "PORT=6008 solid-start start --port 6008",
8 | "preview": "npm start"
9 | },
10 | "type": "module",
11 | "dependencies": {
12 | "@popperjs/core": "^2.11.6",
13 | "fuse.js": "^6.6.2",
14 | "highlight.js": "^11.6.0"
15 | },
16 | "devDependencies": {
17 | "@solidjs/meta": "^0.28.0",
18 | "@solidjs/router": "^0.4.2",
19 | "solid-js": "^1.5.4",
20 | "solid-start": "0.1.0-alpha.102",
21 | "solid-start-node": "0.1.0-alpha.102",
22 | "typescript": "^4.4.3",
23 | "undici": "^5.8.0",
24 | "vite": "^3.0.4"
25 | },
26 | "engines": {
27 | "node": ">=14"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/src/assets/favicon.svg:
--------------------------------------------------------------------------------
1 |
29 |
--------------------------------------------------------------------------------
/frameworks/solid-ssr-node/http.jsx:
--------------------------------------------------------------------------------
1 | import { renderToString } from 'solid-js/web';
2 | import Dashboard from './generated-components/components/dashboard.jsx';
3 | import AppHeader from './generated-components/components/app-header.jsx';
4 | import http from 'http';
5 |
6 | const App = () => (
7 |
8 |
9 |
10 |
11 |
12 |
13 | );
14 | const port = Number(process.env.port || 6018);
15 |
16 | http
17 | .createServer(function (req, res) {
18 | const str = renderToString(() => );
19 | res.writeHead(200, {
20 | 'Content-Type': 'text/html',
21 | 'Cache-Control': 'no-transform',
22 | });
23 | res.end(str);
24 | })
25 | .listen(port);
26 |
27 | console.log(`Listening at http://localhost:${port}`);
--------------------------------------------------------------------------------
/frameworks/hydrogen/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hydrogen",
3 | "description": "An example using JavaScript in Hydrogen",
4 | "version": "0.0.0",
5 | "license": "MIT",
6 | "port": 6011,
7 | "private": true,
8 | "scripts": {
9 | "dev": "PORT=6011 shopify hydrogen dev",
10 | "build": "shopify hydrogen build",
11 | "preview": "PORT=6011 shopify hydrogen preview --port 6011"
12 | },
13 | "devDependencies": {
14 | "@shopify/cli": "3.7.1",
15 | "@shopify/cli-hydrogen": "3.7.1",
16 | "vite": "^2.9.0"
17 | },
18 | "dependencies": {
19 | "@popperjs/core": "^2.11.6",
20 | "@shopify/hydrogen": "^1.2.0",
21 | "fuse.js": "^6.6.2",
22 | "highlight.js": "^11.6.0",
23 | "react": "^18.2.0",
24 | "react-dom": "^18.2.0",
25 | "vite-plugin-compress": "^2.1.1"
26 | },
27 | "author": "stephensewell"
28 | }
29 |
--------------------------------------------------------------------------------
/frameworks/angular/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: {
11 | context(path: string, deep?: boolean, filter?: RegExp): {
12 | (id: string): T;
13 | keys(): string[];
14 | };
15 | };
16 |
17 | // First, initialize the Angular testing environment.
18 | getTestBed().initTestEnvironment(
19 | BrowserDynamicTestingModule,
20 | platformBrowserDynamicTesting(),
21 | );
22 |
23 | // Then we find all the tests.
24 | const context = require.context('./', true, /\.spec\.ts$/);
25 | // And load the modules.
26 | context.keys().forEach(context);
27 |
--------------------------------------------------------------------------------
/frameworks/angular/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 |
4 | const routes: Routes = [
5 | {
6 | path: '',
7 | loadComponent: async () =>
8 | (await import('./generated-components/components/hello-world')).default,
9 | },
10 | {
11 | path: 'todo',
12 | loadComponent: async () =>
13 | (await import('./generated-components/components/todo-app')).default,
14 | },
15 | {
16 | path: 'dashboard',
17 | loadComponent: async () =>
18 | (await import('./generated-components/components/dashboard')).default,
19 | },
20 | ];
21 |
22 | @NgModule({
23 | imports: [
24 | RouterModule.forRoot(routes, {
25 | initialNavigation: 'enabledBlocking',
26 | }),
27 | ],
28 | exports: [RouterModule],
29 | })
30 | export class AppRoutingModule {}
31 |
--------------------------------------------------------------------------------
/frameworks/preact-ssr-node/http.jsx:
--------------------------------------------------------------------------------
1 | /** @jsx h */
2 | import { h } from 'preact';
3 | import { render } from 'preact-render-to-string';
4 | import Dashboard from './generated-components/components/dashboard.js';
5 | import AppHeader from './generated-components/components/app-header.js';
6 | import http from 'http';
7 |
8 | const App = () => (
9 |
10 |
11 |
12 |
13 |
14 |
15 | );
16 | const port = Number(process.env.port || 6017);
17 |
18 | http
19 | .createServer(function (req, res) {
20 | const str = render();
21 | res.writeHead(200, {
22 | 'Content-Type': 'text/html',
23 | 'Cache-Control': 'no-transform',
24 | });
25 | res.end(str);
26 | })
27 | .listen(port);
28 |
29 | console.log(`Listening at http://localhost:${port}`);
30 |
--------------------------------------------------------------------------------
/apps/components/src/root-styles.ts:
--------------------------------------------------------------------------------
1 | export const rootStyles = `
2 | :root {
3 | /* Space */
4 | --s1: 5px;
5 | --s2: calc(var(--s1) * 2);
6 | --s3: calc(var(--s1) * 4);
7 | --gray-1: #eee;
8 | --gray-2: #bbb;
9 | --gray-3: #999;
10 | --gray-4: #666;
11 | --gray-5: #333;
12 | --border-gray: 1px solid var(--gray-2);
13 | --shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
14 | --shadow-2: 0 1px 10px rgba(0, 0, 0, 0.1);
15 | --round: 4px;
16 | --primary: rgb(26, 115, 232);
17 | --mobile: 640px;
18 | --font-medium: 400;
19 | }
20 |
21 | ul, ol {
22 | list-style-type: none;
23 | margin: 0;
24 | padding: 0;
25 | }
26 |
27 | body {
28 | margin: 0;
29 | font-family: Avenir, Helvetica, sans-serif;
30 | }
31 |
32 | a {
33 | text-decoration: none;
34 | }
35 | `;
36 |
37 | export const rootStylesTag = ``;
38 |
--------------------------------------------------------------------------------
/apps/components/src/components/utils/generate-csv.ts:
--------------------------------------------------------------------------------
1 | export function downloadFile(name: string, contents: string) {
2 | const link = document.createElement('a');
3 | link.setAttribute('download', name);
4 | link.href = URL.createObjectURL(
5 | new Blob([contents], {
6 | type: 'text/csv',
7 | })
8 | );
9 | document.body.appendChild(link);
10 | link.click();
11 | link.remove();
12 | }
13 |
14 | function escapeQuote(str: string) {
15 | return String(str).replace(/"/g, '""');
16 | }
17 |
18 | export function downloadCsv(data: any[], name = 'results.csv') {
19 | const rows = data;
20 | const keys = Object.keys(rows[0] || {});
21 | const csv = [
22 | keys.map((key) => `"${escapeQuote(key)}"`).join(','),
23 | ...rows.map((obj: any) => {
24 | return keys.map((key) => `"${escapeQuote(obj[key])}"`).join(',');
25 | }),
26 | ];
27 | downloadFile(name, csv.join('\n'));
28 | }
29 |
--------------------------------------------------------------------------------
/src/helpers/build.ts:
--------------------------------------------------------------------------------
1 | import { $ } from 'zx';
2 |
3 | /**
4 | * Build a list of frameworks
5 | */
6 | export async function build(frameworks: string[], parallel = true) {
7 | const buildResults: Record = {};
8 |
9 | if (parallel) {
10 | await Promise.all(
11 | frameworks.map(async (framework) => {
12 | buildResults[framework] = await buildFramework(framework);
13 | })
14 | );
15 | } else {
16 | for (const framework of frameworks) {
17 | buildResults[framework] = await buildFramework(framework);
18 | }
19 | }
20 |
21 | return buildResults;
22 | }
23 |
24 | /**
25 | * Build a single framework
26 | */
27 | export async function buildFramework(framework: string) {
28 | const start = Date.now();
29 | const useBun = framework.endsWith('-bun');
30 | await $`cd frameworks/${framework} && ${useBun ? 'bun' : 'npm'} run build`;
31 | return Date.now() - start;
32 | }
33 |
--------------------------------------------------------------------------------
/frameworks/fresh/main.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 |
7 | import { InnerRenderFunction, RenderContext, start } from "$fresh/server.ts";
8 | import manifest from "./fresh.gen.ts";
9 |
10 | import { config, setup } from "@twind";
11 | import { virtualSheet } from "twind/sheets";
12 |
13 | const sheet = virtualSheet();
14 | sheet.reset();
15 | setup({ ...config, sheet });
16 |
17 | function render(ctx: RenderContext, render: InnerRenderFunction) {
18 | const snapshot = ctx.state.get("twind") as unknown[] | null;
19 | sheet.reset(snapshot || undefined);
20 | render();
21 | ctx.styles.splice(0, ctx.styles.length, ...(sheet).target);
22 | const newSnapshot = sheet.reset();
23 | ctx.state.set("twind", newSnapshot);
24 | }
25 |
26 | await start(manifest, { render });
27 |
--------------------------------------------------------------------------------
/frameworks/lit/docs-src/install.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page.11ty.cjs
3 | title: ⌲ Install
4 | ---
5 |
6 | # Install
7 |
8 | `` is distributed on npm, so you can install it locally or use it via npm CDNs like unpkg.com.
9 |
10 | ## Local Installation
11 |
12 | ```bash
13 | npm i my-element
14 | ```
15 |
16 | ## CDN
17 |
18 | npm CDNs like [unpkg.com]() can directly serve files that have been published to npm. This works great for standard JavaScript modules that the browser can load natively.
19 |
20 | For this element to work from unpkg.com specifically, you need to include the `?module` query parameter, which tells unpkg.com to rewrite "bare" module specifiers to full URLs.
21 |
22 | ### HTML
23 |
24 | ```html
25 |
26 | ```
27 |
28 | ### JavaScript
29 |
30 | ```html
31 | import {MyElement} from 'https://unpkg.com/my-element?module';
32 | ```
33 |
--------------------------------------------------------------------------------
/frameworks/nuxt2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nuxt2",
3 | "version": "1.0.0",
4 | "private": true,
5 | "port": 6004,
6 | "scripts": {
7 | "dev": "nuxt -p 6004",
8 | "build": "nuxt build",
9 | "start": "nuxt start -p 6004",
10 | "generate": "nuxt generate",
11 | "preview": "npm start",
12 | "lint:prettier": "prettier --check .",
13 | "lint": "npm run lint:prettier",
14 | "lintfix": "prettier --write --list-different ."
15 | },
16 | "dependencies": {
17 | "@nuxt/typescript-build": "^2.1.0",
18 | "@popperjs/core": "^2.11.6",
19 | "core-js": "^3.19.3",
20 | "fuse.js": "^6.6.2",
21 | "highlight.js": "^11.6.0",
22 | "nuxt": "^2.15.8",
23 | "vue": "^2.6.14",
24 | "vue-server-renderer": "^2.6.14",
25 | "vue-template-compiler": "^2.6.14",
26 | "webpack": "^4.46.0"
27 | },
28 | "devDependencies": {
29 | "eslint-config-prettier": "^8.3.0",
30 | "prettier": "^2.5.1"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/scripts/build.ts:
--------------------------------------------------------------------------------
1 | import chalk from 'chalk';
2 | import { build } from '../helpers/build.js';
3 | import { getFrameworks } from '../helpers/get-frameworks.js';
4 | import { sortBy } from '../helpers/sort-by.js';
5 |
6 | const frameworks = await getFrameworks();
7 |
8 | console.info(chalk.green(`Building frameworks...`));
9 | const times = await build(frameworks, process.env.PARALLEL !== 'false');
10 |
11 | console.table(getTable(times));
12 |
13 | function getTable(results: Record) {
14 | const table = Object.keys(results)
15 | // Add the framework name to the object
16 | .map((framework) => ({
17 | name: framework,
18 | time: results[framework],
19 | }))
20 | // Rank by tti
21 | .sort(sortBy('time'))
22 | // Pick the display values
23 | .map((item) => ({
24 | Name: item.name,
25 | 'Build Time (Seconds)': Math.round(item.time / 100) / 10,
26 | }));
27 |
28 | return table;
29 | }
30 |
--------------------------------------------------------------------------------
/frameworks/fresh/fresh.gen.ts:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT. This file is generated by fresh.
2 | // This file SHOULD be checked into source version control.
3 | // This file is automatically updated during development when running `dev.ts`.
4 |
5 | import * as $0 from "./routes/[name].tsx";
6 | import * as $1 from "./routes/api/joke.ts";
7 | import * as $2 from "./routes/dashboard.tsx";
8 | import * as $3 from "./routes/index.tsx";
9 | import * as $4 from "./routes/todo.tsx";
10 | import * as $$0 from "./islands/Dashboard.tsx";
11 | import * as $$1 from "./islands/Todo.tsx";
12 |
13 | const manifest = {
14 | routes: {
15 | "./routes/[name].tsx": $0,
16 | "./routes/api/joke.ts": $1,
17 | "./routes/dashboard.tsx": $2,
18 | "./routes/index.tsx": $3,
19 | "./routes/todo.tsx": $4,
20 | },
21 | islands: {
22 | "./islands/Dashboard.tsx": $$0,
23 | "./islands/Todo.tsx": $$1,
24 | },
25 | baseUrl: import.meta.url,
26 | };
27 |
28 | export default manifest;
29 |
--------------------------------------------------------------------------------
/frameworks/angular/tsconfig.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "compileOnSave": false,
4 | "compilerOptions": {
5 | "baseUrl": "./",
6 | "outDir": "./dist/out-tsc",
7 | "forceConsistentCasingInFileNames": true,
8 | "strict": false,
9 | "noFallthroughCasesInSwitch": true,
10 | "sourceMap": true,
11 | "declaration": false,
12 | "downlevelIteration": true,
13 | "experimentalDecorators": true,
14 | "moduleResolution": "node",
15 | "importHelpers": true,
16 | "target": "es2020",
17 | "module": "es2020",
18 | "types": ["node"],
19 | "lib": ["es2020", "dom"],
20 | "paths": {
21 | "@angular/*": ["./node_modules/@angular/*"]
22 | }
23 | },
24 | "angularCompilerOptions": {
25 | "enableI18nLegacyMessageIdFormat": false,
26 | "strictInjectionParameters": false,
27 | "strictInputAccessModifiers": false,
28 | "strictTemplates": false
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/apps/components/src/components/general/code-viewer.lite.tsx:
--------------------------------------------------------------------------------
1 | import { hljs } from './highlight.js';
2 |
3 | export type CodeViewerProps = {
4 | code: string;
5 | language: 'json' | 'javascript' | 'typescript';
6 | style?: any;
7 | };
8 |
9 | export default function CodeViewer(props: CodeViewerProps) {
10 | return (
11 |
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/frameworks/hydrogen/README.md:
--------------------------------------------------------------------------------
1 | # JavaScript Example
2 |
3 | Hydrogen is a React framework and SDK that you can use to build fast and dynamic Shopify custom storefronts.
4 |
5 | [Check out the docs](https://shopify.dev/custom-storefronts/hydrogen)
6 |
7 | [Run this template on StackBlitz](https://stackblitz.com/github/Shopify/hydrogen/tree/stackblitz/templates/hello-world-js)
8 |
9 | ## Getting started
10 |
11 | **Requirements:**
12 |
13 | - Node.js version 16.5.0 or higher
14 | - Yarn
15 |
16 | ```bash
17 | npm init @shopify/hydrogen@latest --template hello-world-ts
18 | ```
19 |
20 | Remember to update `hydrogen.config.js` with your shop's domain and Storefront API token!
21 |
22 | ## Building for production
23 |
24 | ```bash
25 | yarn build
26 | ```
27 |
28 | ## Previewing a production build
29 |
30 | To run a local preview of your Hydrogen app in an environment similar to Oxygen, build your Hydrogen app and then run `yarn preview`:
31 |
32 | ```bash
33 | yarn build
34 | yarn preview
35 | ```
36 |
--------------------------------------------------------------------------------
/frameworks/qwik/src/components/head/head.tsx:
--------------------------------------------------------------------------------
1 | import { component$ } from '@builder.io/qwik';
2 | import { useDocumentHead, useLocation } from '@builder.io/qwik-city';
3 | import global from '../../global.css?inline';
4 |
5 | export const Head = component$(() => {
6 | const head = useDocumentHead();
7 | const loc = useLocation();
8 |
9 | return (
10 |
11 |
12 |
13 | {head.title ? `${head.title} - Qwik` : `Qwik`}
14 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/apps/components/src/components/dashboard/framework-picker.lite.tsx:
--------------------------------------------------------------------------------
1 | import { useStore } from '@builder.io/mitosis';
2 | import { Framework } from './frameworks';
3 | import { fuse } from './search';
4 |
5 | export interface FrameworkPickerProps {
6 | value: Framework;
7 | onChange: (framework: Framework) => void;
8 | }
9 |
10 | export default function FrameworkPicker(props: FrameworkPickerProps) {
11 | const state = useStore({
12 | searchString: '',
13 | openDropdown: false,
14 | getFilteredResults() {
15 | return fuse.search(state.searchString);
16 | },
17 | });
18 | return (
19 |
20 |
(state.openDropdown = !state.openDropdown)}>
21 | {props.value}
22 |
23 | {state.openDropdown && (
24 |
25 | (state.searchString = event.target.value)}
28 | />
29 | {state.getFilteredResults().map((result) => (
30 |
40 | ))}
41 |
42 | )}
43 |
44 | );
45 | }
46 |
--------------------------------------------------------------------------------
/frameworks/lit/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "extends": [
4 | "eslint:recommended",
5 | "plugin:@typescript-eslint/eslint-recommended",
6 | "plugin:@typescript-eslint/recommended"
7 | ],
8 | "parser": "@typescript-eslint/parser",
9 | "parserOptions": {
10 | "ecmaVersion": 2020,
11 | "sourceType": "module"
12 | },
13 | "plugins": ["@typescript-eslint"],
14 | "env": {
15 | "browser": true
16 | },
17 | "rules": {
18 | "no-prototype-builtins": "off",
19 | "@typescript-eslint/ban-types": "off",
20 | "@typescript-eslint/explicit-function-return-type": "off",
21 | "@typescript-eslint/explicit-module-boundary-types": "off",
22 | "@typescript-eslint/no-explicit-any": "error",
23 | "@typescript-eslint/no-empty-function": "off",
24 | "@typescript-eslint/no-non-null-assertion": "off",
25 | "@typescript-eslint/no-unused-vars": [
26 | "warn",
27 | {
28 | "argsIgnorePattern": "^_"
29 | }
30 | ]
31 | },
32 | "overrides": [
33 | {
34 | "files": ["rollup.config.js", "web-test-runner.config.js"],
35 | "env": {
36 | "node": true
37 | }
38 | },
39 | {
40 | "files": [
41 | "*_test.ts",
42 | "**/custom_typings/*.ts",
43 | "packages/labs/ssr/src/test/integration/tests/**",
44 | "packages/labs/ssr/src/lib/util/parse5-utils.ts"
45 | ],
46 | "rules": {
47 | "@typescript-eslint/no-explicit-any": "off"
48 | }
49 | }
50 | ]
51 | }
52 |
--------------------------------------------------------------------------------
/frameworks/react-ssr-node/http.jsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Originally from: https://github.com/oven-sh/bun/blob/e55d6eed2bf9a5db30250fdd8b9be063dc949054/bench/react-hello-world/react-hello-world.node.jsx
3 | */
4 | import { renderToPipeableStream } from 'react-dom/server.node';
5 | import Dashboard from './generated-components/components/dashboard.js';
6 | import AppHeader from './generated-components/components/app-header.js';
7 | import React from 'react';
8 | import http from 'http';
9 |
10 | const App = () => (
11 |
12 |
13 |
14 |
15 |
16 |
17 | );
18 | const port = Number(process.env.port || 6014);
19 |
20 | var didError = false;
21 | http
22 | .createServer(function (req, res) {
23 | const stream = renderToPipeableStream(, {
24 | onShellReady() {
25 | // The content above all Suspense boundaries is ready.
26 | // If something errored before we started streaming, we set the error code appropriately.
27 | res.statusCode = didError ? 500 : 200;
28 | res.setHeader('Content-type', 'text/html');
29 | res.setHeader('Cache-Control', 'no-transform'); // set to match the Deno benchmark, which requires this for an apples to apples comparison
30 | stream.pipe(res);
31 | },
32 | onError(err) {
33 | didError = true;
34 | console.error(err);
35 | },
36 | });
37 | })
38 | .listen(port);
39 |
40 | console.log(`Listening at http://localhost:${port}`);
41 |
--------------------------------------------------------------------------------
/apps/components/src/components/general/lite-tooltip.lite.tsx:
--------------------------------------------------------------------------------
1 | import { onUpdate, useRef, useStore } from '@builder.io/mitosis';
2 | import { createPopper, Placement, Options } from '@popperjs/core';
3 |
4 | export type TooltipProps = {
5 | text: string;
6 | tooltipText: string;
7 | placement?: Placement;
8 | options?: Options;
9 | };
10 |
11 | export default function LiteTooltip(props: TooltipProps) {
12 | const state = useStore({
13 | open: false,
14 | });
15 |
16 | const containerRef = useRef();
17 | const popperRef = useRef();
18 |
19 | onUpdate(() => {
20 | if (state.open) {
21 | createPopper(containerRef, popperRef, {
22 | placement: props.placement || 'auto',
23 | ...props.options,
24 | });
25 | }
26 | }, [state.open]);
27 |
28 | return (
29 | (state.open = true)}
32 | onMouseLeave={() => (state.open = false)}
33 | css={{
34 | position: 'relative',
35 | }}
36 | >
37 | {props.text}
38 | {state.open && (
39 |
51 | {props.tooltipText}
52 |
53 | )}
54 |
55 | );
56 | }
57 |
--------------------------------------------------------------------------------
/frameworks/angular/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage'),
13 | require('@angular-devkit/build-angular/plugins/karma')
14 | ],
15 | client: {
16 | jasmine: {
17 | // you can add configuration options for Jasmine here
18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19 | // for example, you can disable the random execution with `random: false`
20 | // or set a specific seed with `seed: 4321`
21 | },
22 | clearContext: false // leave Jasmine Spec Runner output visible in browser
23 | },
24 | jasmineHtmlReporter: {
25 | suppressAll: true // removes the duplicated traces
26 | },
27 | coverageReporter: {
28 | dir: require('path').join(__dirname, './coverage/angular'),
29 | subdir: '.',
30 | reporters: [
31 | { type: 'html' },
32 | { type: 'text-summary' }
33 | ]
34 | },
35 | reporters: ['progress', 'kjhtml'],
36 | port: 9876,
37 | colors: true,
38 | logLevel: config.LOG_INFO,
39 | autoWatch: true,
40 | browsers: ['Chrome'],
41 | singleRun: false,
42 | restartOnFileChange: true
43 | });
44 | };
45 |
--------------------------------------------------------------------------------
/frameworks/lit/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2019 Google LLC. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice, this
9 | list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright notice,
12 | this list of conditions and the following disclaimer in the documentation
13 | and/or other materials provided with the distribution.
14 |
15 | 3. Neither the name of the copyright holder nor the names of its
16 | contributors may be used to endorse or promote products derived from
17 | this software without specific prior written permission.
18 |
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/frameworks/nuxt2/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Node template
3 | # Logs
4 | /logs
5 | *.log
6 | npm-debug.log*
7 | yarn-debug.log*
8 | yarn-error.log*
9 |
10 | # Runtime data
11 | pids
12 | *.pid
13 | *.seed
14 | *.pid.lock
15 |
16 | # Directory for instrumented libs generated by jscoverage/JSCover
17 | lib-cov
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # nyc test coverage
23 | .nyc_output
24 |
25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26 | .grunt
27 |
28 | # Bower dependency directory (https://bower.io/)
29 | bower_components
30 |
31 | # node-waf configuration
32 | .lock-wscript
33 |
34 | # Compiled binary addons (https://nodejs.org/api/addons.html)
35 | build/Release
36 |
37 | # Dependency directories
38 | node_modules/
39 | jspm_packages/
40 |
41 | # TypeScript v1 declaration files
42 | typings/
43 |
44 | # Optional npm cache directory
45 | .npm
46 |
47 | # Optional eslint cache
48 | .eslintcache
49 |
50 | # Optional REPL history
51 | .node_repl_history
52 |
53 | # Output of 'npm pack'
54 | *.tgz
55 |
56 | # Yarn Integrity file
57 | .yarn-integrity
58 |
59 | # dotenv environment variables file
60 | .env
61 |
62 | # parcel-bundler cache (https://parceljs.org/)
63 | .cache
64 |
65 | # next.js build output
66 | .next
67 |
68 | # nuxt.js build output
69 | .nuxt
70 |
71 | # Nuxt generate
72 | dist
73 |
74 | # vuepress build output
75 | .vuepress/dist
76 |
77 | # Serverless directories
78 | .serverless
79 |
80 | # IDE / Editor
81 | .idea
82 |
83 | # Service worker
84 | sw.*
85 |
86 | # macOS
87 | .DS_Store
88 |
89 | # Vim swap files
90 | *.swp
91 |
--------------------------------------------------------------------------------
/frameworks/astro/README.md:
--------------------------------------------------------------------------------
1 | # Welcome to [Astro](https://astro.build)
2 |
3 | [](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
4 |
5 | > 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
6 |
7 | ## 🚀 Project Structure
8 |
9 | Inside of your Astro project, you'll see the following folders and files:
10 |
11 | ```
12 | /
13 | ├── public/
14 | │ └── favicon.ico
15 | ├── src/
16 | │ ├── components/
17 | │ │ └── Layout.astro
18 | │ └── pages/
19 | │ └── index.astro
20 | └── package.json
21 | ```
22 |
23 | Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
24 |
25 | There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components or layouts.
26 |
27 | Any static assets, like images, can be placed in the `public/` directory.
28 |
29 | ## 🧞 Commands
30 |
31 | All commands are run from the root of the project, from a terminal:
32 |
33 | | Command | Action |
34 | | :---------------- | :------------------------------------------- |
35 | | `npm install` | Installs dependencies |
36 | | `npm run dev` | Starts local dev server at `localhost:3000` |
37 | | `npm run build` | Build your production site to `./dist/` |
38 | | `npm run preview` | Preview your build locally, before deploying |
39 |
40 | ## 👀 Want to learn more?
41 |
42 | Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
43 |
--------------------------------------------------------------------------------
/frameworks/next/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | ```
12 |
13 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14 |
15 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
16 |
17 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
18 |
19 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
20 |
21 | ## Learn More
22 |
23 | To learn more about Next.js, take a look at the following resources:
24 |
25 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27 |
28 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29 |
30 | ## Deploy on Vercel
31 |
32 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
33 |
34 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
35 |
--------------------------------------------------------------------------------
/src/scripts/gen-simple-reports.ts:
--------------------------------------------------------------------------------
1 | import { glob, fs, chalk } from 'zx';
2 | import { getSimpleReport, SimpleReport } from '../helpers/get-simple-report.js';
3 | import { getTable } from '../helpers/get-table.js';
4 |
5 | const reports = await glob('apps/components/src/reports/**/*.json');
6 |
7 | type ResultsMap = Record;
8 | type PathResultsMap = Record;
9 | const pathResultsMap: PathResultsMap = {};
10 |
11 | const IGNORE_FRAMEWORKS = process.env.IGNORE_FRAMEWORKS?.split(',') || [];
12 |
13 | await Promise.all(
14 | reports.map(async (path) => {
15 | const pathSplit = path.split('/');
16 | let routePathPart = pathSplit.at(-2)!;
17 | if (routePathPart === 'reports') {
18 | routePathPart = 'hello-world';
19 | }
20 | const framework = pathSplit.at(-1)!.split('.json')[0];
21 | if (IGNORE_FRAMEWORKS.includes(framework)) {
22 | return;
23 | }
24 | const json = JSON.parse(await fs.readFile(path, 'utf8')) as LH.Result;
25 | const newFilePath = path.replace('.json', '_simple.ts');
26 | const simpleReport = getSimpleReport(json);
27 |
28 | if (!pathResultsMap[routePathPart]) {
29 | pathResultsMap[routePathPart] = {};
30 | }
31 | pathResultsMap[routePathPart][framework] = simpleReport;
32 |
33 | const newFile = `
34 | // Generated from benchmark data
35 | export default ${JSON.stringify(simpleReport, null, 2)}`;
36 | await fs.writeFile(newFilePath, newFile);
37 | })
38 | );
39 |
40 | for (const key of Object.keys(pathResultsMap)) {
41 | const resultsMap = pathResultsMap[key];
42 | const table = getTable(resultsMap);
43 | console.info(chalk.green(`Results for ${key}:`));
44 | console.table(table);
45 | }
46 |
--------------------------------------------------------------------------------
/apps/components/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@builder.io/components",
3 | "private": true,
4 | "version": "0.0.1",
5 | "scripts": {
6 | "build": "mitosis build",
7 | "copy": "cd ../../ && npm run copy",
8 | "postbuild": "npm run copy",
9 | "start": "watch 'npm run build' ./src"
10 | },
11 | "dependencies": {
12 | "@builder.io/mitosis": "^0.0.56-105",
13 | "@builder.io/mitosis-cli": "^0.0.17-96",
14 | "@popperjs/core": "^2.11.6",
15 | "fuse.js": "^6.6.2",
16 | "highlight.js": "^11.6.0",
17 | "lighthouse": "^9.6.5",
18 | "lodash": "^4.17.21",
19 | "shiki": "^0.11.0",
20 | "traverse": "^0.6.6",
21 | "watch": "^1.0.2"
22 | },
23 | "devDependencies": {
24 | "@builder.io/qwik": "0.0.38",
25 | "concurrently": "^7.3.0",
26 | "react": "^18.2.0",
27 | "react-dom": "^18.2.0",
28 | "solid-js": "^1.4.5",
29 | "solid-styled-components": "^0.28.4",
30 | "sync-directory": "^5.1.7",
31 | "ts-node": "^10.9.1",
32 | "typescript": "^4.7.4",
33 | "vue": "~2.6"
34 | },
35 | "peerDependencies": {
36 | "@builder.io/qwik": "0.0.38",
37 | "react": "^18.2.0",
38 | "react-dom": "^18.2.0",
39 | "solid-js": "^1.4.5",
40 | "solid-styled-components": "^0.28.4",
41 | "vue": "^2.6.12"
42 | },
43 | "exports": {
44 | "./vue/nuxt": "./output/vue/nuxt.js",
45 | "./vue2": "./output/vue/vue2/src/index.js",
46 | "./vue3": "./output/vue/vue3/src/index.js",
47 | "./react": "./output/react/src/index.js",
48 | "./qwik": "./output/qwik/src/index.js",
49 | "./solid": "./output/solid/src/index.js",
50 | "./svelte": "./output/svelte/src/index.js",
51 | "./angular": "./output/angular/src/index.js",
52 | "./*": "./output/*/src/index.js"
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/frameworks/vue3/README.md:
--------------------------------------------------------------------------------
1 | # vue3
2 |
3 | This template should help get you started developing with Vue 3 in Vite.
4 |
5 | ## Recommended IDE Setup
6 |
7 | [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8 |
9 | ## Type Support for `.vue` Imports in TS
10 |
11 | TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12 |
13 | If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14 |
15 | 1. Disable the built-in TypeScript Extension
16 | 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17 | 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18 | 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
19 |
20 | ## Customize configuration
21 |
22 | See [Vite Configuration Reference](https://vitejs.dev/config/).
23 |
24 | ## Project Setup
25 |
26 | ```sh
27 | npm install
28 | ```
29 |
30 | ### Compile and Hot-Reload for Development
31 |
32 | ```sh
33 | npm run dev
34 | ```
35 |
36 | ### Type-Check, Compile and Minify for Production
37 |
38 | ```sh
39 | npm run build
40 | ```
41 |
--------------------------------------------------------------------------------
/frameworks/nuxt2/.prettierignore:
--------------------------------------------------------------------------------
1 | ###
2 | # Place your Prettier ignore content here
3 |
4 | ###
5 | # .gitignore content is duplicated here due to https://github.com/prettier/prettier/issues/8506
6 |
7 | # Created by .ignore support plugin (hsz.mobi)
8 | ### Node template
9 | # Logs
10 | /logs
11 | *.log
12 | npm-debug.log*
13 | yarn-debug.log*
14 | yarn-error.log*
15 |
16 | # Runtime data
17 | pids
18 | *.pid
19 | *.seed
20 | *.pid.lock
21 |
22 | # Directory for instrumented libs generated by jscoverage/JSCover
23 | lib-cov
24 |
25 | # Coverage directory used by tools like istanbul
26 | coverage
27 |
28 | # nyc test coverage
29 | .nyc_output
30 |
31 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
32 | .grunt
33 |
34 | # Bower dependency directory (https://bower.io/)
35 | bower_components
36 |
37 | # node-waf configuration
38 | .lock-wscript
39 |
40 | # Compiled binary addons (https://nodejs.org/api/addons.html)
41 | build/Release
42 |
43 | # Dependency directories
44 | node_modules/
45 | jspm_packages/
46 |
47 | # TypeScript v1 declaration files
48 | typings/
49 |
50 | # Optional npm cache directory
51 | .npm
52 |
53 | # Optional eslint cache
54 | .eslintcache
55 |
56 | # Optional REPL history
57 | .node_repl_history
58 |
59 | # Output of 'npm pack'
60 | *.tgz
61 |
62 | # Yarn Integrity file
63 | .yarn-integrity
64 |
65 | # dotenv environment variables file
66 | .env
67 |
68 | # parcel-bundler cache (https://parceljs.org/)
69 | .cache
70 |
71 | # next.js build output
72 | .next
73 |
74 | # nuxt.js build output
75 | .nuxt
76 |
77 | # Nuxt generate
78 | dist
79 |
80 | # vuepress build output
81 | .vuepress/dist
82 |
83 | # Serverless directories
84 | .serverless
85 |
86 | # IDE / Editor
87 | .idea
88 |
89 | # Service worker
90 | sw.*
91 |
92 | # macOS
93 | .DS_Store
94 |
95 | # Vim swap files
96 | *.swp
97 |
--------------------------------------------------------------------------------