├── .eslintrc ├── .github └── workflows │ ├── ci.yml │ └── release.yml ├── .gitignore ├── .npmrc ├── .vscode └── launch.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── package.json ├── playground-lit ├── babel.config.json ├── index.html ├── package.json ├── src │ └── main.civet ├── tsconfig.json └── vite.config.ts ├── playground-react-babel ├── .gitignore ├── babel.config.json ├── index.html ├── package.json ├── src │ ├── App.civet │ ├── main.civet │ └── vite-env.d.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts ├── playground-react-swc ├── .gitignore ├── babel.config.json ├── index.html ├── package.json ├── src │ ├── App.civet │ ├── main.civet │ └── vite-env.d.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts ├── playground-solid ├── .gitignore ├── README.md ├── index.html ├── package.json ├── pnpm-lock.yaml ├── src │ ├── App.civet │ ├── App.module.css │ ├── assets │ │ └── favicon.ico │ ├── index.civet │ ├── index.css │ └── logo.svg ├── tsconfig.json └── vite.config.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── src └── index.ts ├── test └── index.test.ts ├── tsconfig.json └── tsup.config.ts /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@antfu" 4 | ] 5 | } -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | 9 | pull_request: 10 | branches: 11 | - main 12 | - master 13 | 14 | jobs: 15 | build: 16 | runs-on: ${{ matrix.os }} 17 | 18 | strategy: 19 | matrix: 20 | node-version: [18.x] 21 | os: [ubuntu-latest, windows-latest, macos-latest] 22 | fail-fast: false 23 | 24 | steps: 25 | - uses: actions/checkout@v3 26 | 27 | - name: Use Node.js ${{ matrix.node-version }} 28 | uses: actions/setup-node@v3 29 | with: 30 | node-version: ${{ matrix.node-version }} 31 | 32 | - name: Setup 33 | run: npm i -g pnpm @antfu/ni 34 | 35 | - name: Install 36 | run: nci 37 | 38 | # - name: Lint 39 | # run: nr lint --if-present 40 | 41 | - name: Test 42 | run: nr test --if-present 43 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | workflow_dispatch: {} 5 | # push: 6 | # tags: 7 | # - 'v*' 8 | 9 | jobs: 10 | release: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | with: 15 | fetch-depth: 0 16 | - uses: actions/setup-node@v3 17 | with: 18 | node-version: '18.x' 19 | registry-url: https://registry.npmjs.org/ 20 | - run: npm i -g pnpm @antfu/ni 21 | - run: nci 22 | - run: nr test --if-present 23 | - run: npx conventional-github-releaser -p angular 24 | env: 25 | CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}} 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .cache 2 | .DS_Store 3 | .idea 4 | *.log 5 | *.tgz 6 | coverage 7 | dist 8 | lib-cov 9 | logs 10 | node_modules 11 | temp -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | 2 | ignore-workspace-root-check=true 3 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch React Playground", 11 | "skipFiles": [ 12 | "/**" 13 | ], 14 | "program": "${workspaceFolder}/playground-react/node_modules/vite/bin/vite.js", 15 | "args": [ 16 | "dev" 17 | ], 18 | "outFiles": [ 19 | "${workspaceFolder}/dist/**/*.js", 20 | "${workspaceFolder}/playground-react/dist/**/*.js" 21 | ], 22 | "cwd": "${workspaceFolder}/playground-react", 23 | "pauseForSourceMap": true 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 0.1.0 2 | 3 | - Initial release - supports transpilation of civet files and delegation to another jsx transformer -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Gaurab Paul 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | :warning: **UNMAINTAINED** This plugin is not actively maintained. Please migrate to the offically supported [unplugin-civet](https://github.com/DanielXMoore/Civet/tree/main/integration/unplugin) 2 | 3 | --- 4 | 5 | # vite-plugin-civet 6 | 7 | Experimental vite plugin for [Civet](https://civet.dev). 8 | 9 | Civet is a new programming language that transpiles to TypeScript/JavaScript. It borrows many features from CoffeeScript, imba etc. and offers type-safety through TypeScript integration. With this plugin you can use civet in a vite project. You can use civet for your entire application or a subset of modules. 10 | 11 | ## Installation 12 | 13 | Install it as a dev dependency through your preferred package manager (we recommend pnpm) 14 | 15 | ```bash 16 | npm install -D vite-plugin-civet 17 | 18 | # or 19 | pnpm install -D vite-plugin-civet 20 | 21 | # or 22 | yarn add -D vite-plugin-civet 23 | ``` 24 | 25 | ## Usage 26 | 27 | Here is a simple example of a `vite.config.ts`, 28 | with no processing beyond Civet: 29 | 30 | ```ts 31 | import { defineConfig } from 'vite' 32 | import civetPlugin from 'vite-plugin-civet' 33 | 34 | // https://vitejs.dev/config/ 35 | export default defineConfig({ 36 | plugins: [ 37 | civetPlugin({ 38 | // Remove TypeScript type annotations from output 39 | stripTypes: true, 40 | }), 41 | ], 42 | }) 43 | ``` 44 | 45 | It is recommended that type checking is performed separately 46 | (either through editor integration or Civet CLI rather than as part of build). 47 | 48 | ### Integrations 49 | 50 | Please note that civet (by design) does not include polyfills for older browsers. Nor does it have built-in support for transpiling non-standard JavaScript features like JSX to standard JavaScript. 51 | 52 | While Civet offers syntax support for JSX, it does not make any assumptions around what that JSX will compile to. You will need additional framework-specific plugins to process the output of civet to standard JavaScript. 53 | 54 | The following example `vite.config.ts` illustrates how this plugin can integrate with [vite-plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc). 55 | 56 | ```ts 57 | import { defineConfig } from 'vite' 58 | import reactPlugin from '@vitejs/plugin-react-swc' 59 | import civetPlugin from 'vite-plugin-civet' 60 | 61 | // https://vitejs.dev/config/ 62 | export default defineConfig({ 63 | plugins: [ 64 | reactPlugin(), 65 | civetPlugin({ 66 | stripTypes: true, 67 | 68 | // Civet plugin needs to be made aware of the plugin 69 | // that will support TypeScript compilation 70 | outputTransformerPlugin: 'vite:react-swc', 71 | 72 | // Currently vite-plugin-react will not perform 73 | // any transformations unless file extension is js/jsx etc. 74 | // 75 | // So we need to change extension before passing 76 | // result of civet transformation to the plugin 77 | outputExtension: 'jsx', 78 | }), 79 | ], 80 | }) 81 | ``` 82 | 83 | Note that the `id` here is the Vite plugin id, different from the name of the package that defines the plugin. This id can be found in the object that the plugin's default export returns. 84 | 85 | ``` 86 | > (await import('@vitejs/plugin-react-swc')).default({}) 87 | [ 88 | { 89 | name: 'vite:react-swc', // <------ 90 | apply: 'serve', 91 | ... 92 | }, 93 | { 94 | name: 'vite:react-swc', 95 | apply: 'build', 96 | ... 97 | } 98 | ] 99 | ``` 100 | 101 | It should be possible to integrate plugins for other frameworks too in similar fashion. Please open an issue describing your use case if you face an issue. 102 | 103 | ### Sample projects 104 | 105 | Sample framework specific projects are available to help you get started quickly: 106 | 107 | - **React (Frontend):** `npx degit lorefnon/vite-plugin-civet/playground-react-babel my-app` 108 | - **Solid (Frontend):** `npx degit lorefnon/vite-plugin-civet/playground-solid my-app` 109 | 110 | ### Astro 111 | 112 | You can use this plugin with [Astro](https://astro.build/) and its 113 | [Integrations](https://docs.astro.build/en/guides/integrations-guide/) 114 | for JSX support by referring to the `astro:jsx` plugin. 115 | Here is an example `astro.config.mjs` 116 | using the [SolidJS](https://www.solidjs.com/) integration: 117 | 118 | ```ts 119 | import { defineConfig } from 'astro/config' 120 | import civetPlugin from 'vite-plugin-civet' 121 | import solidJs from "@astrojs/solid-js" 122 | 123 | // https://astro.build/config 124 | export default defineConfig({ 125 | vite: { 126 | plugins: [civetPlugin({ 127 | stripTypes: false, 128 | outputExtension: 'tsx', 129 | outputTransformerPlugin: 'astro:jsx', 130 | })] 131 | }, 132 | integrations: [solidJs()] 133 | }); 134 | ``` 135 | 136 | # TODO 137 | 138 | - [ ] Sourcemap integration 139 | 140 | [LICENSE (MIT)](/LICENSE) 141 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-plugin-civet", 3 | "version": "0.2.6", 4 | "description": "Vite plugin for civet", 5 | "license": "MIT", 6 | "author": "Lorefnon ", 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/lorefnon/vite-plugin-civet.git" 10 | }, 11 | "keywords": [ 12 | "vite", 13 | "plugin", 14 | "vite-plugin" 15 | ], 16 | "main": "./dist/index.js", 17 | "module": "./dist/index.mjs", 18 | "types": "./dist/index.d.ts", 19 | "exports": { 20 | ".": { 21 | "import": "./dist/index.mjs", 22 | "require": "./dist/index.js", 23 | "types": "./dist/index.d.ts" 24 | } 25 | }, 26 | "files": [ 27 | "dist" 28 | ], 29 | "sideEffects": false, 30 | "scripts": { 31 | "build": "tsup", 32 | "dev": "tsup --watch", 33 | "play-react": "pnpm run --filter ./playground-react dev", 34 | "play-solid": "pnpm run --filter ./playground-solid dev", 35 | "prepublishOnly": "pnpm run build", 36 | "test": "vitest", 37 | "release": "bumpp --commit --push --tag && pnpm publish", 38 | "lint": "eslint .", 39 | "typecheck": "tsc --noEmit" 40 | }, 41 | "homepage": "https://github.com/lorefnon/vite-plugin-civet#readme", 42 | "bugs": { 43 | "url": "https://github.com/lorefnon/vite-plugin-civet/issues" 44 | }, 45 | "dependencies": { 46 | "@danielx/civet": "^0.5.34", 47 | "@rollup/pluginutils": "^5.0.2", 48 | "cheerio": "1.0.0-rc.12", 49 | "vite": "^4.0.1" 50 | }, 51 | "devDependencies": { 52 | "@antfu/eslint-config": "^0.34.0", 53 | "@types/node": "^18.11.16", 54 | "bumpp": "^8.2.1", 55 | "eslint": "^8.30.0", 56 | "pnpm": "^8.6.0", 57 | "tsup": "^6.5.0", 58 | "typescript": "^4.9.4", 59 | "vitest": "^0.25.8" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /playground-lit/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "assumptions": { 3 | "setPublicClassFields": true 4 | }, 5 | "presets": [ 6 | "@babel/preset-typescript" 7 | ], 8 | "plugins": [ 9 | ["@babel/plugin-proposal-decorators", { 10 | "version": "2018-09", 11 | "decoratorsBeforeExport": true 12 | }], 13 | ["@babel/plugin-proposal-class-properties"] 14 | ] 15 | } -------------------------------------------------------------------------------- /playground-lit/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /playground-lit/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.0", 3 | "name": "playground-lit", 4 | "description": "", 5 | "type": "module", 6 | "scripts": { 7 | "start": "vite", 8 | "dev": "vite", 9 | "build": "vite build", 10 | "serve": "vite preview" 11 | }, 12 | "license": "MIT", 13 | "devDependencies": { 14 | "@babel/core": "^7.21.0", 15 | "@babel/plugin-proposal-class-properties": "^7.18.6", 16 | "@babel/plugin-proposal-decorators": "^7.21.0", 17 | "@babel/preset-typescript": "^7.21.0", 18 | "typescript": "^4.9.4", 19 | "vite": "^4.0.1", 20 | "vite-plugin-babel": "^1.1.3", 21 | "vite-plugin-civet": "workspace:*", 22 | "vite-plugin-swc": "^0.0.2" 23 | }, 24 | "dependencies": { 25 | "lit": "^2.6.1" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /playground-lit/src/main.civet: -------------------------------------------------------------------------------- 1 | import {LitElement, css, html} from 'lit'; 2 | import {customElement, property} from 'lit/decorators.js'; 3 | 4 | @@customElement('simple-greeting') 5 | class SimpleGreeting extends LitElement { 6 | // Define scoped styles right with your component, in plain CSS 7 | static styles = css` 8 | :host { 9 | color: blue; 10 | } 11 | `; 12 | 13 | // Declare reactive properties 14 | @@property() 15 | name?: string = 'World'; 16 | 17 | // Render the UI as a function of component state 18 | render() { 19 | return html`

Hello, ${this.name}!

`; 20 | } 21 | } 22 | 23 | export default SimpleGreeting -------------------------------------------------------------------------------- /playground-lit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 5 | "allowJs": false, 6 | "skipLibCheck": false, 7 | "esModuleInterop": false, 8 | "allowSyntheticDefaultImports": true, 9 | "strict": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "module": "ESNext", 12 | "moduleResolution": "Node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "jsx": "react-jsx", 17 | "paths": { 18 | "vite-plugin-react": ["../src/index.ts"], 19 | "vite-plugin-react/dist/*": ["../src/*"] 20 | }, 21 | "experimentalDecorators": true, 22 | "useDefineForClassFields": false, 23 | }, 24 | "include": ["src"], 25 | } 26 | 27 | -------------------------------------------------------------------------------- /playground-lit/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import civetPlugin from 'vite-plugin-civet' 3 | import babelPlugin from 'vite-plugin-babel' 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | babelPlugin({ 8 | apply: 'serve', 9 | }), 10 | civetPlugin({ 11 | stripTypes: true, 12 | outputExtension: 'js', 13 | outputTransformerPlugin: { 14 | serve: 'babel-plugin', 15 | }, 16 | }), 17 | ], 18 | server: { 19 | port: 3000, 20 | }, 21 | build: { 22 | target: 'esnext', 23 | }, 24 | }) 25 | 26 | -------------------------------------------------------------------------------- /playground-react-babel/.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 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /playground-react-babel/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-react"] 3 | } -------------------------------------------------------------------------------- /playground-react-babel/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /playground-react-babel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "playground-react", 3 | "version": "0.0.0", 4 | "private": true, 5 | "license": "MIT", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview" 10 | }, 11 | "dependencies": { 12 | "@babel/core": "^7.20.12", 13 | "@babel/preset-react": "^7.18.6", 14 | "react": "^18.2.0", 15 | "react-dom": "^18.2.0", 16 | "vite-plugin-react": "^4.0.1" 17 | }, 18 | "devDependencies": { 19 | "@ant-design/icons": "^4.8.0", 20 | "@types/babel__core": "^7.1.20", 21 | "@types/react": "^18.0.26", 22 | "@types/react-dom": "^18.0.9", 23 | "antd": "^5.0.7", 24 | "typescript": "^4.9.4", 25 | "vite": "^4.0.1", 26 | "vite-plugin-civet": "workspace:*" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /playground-react-babel/src/App.civet: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | const App = () -> 4 |
5 | Hello world 6 | 7 | export default App 8 | -------------------------------------------------------------------------------- /playground-react-babel/src/main.civet: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom' 3 | import App from './App.civet' 4 | 5 | ReactDOM.render ( 6 | 7 | 8 | 9 | ), 10 | document.getElementById 'root' 11 | -------------------------------------------------------------------------------- /playground-react-babel/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /playground-react-babel/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 6 | "allowJs": false, 7 | "skipLibCheck": false, 8 | "esModuleInterop": false, 9 | "allowSyntheticDefaultImports": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true, 17 | "jsx": "react-jsx", 18 | "paths": { 19 | "vite-plugin-react": ["../src/index.ts"], 20 | "vite-plugin-react/dist/*": ["../src/*"] 21 | } 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /playground-react-babel/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "esnext", 5 | "moduleResolution": "node" 6 | }, 7 | "include": ["vite.config.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /playground-react-babel/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import civetPlugin from "vite-plugin-civet"; 3 | import * as babel from "@babel/core"; 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [ 8 | civetPlugin({ 9 | // For simple uses of TypeScript, Civet can directly transform into JS: 10 | stripTypes: true, 11 | outputExtension: "jsx", 12 | transformOutput: (code, id, options) => 13 | new Promise((resolve, reject) => { 14 | babel.transform(code, {}, (err, res) => { 15 | if (err) reject(err); 16 | else 17 | resolve({ 18 | code: res.code, 19 | // TODO Make babel and rollup agree on the source map format 20 | map: null /* res.map */, 21 | }); 22 | }); 23 | }), 24 | }), 25 | ], 26 | }); 27 | -------------------------------------------------------------------------------- /playground-react-swc/.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 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /playground-react-swc/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-react"] 3 | } -------------------------------------------------------------------------------- /playground-react-swc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /playground-react-swc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "playground-react", 3 | "version": "0.0.0", 4 | "private": true, 5 | "license": "MIT", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview" 10 | }, 11 | "dependencies": { 12 | "react": "^18.2.0", 13 | "react-dom": "^18.2.0", 14 | "vite-plugin-react": "^4.0.1" 15 | }, 16 | "devDependencies": { 17 | "@ant-design/icons": "^4.8.0", 18 | "@types/react": "^18.0.26", 19 | "@types/react-dom": "^18.0.9", 20 | "@vitejs/plugin-react-swc": "^3.0.1", 21 | "antd": "^5.0.7", 22 | "typescript": "^4.9.4", 23 | "vite": "^4.0.1", 24 | "vite-plugin-civet": "workspace:*" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /playground-react-swc/src/App.civet: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | const App = () -> 4 |
5 | Hello world 6 | 7 | export default App 8 | -------------------------------------------------------------------------------- /playground-react-swc/src/main.civet: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom' 3 | import App from './App.civet' 4 | 5 | ReactDOM.render ( 6 | 7 | 8 | 9 | ), 10 | document.getElementById 'root' 11 | -------------------------------------------------------------------------------- /playground-react-swc/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /playground-react-swc/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 6 | "allowJs": false, 7 | "skipLibCheck": false, 8 | "esModuleInterop": false, 9 | "allowSyntheticDefaultImports": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true, 17 | "jsx": "react-jsx", 18 | "paths": { 19 | "vite-plugin-react": ["../src/index.ts"], 20 | "vite-plugin-react/dist/*": ["../src/*"] 21 | } 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /playground-react-swc/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "esnext", 5 | "moduleResolution": "node" 6 | }, 7 | "include": ["vite.config.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /playground-react-swc/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import reactPlugin from '@vitejs/plugin-react-swc' 3 | import civetPlugin from 'vite-plugin-civet' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [ 8 | reactPlugin(), 9 | civetPlugin({ 10 | // For simple uses of TypeScript, Civet can directly transform into JS: 11 | stripTypes: true, 12 | outputExtension: 'jsx', 13 | // For complex uses of TypeScript (e.g. enum), use existing TS transform: 14 | //outputExtension: 'tsx', 15 | outputTransformerPlugin: 'vite:react-swc', 16 | }), 17 | ], 18 | }) 19 | -------------------------------------------------------------------------------- /playground-solid/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /playground-solid/README.md: -------------------------------------------------------------------------------- 1 | ## Usage 2 | 3 | Those templates dependencies are maintained via [pnpm](https://pnpm.io) via `pnpm up -Lri`. 4 | 5 | This is the reason you see a `pnpm-lock.yaml`. That being said, any package manager will work. This file can be safely be removed once you clone a template. 6 | 7 | ```bash 8 | $ npm install # or pnpm install or yarn install 9 | ``` 10 | 11 | ### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs) 12 | 13 | ## Available Scripts 14 | 15 | In the project directory, you can run: 16 | 17 | ### `npm dev` or `npm start` 18 | 19 | Runs the app in the development mode.
20 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 21 | 22 | The page will reload if you make edits.
23 | 24 | ### `npm run build` 25 | 26 | Builds the app for production to the `dist` folder.
27 | It correctly bundles Solid in production mode and optimizes the build for the best performance. 28 | 29 | The build is minified and the filenames include the hashes.
30 | Your app is ready to be deployed! 31 | 32 | ## Deployment 33 | 34 | You can deploy the `dist` folder to any static host provider (netlify, surge, now, etc.) 35 | -------------------------------------------------------------------------------- /playground-solid/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Solid App 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /playground-solid/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "playground-solid", 3 | "version": "0.0.0", 4 | "description": "", 5 | "type": "module", 6 | "scripts": { 7 | "start": "vite", 8 | "dev": "vite", 9 | "build": "vite build", 10 | "serve": "vite preview" 11 | }, 12 | "license": "MIT", 13 | "devDependencies": { 14 | "typescript": "^4.9.4", 15 | "vite": "^4.0.1", 16 | "vite-plugin-solid": "^2.5.0", 17 | "vite-plugin-civet": "workspace:*" 18 | }, 19 | "dependencies": { 20 | "solid-js": "^1.6.5" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /playground-solid/pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: 5.4 2 | 3 | specifiers: 4 | solid-js: ^1.5.1 5 | typescript: ^4.8.2 6 | vite: ^3.0.9 7 | vite-plugin-solid: ^2.3.0 8 | 9 | dependencies: 10 | solid-js: 1.5.1 11 | 12 | devDependencies: 13 | typescript: 4.8.2 14 | vite: 3.0.9 15 | vite-plugin-solid: 2.3.0_solid-js@1.5.1+vite@3.0.9 16 | 17 | packages: 18 | 19 | /@ampproject/remapping/2.2.0: 20 | resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} 21 | engines: {node: '>=6.0.0'} 22 | dependencies: 23 | '@jridgewell/gen-mapping': 0.1.1 24 | '@jridgewell/trace-mapping': 0.3.14 25 | dev: true 26 | 27 | /@babel/code-frame/7.18.6: 28 | resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} 29 | engines: {node: '>=6.9.0'} 30 | dependencies: 31 | '@babel/highlight': 7.18.6 32 | dev: true 33 | 34 | /@babel/compat-data/7.18.8: 35 | resolution: {integrity: sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==} 36 | engines: {node: '>=6.9.0'} 37 | dev: true 38 | 39 | /@babel/core/7.18.6: 40 | resolution: {integrity: sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==} 41 | engines: {node: '>=6.9.0'} 42 | dependencies: 43 | '@ampproject/remapping': 2.2.0 44 | '@babel/code-frame': 7.18.6 45 | '@babel/generator': 7.18.7 46 | '@babel/helper-compilation-targets': 7.18.6_@babel+core@7.18.6 47 | '@babel/helper-module-transforms': 7.18.8 48 | '@babel/helpers': 7.18.6 49 | '@babel/parser': 7.18.8 50 | '@babel/template': 7.18.6 51 | '@babel/traverse': 7.18.8 52 | '@babel/types': 7.18.8 53 | convert-source-map: 1.8.0 54 | debug: 4.3.4 55 | gensync: 1.0.0-beta.2 56 | json5: 2.2.1 57 | semver: 6.3.0 58 | transitivePeerDependencies: 59 | - supports-color 60 | dev: true 61 | 62 | /@babel/generator/7.18.7: 63 | resolution: {integrity: sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==} 64 | engines: {node: '>=6.9.0'} 65 | dependencies: 66 | '@babel/types': 7.18.8 67 | '@jridgewell/gen-mapping': 0.3.2 68 | jsesc: 2.5.2 69 | dev: true 70 | 71 | /@babel/helper-annotate-as-pure/7.18.6: 72 | resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} 73 | engines: {node: '>=6.9.0'} 74 | dependencies: 75 | '@babel/types': 7.18.8 76 | dev: true 77 | 78 | /@babel/helper-compilation-targets/7.18.6_@babel+core@7.18.6: 79 | resolution: {integrity: sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==} 80 | engines: {node: '>=6.9.0'} 81 | peerDependencies: 82 | '@babel/core': ^7.0.0 83 | dependencies: 84 | '@babel/compat-data': 7.18.8 85 | '@babel/core': 7.18.6 86 | '@babel/helper-validator-option': 7.18.6 87 | browserslist: 4.21.2 88 | semver: 6.3.0 89 | dev: true 90 | 91 | /@babel/helper-create-class-features-plugin/7.18.6_@babel+core@7.18.6: 92 | resolution: {integrity: sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw==} 93 | engines: {node: '>=6.9.0'} 94 | peerDependencies: 95 | '@babel/core': ^7.0.0 96 | dependencies: 97 | '@babel/core': 7.18.6 98 | '@babel/helper-annotate-as-pure': 7.18.6 99 | '@babel/helper-environment-visitor': 7.18.6 100 | '@babel/helper-function-name': 7.18.6 101 | '@babel/helper-member-expression-to-functions': 7.18.6 102 | '@babel/helper-optimise-call-expression': 7.18.6 103 | '@babel/helper-replace-supers': 7.18.6 104 | '@babel/helper-split-export-declaration': 7.18.6 105 | transitivePeerDependencies: 106 | - supports-color 107 | dev: true 108 | 109 | /@babel/helper-environment-visitor/7.18.6: 110 | resolution: {integrity: sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==} 111 | engines: {node: '>=6.9.0'} 112 | dev: true 113 | 114 | /@babel/helper-function-name/7.18.6: 115 | resolution: {integrity: sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==} 116 | engines: {node: '>=6.9.0'} 117 | dependencies: 118 | '@babel/template': 7.18.6 119 | '@babel/types': 7.18.8 120 | dev: true 121 | 122 | /@babel/helper-hoist-variables/7.18.6: 123 | resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} 124 | engines: {node: '>=6.9.0'} 125 | dependencies: 126 | '@babel/types': 7.18.8 127 | dev: true 128 | 129 | /@babel/helper-member-expression-to-functions/7.18.6: 130 | resolution: {integrity: sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng==} 131 | engines: {node: '>=6.9.0'} 132 | dependencies: 133 | '@babel/types': 7.18.8 134 | dev: true 135 | 136 | /@babel/helper-module-imports/7.16.0: 137 | resolution: {integrity: sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==} 138 | engines: {node: '>=6.9.0'} 139 | dependencies: 140 | '@babel/types': 7.18.8 141 | dev: true 142 | 143 | /@babel/helper-module-imports/7.18.6: 144 | resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} 145 | engines: {node: '>=6.9.0'} 146 | dependencies: 147 | '@babel/types': 7.18.8 148 | dev: true 149 | 150 | /@babel/helper-module-transforms/7.18.8: 151 | resolution: {integrity: sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA==} 152 | engines: {node: '>=6.9.0'} 153 | dependencies: 154 | '@babel/helper-environment-visitor': 7.18.6 155 | '@babel/helper-module-imports': 7.18.6 156 | '@babel/helper-simple-access': 7.18.6 157 | '@babel/helper-split-export-declaration': 7.18.6 158 | '@babel/helper-validator-identifier': 7.18.6 159 | '@babel/template': 7.18.6 160 | '@babel/traverse': 7.18.8 161 | '@babel/types': 7.18.8 162 | transitivePeerDependencies: 163 | - supports-color 164 | dev: true 165 | 166 | /@babel/helper-optimise-call-expression/7.18.6: 167 | resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} 168 | engines: {node: '>=6.9.0'} 169 | dependencies: 170 | '@babel/types': 7.18.8 171 | dev: true 172 | 173 | /@babel/helper-plugin-utils/7.18.6: 174 | resolution: {integrity: sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==} 175 | engines: {node: '>=6.9.0'} 176 | dev: true 177 | 178 | /@babel/helper-replace-supers/7.18.6: 179 | resolution: {integrity: sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g==} 180 | engines: {node: '>=6.9.0'} 181 | dependencies: 182 | '@babel/helper-environment-visitor': 7.18.6 183 | '@babel/helper-member-expression-to-functions': 7.18.6 184 | '@babel/helper-optimise-call-expression': 7.18.6 185 | '@babel/traverse': 7.18.8 186 | '@babel/types': 7.18.8 187 | transitivePeerDependencies: 188 | - supports-color 189 | dev: true 190 | 191 | /@babel/helper-simple-access/7.18.6: 192 | resolution: {integrity: sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==} 193 | engines: {node: '>=6.9.0'} 194 | dependencies: 195 | '@babel/types': 7.18.8 196 | dev: true 197 | 198 | /@babel/helper-split-export-declaration/7.18.6: 199 | resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} 200 | engines: {node: '>=6.9.0'} 201 | dependencies: 202 | '@babel/types': 7.18.8 203 | dev: true 204 | 205 | /@babel/helper-validator-identifier/7.18.6: 206 | resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==} 207 | engines: {node: '>=6.9.0'} 208 | dev: true 209 | 210 | /@babel/helper-validator-option/7.18.6: 211 | resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} 212 | engines: {node: '>=6.9.0'} 213 | dev: true 214 | 215 | /@babel/helpers/7.18.6: 216 | resolution: {integrity: sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ==} 217 | engines: {node: '>=6.9.0'} 218 | dependencies: 219 | '@babel/template': 7.18.6 220 | '@babel/traverse': 7.18.8 221 | '@babel/types': 7.18.8 222 | transitivePeerDependencies: 223 | - supports-color 224 | dev: true 225 | 226 | /@babel/highlight/7.18.6: 227 | resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} 228 | engines: {node: '>=6.9.0'} 229 | dependencies: 230 | '@babel/helper-validator-identifier': 7.18.6 231 | chalk: 2.4.2 232 | js-tokens: 4.0.0 233 | dev: true 234 | 235 | /@babel/parser/7.18.8: 236 | resolution: {integrity: sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA==} 237 | engines: {node: '>=6.0.0'} 238 | hasBin: true 239 | dependencies: 240 | '@babel/types': 7.18.8 241 | dev: true 242 | 243 | /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.18.6: 244 | resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} 245 | engines: {node: '>=6.9.0'} 246 | peerDependencies: 247 | '@babel/core': ^7.0.0-0 248 | dependencies: 249 | '@babel/core': 7.18.6 250 | '@babel/helper-plugin-utils': 7.18.6 251 | dev: true 252 | 253 | /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.18.6: 254 | resolution: {integrity: sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==} 255 | engines: {node: '>=6.9.0'} 256 | peerDependencies: 257 | '@babel/core': ^7.0.0-0 258 | dependencies: 259 | '@babel/core': 7.18.6 260 | '@babel/helper-plugin-utils': 7.18.6 261 | dev: true 262 | 263 | /@babel/plugin-transform-typescript/7.18.8_@babel+core@7.18.6: 264 | resolution: {integrity: sha512-p2xM8HI83UObjsZGofMV/EdYjamsDm6MoN3hXPYIT0+gxIoopE+B7rPYKAxfrz9K9PK7JafTTjqYC6qipLExYA==} 265 | engines: {node: '>=6.9.0'} 266 | peerDependencies: 267 | '@babel/core': ^7.0.0-0 268 | dependencies: 269 | '@babel/core': 7.18.6 270 | '@babel/helper-create-class-features-plugin': 7.18.6_@babel+core@7.18.6 271 | '@babel/helper-plugin-utils': 7.18.6 272 | '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.18.6 273 | transitivePeerDependencies: 274 | - supports-color 275 | dev: true 276 | 277 | /@babel/preset-typescript/7.18.6_@babel+core@7.18.6: 278 | resolution: {integrity: sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==} 279 | engines: {node: '>=6.9.0'} 280 | peerDependencies: 281 | '@babel/core': ^7.0.0-0 282 | dependencies: 283 | '@babel/core': 7.18.6 284 | '@babel/helper-plugin-utils': 7.18.6 285 | '@babel/helper-validator-option': 7.18.6 286 | '@babel/plugin-transform-typescript': 7.18.8_@babel+core@7.18.6 287 | transitivePeerDependencies: 288 | - supports-color 289 | dev: true 290 | 291 | /@babel/template/7.18.6: 292 | resolution: {integrity: sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==} 293 | engines: {node: '>=6.9.0'} 294 | dependencies: 295 | '@babel/code-frame': 7.18.6 296 | '@babel/parser': 7.18.8 297 | '@babel/types': 7.18.8 298 | dev: true 299 | 300 | /@babel/traverse/7.18.8: 301 | resolution: {integrity: sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg==} 302 | engines: {node: '>=6.9.0'} 303 | dependencies: 304 | '@babel/code-frame': 7.18.6 305 | '@babel/generator': 7.18.7 306 | '@babel/helper-environment-visitor': 7.18.6 307 | '@babel/helper-function-name': 7.18.6 308 | '@babel/helper-hoist-variables': 7.18.6 309 | '@babel/helper-split-export-declaration': 7.18.6 310 | '@babel/parser': 7.18.8 311 | '@babel/types': 7.18.8 312 | debug: 4.3.4 313 | globals: 11.12.0 314 | transitivePeerDependencies: 315 | - supports-color 316 | dev: true 317 | 318 | /@babel/types/7.18.8: 319 | resolution: {integrity: sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw==} 320 | engines: {node: '>=6.9.0'} 321 | dependencies: 322 | '@babel/helper-validator-identifier': 7.18.6 323 | to-fast-properties: 2.0.0 324 | dev: true 325 | 326 | /@esbuild/linux-loong64/0.14.54: 327 | resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==} 328 | engines: {node: '>=12'} 329 | cpu: [loong64] 330 | os: [linux] 331 | requiresBuild: true 332 | dev: true 333 | optional: true 334 | 335 | /@jridgewell/gen-mapping/0.1.1: 336 | resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==} 337 | engines: {node: '>=6.0.0'} 338 | dependencies: 339 | '@jridgewell/set-array': 1.1.2 340 | '@jridgewell/sourcemap-codec': 1.4.14 341 | dev: true 342 | 343 | /@jridgewell/gen-mapping/0.3.2: 344 | resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} 345 | engines: {node: '>=6.0.0'} 346 | dependencies: 347 | '@jridgewell/set-array': 1.1.2 348 | '@jridgewell/sourcemap-codec': 1.4.14 349 | '@jridgewell/trace-mapping': 0.3.14 350 | dev: true 351 | 352 | /@jridgewell/resolve-uri/3.1.0: 353 | resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} 354 | engines: {node: '>=6.0.0'} 355 | dev: true 356 | 357 | /@jridgewell/set-array/1.1.2: 358 | resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} 359 | engines: {node: '>=6.0.0'} 360 | dev: true 361 | 362 | /@jridgewell/sourcemap-codec/1.4.14: 363 | resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} 364 | dev: true 365 | 366 | /@jridgewell/trace-mapping/0.3.14: 367 | resolution: {integrity: sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==} 368 | dependencies: 369 | '@jridgewell/resolve-uri': 3.1.0 370 | '@jridgewell/sourcemap-codec': 1.4.14 371 | dev: true 372 | 373 | /ansi-styles/3.2.1: 374 | resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} 375 | engines: {node: '>=4'} 376 | dependencies: 377 | color-convert: 1.9.3 378 | dev: true 379 | 380 | /babel-plugin-jsx-dom-expressions/0.33.12_@babel+core@7.18.6: 381 | resolution: {integrity: sha512-FQeNcBvC+PrPYGpeUztI7AiiAqJL2H8e7mL4L6qHZ7B4wZfbgyREsHZwKmmDqxAehlyAUolTdhDNk9xfyHdIZw==} 382 | peerDependencies: 383 | '@babel/core': ^7.0.0 384 | dependencies: 385 | '@babel/core': 7.18.6 386 | '@babel/helper-module-imports': 7.16.0 387 | '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.18.6 388 | '@babel/types': 7.18.8 389 | html-entities: 2.3.2 390 | dev: true 391 | 392 | /babel-preset-solid/1.4.6_@babel+core@7.18.6: 393 | resolution: {integrity: sha512-5n+nm1zgj7BK9cv0kYu0p+kbsXgGbrxLmA5bv5WT0V5WnqRgshWILInPWLJNZbvP5gBj+huDKwk3J4RhhbFlhA==} 394 | peerDependencies: 395 | '@babel/core': ^7.0.0 396 | dependencies: 397 | '@babel/core': 7.18.6 398 | babel-plugin-jsx-dom-expressions: 0.33.12_@babel+core@7.18.6 399 | dev: true 400 | 401 | /browserslist/4.21.2: 402 | resolution: {integrity: sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA==} 403 | engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} 404 | hasBin: true 405 | dependencies: 406 | caniuse-lite: 1.0.30001366 407 | electron-to-chromium: 1.4.189 408 | node-releases: 2.0.6 409 | update-browserslist-db: 1.0.4_browserslist@4.21.2 410 | dev: true 411 | 412 | /caniuse-lite/1.0.30001366: 413 | resolution: {integrity: sha512-yy7XLWCubDobokgzudpkKux8e0UOOnLHE6mlNJBzT3lZJz6s5atSEzjoL+fsCPkI0G8MP5uVdDx1ur/fXEWkZA==} 414 | dev: true 415 | 416 | /chalk/2.4.2: 417 | resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} 418 | engines: {node: '>=4'} 419 | dependencies: 420 | ansi-styles: 3.2.1 421 | escape-string-regexp: 1.0.5 422 | supports-color: 5.5.0 423 | dev: true 424 | 425 | /color-convert/1.9.3: 426 | resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} 427 | dependencies: 428 | color-name: 1.1.3 429 | dev: true 430 | 431 | /color-name/1.1.3: 432 | resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} 433 | dev: true 434 | 435 | /convert-source-map/1.8.0: 436 | resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} 437 | dependencies: 438 | safe-buffer: 5.1.2 439 | dev: true 440 | 441 | /csstype/3.1.0: 442 | resolution: {integrity: sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==} 443 | 444 | /debug/4.3.4: 445 | resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} 446 | engines: {node: '>=6.0'} 447 | peerDependencies: 448 | supports-color: '*' 449 | peerDependenciesMeta: 450 | supports-color: 451 | optional: true 452 | dependencies: 453 | ms: 2.1.2 454 | dev: true 455 | 456 | /electron-to-chromium/1.4.189: 457 | resolution: {integrity: sha512-dQ6Zn4ll2NofGtxPXaDfY2laIa6NyCQdqXYHdwH90GJQW0LpJJib0ZU/ERtbb0XkBEmUD2eJtagbOie3pdMiPg==} 458 | dev: true 459 | 460 | /esbuild-android-64/0.14.54: 461 | resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==} 462 | engines: {node: '>=12'} 463 | cpu: [x64] 464 | os: [android] 465 | requiresBuild: true 466 | dev: true 467 | optional: true 468 | 469 | /esbuild-android-arm64/0.14.54: 470 | resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==} 471 | engines: {node: '>=12'} 472 | cpu: [arm64] 473 | os: [android] 474 | requiresBuild: true 475 | dev: true 476 | optional: true 477 | 478 | /esbuild-darwin-64/0.14.54: 479 | resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==} 480 | engines: {node: '>=12'} 481 | cpu: [x64] 482 | os: [darwin] 483 | requiresBuild: true 484 | dev: true 485 | optional: true 486 | 487 | /esbuild-darwin-arm64/0.14.54: 488 | resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==} 489 | engines: {node: '>=12'} 490 | cpu: [arm64] 491 | os: [darwin] 492 | requiresBuild: true 493 | dev: true 494 | optional: true 495 | 496 | /esbuild-freebsd-64/0.14.54: 497 | resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==} 498 | engines: {node: '>=12'} 499 | cpu: [x64] 500 | os: [freebsd] 501 | requiresBuild: true 502 | dev: true 503 | optional: true 504 | 505 | /esbuild-freebsd-arm64/0.14.54: 506 | resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==} 507 | engines: {node: '>=12'} 508 | cpu: [arm64] 509 | os: [freebsd] 510 | requiresBuild: true 511 | dev: true 512 | optional: true 513 | 514 | /esbuild-linux-32/0.14.54: 515 | resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==} 516 | engines: {node: '>=12'} 517 | cpu: [ia32] 518 | os: [linux] 519 | requiresBuild: true 520 | dev: true 521 | optional: true 522 | 523 | /esbuild-linux-64/0.14.54: 524 | resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==} 525 | engines: {node: '>=12'} 526 | cpu: [x64] 527 | os: [linux] 528 | requiresBuild: true 529 | dev: true 530 | optional: true 531 | 532 | /esbuild-linux-arm/0.14.54: 533 | resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==} 534 | engines: {node: '>=12'} 535 | cpu: [arm] 536 | os: [linux] 537 | requiresBuild: true 538 | dev: true 539 | optional: true 540 | 541 | /esbuild-linux-arm64/0.14.54: 542 | resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==} 543 | engines: {node: '>=12'} 544 | cpu: [arm64] 545 | os: [linux] 546 | requiresBuild: true 547 | dev: true 548 | optional: true 549 | 550 | /esbuild-linux-mips64le/0.14.54: 551 | resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==} 552 | engines: {node: '>=12'} 553 | cpu: [mips64el] 554 | os: [linux] 555 | requiresBuild: true 556 | dev: true 557 | optional: true 558 | 559 | /esbuild-linux-ppc64le/0.14.54: 560 | resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==} 561 | engines: {node: '>=12'} 562 | cpu: [ppc64] 563 | os: [linux] 564 | requiresBuild: true 565 | dev: true 566 | optional: true 567 | 568 | /esbuild-linux-riscv64/0.14.54: 569 | resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==} 570 | engines: {node: '>=12'} 571 | cpu: [riscv64] 572 | os: [linux] 573 | requiresBuild: true 574 | dev: true 575 | optional: true 576 | 577 | /esbuild-linux-s390x/0.14.54: 578 | resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==} 579 | engines: {node: '>=12'} 580 | cpu: [s390x] 581 | os: [linux] 582 | requiresBuild: true 583 | dev: true 584 | optional: true 585 | 586 | /esbuild-netbsd-64/0.14.54: 587 | resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==} 588 | engines: {node: '>=12'} 589 | cpu: [x64] 590 | os: [netbsd] 591 | requiresBuild: true 592 | dev: true 593 | optional: true 594 | 595 | /esbuild-openbsd-64/0.14.54: 596 | resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==} 597 | engines: {node: '>=12'} 598 | cpu: [x64] 599 | os: [openbsd] 600 | requiresBuild: true 601 | dev: true 602 | optional: true 603 | 604 | /esbuild-sunos-64/0.14.54: 605 | resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==} 606 | engines: {node: '>=12'} 607 | cpu: [x64] 608 | os: [sunos] 609 | requiresBuild: true 610 | dev: true 611 | optional: true 612 | 613 | /esbuild-windows-32/0.14.54: 614 | resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==} 615 | engines: {node: '>=12'} 616 | cpu: [ia32] 617 | os: [win32] 618 | requiresBuild: true 619 | dev: true 620 | optional: true 621 | 622 | /esbuild-windows-64/0.14.54: 623 | resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==} 624 | engines: {node: '>=12'} 625 | cpu: [x64] 626 | os: [win32] 627 | requiresBuild: true 628 | dev: true 629 | optional: true 630 | 631 | /esbuild-windows-arm64/0.14.54: 632 | resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==} 633 | engines: {node: '>=12'} 634 | cpu: [arm64] 635 | os: [win32] 636 | requiresBuild: true 637 | dev: true 638 | optional: true 639 | 640 | /esbuild/0.14.54: 641 | resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==} 642 | engines: {node: '>=12'} 643 | hasBin: true 644 | requiresBuild: true 645 | optionalDependencies: 646 | '@esbuild/linux-loong64': 0.14.54 647 | esbuild-android-64: 0.14.54 648 | esbuild-android-arm64: 0.14.54 649 | esbuild-darwin-64: 0.14.54 650 | esbuild-darwin-arm64: 0.14.54 651 | esbuild-freebsd-64: 0.14.54 652 | esbuild-freebsd-arm64: 0.14.54 653 | esbuild-linux-32: 0.14.54 654 | esbuild-linux-64: 0.14.54 655 | esbuild-linux-arm: 0.14.54 656 | esbuild-linux-arm64: 0.14.54 657 | esbuild-linux-mips64le: 0.14.54 658 | esbuild-linux-ppc64le: 0.14.54 659 | esbuild-linux-riscv64: 0.14.54 660 | esbuild-linux-s390x: 0.14.54 661 | esbuild-netbsd-64: 0.14.54 662 | esbuild-openbsd-64: 0.14.54 663 | esbuild-sunos-64: 0.14.54 664 | esbuild-windows-32: 0.14.54 665 | esbuild-windows-64: 0.14.54 666 | esbuild-windows-arm64: 0.14.54 667 | dev: true 668 | 669 | /escalade/3.1.1: 670 | resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} 671 | engines: {node: '>=6'} 672 | dev: true 673 | 674 | /escape-string-regexp/1.0.5: 675 | resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} 676 | engines: {node: '>=0.8.0'} 677 | dev: true 678 | 679 | /fsevents/2.3.2: 680 | resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} 681 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 682 | os: [darwin] 683 | requiresBuild: true 684 | dev: true 685 | optional: true 686 | 687 | /function-bind/1.1.1: 688 | resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} 689 | dev: true 690 | 691 | /gensync/1.0.0-beta.2: 692 | resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} 693 | engines: {node: '>=6.9.0'} 694 | dev: true 695 | 696 | /globals/11.12.0: 697 | resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} 698 | engines: {node: '>=4'} 699 | dev: true 700 | 701 | /has-flag/3.0.0: 702 | resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} 703 | engines: {node: '>=4'} 704 | dev: true 705 | 706 | /has/1.0.3: 707 | resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} 708 | engines: {node: '>= 0.4.0'} 709 | dependencies: 710 | function-bind: 1.1.1 711 | dev: true 712 | 713 | /html-entities/2.3.2: 714 | resolution: {integrity: sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==} 715 | dev: true 716 | 717 | /is-core-module/2.10.0: 718 | resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} 719 | dependencies: 720 | has: 1.0.3 721 | dev: true 722 | 723 | /is-what/4.1.7: 724 | resolution: {integrity: sha512-DBVOQNiPKnGMxRMLIYSwERAS5MVY1B7xYiGnpgctsOFvVDz9f9PFXXxMcTOHuoqYp4NK9qFYQaIC1NRRxLMpBQ==} 725 | engines: {node: '>=12.13'} 726 | dev: true 727 | 728 | /js-tokens/4.0.0: 729 | resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} 730 | dev: true 731 | 732 | /jsesc/2.5.2: 733 | resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} 734 | engines: {node: '>=4'} 735 | hasBin: true 736 | dev: true 737 | 738 | /json5/2.2.1: 739 | resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==} 740 | engines: {node: '>=6'} 741 | hasBin: true 742 | dev: true 743 | 744 | /merge-anything/5.0.2: 745 | resolution: {integrity: sha512-POPQBWkBC0vxdgzRJ2Mkj4+2NTKbvkHo93ih+jGDhNMLzIw+rYKjO7949hOQM2X7DxMHH1uoUkwWFLIzImw7gA==} 746 | engines: {node: '>=12.13'} 747 | dependencies: 748 | is-what: 4.1.7 749 | ts-toolbelt: 9.6.0 750 | dev: true 751 | 752 | /ms/2.1.2: 753 | resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} 754 | dev: true 755 | 756 | /nanoid/3.3.4: 757 | resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} 758 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} 759 | hasBin: true 760 | dev: true 761 | 762 | /node-releases/2.0.6: 763 | resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} 764 | dev: true 765 | 766 | /path-parse/1.0.7: 767 | resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} 768 | dev: true 769 | 770 | /picocolors/1.0.0: 771 | resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} 772 | dev: true 773 | 774 | /postcss/8.4.16: 775 | resolution: {integrity: sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==} 776 | engines: {node: ^10 || ^12 || >=14} 777 | dependencies: 778 | nanoid: 3.3.4 779 | picocolors: 1.0.0 780 | source-map-js: 1.0.2 781 | dev: true 782 | 783 | /resolve/1.22.1: 784 | resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} 785 | hasBin: true 786 | dependencies: 787 | is-core-module: 2.10.0 788 | path-parse: 1.0.7 789 | supports-preserve-symlinks-flag: 1.0.0 790 | dev: true 791 | 792 | /rollup/2.77.3: 793 | resolution: {integrity: sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==} 794 | engines: {node: '>=10.0.0'} 795 | hasBin: true 796 | optionalDependencies: 797 | fsevents: 2.3.2 798 | dev: true 799 | 800 | /safe-buffer/5.1.2: 801 | resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} 802 | dev: true 803 | 804 | /semver/6.3.0: 805 | resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} 806 | hasBin: true 807 | dev: true 808 | 809 | /solid-js/1.5.1: 810 | resolution: {integrity: sha512-Y6aKystIxnrB0quV5nhqNuJV+l2Fk3/PQy1mMya/bzxlGiMHAym7v1NaqEgqDIvctbkxOi5dBj0ER/ewrH060g==} 811 | dependencies: 812 | csstype: 3.1.0 813 | 814 | /solid-refresh/0.4.1_solid-js@1.5.1: 815 | resolution: {integrity: sha512-v3tD/OXQcUyXLrWjPW1dXZyeWwP7/+GQNs8YTL09GBq+5FguA6IejJWUvJDrLIA4M0ho9/5zK2e9n+uy+4488g==} 816 | peerDependencies: 817 | solid-js: ^1.3 818 | dependencies: 819 | '@babel/generator': 7.18.7 820 | '@babel/helper-module-imports': 7.18.6 821 | '@babel/types': 7.18.8 822 | solid-js: 1.5.1 823 | dev: true 824 | 825 | /source-map-js/1.0.2: 826 | resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} 827 | engines: {node: '>=0.10.0'} 828 | dev: true 829 | 830 | /supports-color/5.5.0: 831 | resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} 832 | engines: {node: '>=4'} 833 | dependencies: 834 | has-flag: 3.0.0 835 | dev: true 836 | 837 | /supports-preserve-symlinks-flag/1.0.0: 838 | resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} 839 | engines: {node: '>= 0.4'} 840 | dev: true 841 | 842 | /to-fast-properties/2.0.0: 843 | resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} 844 | engines: {node: '>=4'} 845 | dev: true 846 | 847 | /ts-toolbelt/9.6.0: 848 | resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==} 849 | dev: true 850 | 851 | /typescript/4.8.2: 852 | resolution: {integrity: sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==} 853 | engines: {node: '>=4.2.0'} 854 | hasBin: true 855 | dev: true 856 | 857 | /update-browserslist-db/1.0.4_browserslist@4.21.2: 858 | resolution: {integrity: sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==} 859 | hasBin: true 860 | peerDependencies: 861 | browserslist: '>= 4.21.0' 862 | dependencies: 863 | browserslist: 4.21.2 864 | escalade: 3.1.1 865 | picocolors: 1.0.0 866 | dev: true 867 | 868 | /vite-plugin-solid/2.3.0_solid-js@1.5.1+vite@3.0.9: 869 | resolution: {integrity: sha512-N2sa54C3UZC2nN5vpj5o6YP+XdIAZW6n6xv8OasxNAcAJPFeZT7EOVvumL0V4c8hBz1yuYniMWdESY8807fVSg==} 870 | peerDependencies: 871 | solid-js: ^1.3.17 872 | vite: ^3.0.0 873 | dependencies: 874 | '@babel/core': 7.18.6 875 | '@babel/preset-typescript': 7.18.6_@babel+core@7.18.6 876 | babel-preset-solid: 1.4.6_@babel+core@7.18.6 877 | merge-anything: 5.0.2 878 | solid-js: 1.5.1 879 | solid-refresh: 0.4.1_solid-js@1.5.1 880 | vite: 3.0.9 881 | transitivePeerDependencies: 882 | - supports-color 883 | dev: true 884 | 885 | /vite/3.0.9: 886 | resolution: {integrity: sha512-waYABTM+G6DBTCpYAxvevpG50UOlZuynR0ckTK5PawNVt7ebX6X7wNXHaGIO6wYYFXSM7/WcuFuO2QzhBB6aMw==} 887 | engines: {node: ^14.18.0 || >=16.0.0} 888 | hasBin: true 889 | peerDependencies: 890 | less: '*' 891 | sass: '*' 892 | stylus: '*' 893 | terser: ^5.4.0 894 | peerDependenciesMeta: 895 | less: 896 | optional: true 897 | sass: 898 | optional: true 899 | stylus: 900 | optional: true 901 | terser: 902 | optional: true 903 | dependencies: 904 | esbuild: 0.14.54 905 | postcss: 8.4.16 906 | resolve: 1.22.1 907 | rollup: 2.77.3 908 | optionalDependencies: 909 | fsevents: 2.3.2 910 | dev: true 911 | -------------------------------------------------------------------------------- /playground-solid/src/App.civet: -------------------------------------------------------------------------------- 1 | import { Component } from 'solid-js' 2 | 3 | import logo from './logo.svg' 4 | import styles from './App.module.css' 5 | 6 | const App: Component = () -> 7 |
8 |
9 | logo 10 |

11 | Edit src/App.civet and save to reload. 12 | 18 | Learn Solid 19 | 20 | export default App; 21 | -------------------------------------------------------------------------------- /playground-solid/src/App.module.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .logo { 6 | animation: logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .link { 23 | color: #b318f0; 24 | } 25 | 26 | @keyframes logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /playground-solid/src/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lorefnon/vite-plugin-civet/982cba1453ba155e65bbddc1c2404044e5f59b35/playground-solid/src/assets/favicon.ico -------------------------------------------------------------------------------- /playground-solid/src/index.civet: -------------------------------------------------------------------------------- 1 | /* @refresh reload */ 2 | { render } from 'solid-js/web' 3 | 4 | import './index.css' 5 | App from './App.civet' 6 | 7 | render () => , document.getElementById('root') as HTMLElement 8 | -------------------------------------------------------------------------------- /playground-solid/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 | -------------------------------------------------------------------------------- /playground-solid/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /playground-solid/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "ESNext", 5 | "module": "ESNext", 6 | "moduleResolution": "node", 7 | "allowSyntheticDefaultImports": true, 8 | "esModuleInterop": true, 9 | "jsx": "preserve", 10 | "jsxImportSource": "solid-js", 11 | "types": ["vite/client"], 12 | "noEmit": true, 13 | "isolatedModules": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /playground-solid/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import solidPlugin from 'vite-plugin-solid' 3 | import civetPlugin from 'vite-plugin-civet' 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | solidPlugin(), 8 | civetPlugin({ 9 | stripTypes: false, 10 | outputExtension: 'tsx', 11 | outputTransformerPlugin: 'solid', 12 | }), 13 | ], 14 | server: { 15 | port: 3000, 16 | }, 17 | build: { 18 | target: 'esnext', 19 | }, 20 | }) 21 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - playground-react-swc 3 | - playground-react-babel 4 | - playground-solid 5 | - playground-lit 6 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin, TransformResult } from 'vite' 2 | import { load as loadHTML } from 'cheerio' 3 | import type { FilterPattern } from '@rollup/pluginutils' 4 | import { createFilter } from '@rollup/pluginutils' 5 | import civet from '@danielx/civet' 6 | 7 | interface PluginOptions { 8 | outputTransformerPlugin?: string | string[] | { 9 | build?: string | string[] 10 | serve?: string | string[] 11 | } 12 | outputExtension?: string 13 | stripTypes?: boolean 14 | include?: FilterPattern 15 | exclude?: FilterPattern 16 | transformOutput?: ( 17 | code: string, 18 | id: string, 19 | options?: { ssr?: boolean } 20 | ) => TransformResult | Promise 21 | } 22 | 23 | export default function plugin(pluginOpts: PluginOptions = {}): Plugin { 24 | const filter = createFilter( 25 | pluginOpts.include ?? '**/*.civet', 26 | pluginOpts.exclude ?? 'node_modules/**', 27 | ) 28 | const parentPlugins: Plugin[] = [] 29 | const stripTypes 30 | = pluginOpts.stripTypes ?? !pluginOpts.outputTransformerPlugin 31 | const outputExtension = pluginOpts.outputExtension ?? (stripTypes ? '.js' : '.ts') 32 | 33 | const resolveParentPluginIds = (command: 'build' | 'serve'): string[] => { 34 | if (!pluginOpts.outputTransformerPlugin) 35 | return [] 36 | if (Array.isArray(pluginOpts.outputTransformerPlugin)) 37 | return pluginOpts.outputTransformerPlugin 38 | if (typeof pluginOpts.outputTransformerPlugin === 'string') 39 | return [pluginOpts.outputTransformerPlugin] 40 | const pluginIds = pluginOpts.outputTransformerPlugin[command] 41 | if (typeof pluginIds === 'string') 42 | return [pluginIds] 43 | return pluginIds ?? [] 44 | } 45 | 46 | return { 47 | name: 'vite:civet', 48 | enforce: 'pre', // run esbuild after transform 49 | 50 | config(config, { command }) { 51 | // Ensure esbuild runs on .civet files 52 | if (command === 'build') { 53 | return { 54 | esbuild: { 55 | include: [/\.civet$/], 56 | loader: 'tsx', 57 | }, 58 | } 59 | } 60 | }, 61 | 62 | configResolved(resolvedConfig) { 63 | if (!pluginOpts.outputTransformerPlugin) 64 | return 65 | for (const parentPluginId of resolveParentPluginIds(resolvedConfig.command)) { 66 | const parentPlugin = resolvedConfig.plugins?.find(it => it.name === parentPluginId) 67 | if (!parentPlugin) { 68 | throw new Error( 69 | `Unable to find plugin for specified outputTransformerPluginId: ${parentPluginId}: Is it added in vite config before vite-plugin-civet ?`, 70 | ) 71 | } 72 | parentPlugins.push(parentPlugin) 73 | } 74 | }, 75 | 76 | transformIndexHtml(html: string) { 77 | const $ = loadHTML(html) 78 | $('script').each(function () { 79 | const el = $(this) 80 | const src = el.attr('src') 81 | if (src?.match(/\.civet$/)) 82 | el.attr('src', src.replace(/\.civet$/, '.civet.js?transform')) 83 | }) 84 | return $.html() 85 | }, 86 | 87 | async resolveId(id, importer, options) { 88 | if (id.match(/\.civet/)) { 89 | const [pathPart, queryPart] = id.split('?') 90 | if (pathPart.match(/\.civet\.js$/) && queryPart === 'transform') { 91 | const transformedId = pathPart.replace(/\.js$/, '') 92 | const resolution = await this.resolve( 93 | transformedId, 94 | importer, 95 | options, 96 | ) 97 | return resolution?.id 98 | } 99 | } 100 | }, 101 | 102 | async transform(code, id, options) { 103 | if (!filter(id)) 104 | return null 105 | let transformed: TransformResult = { 106 | code: civet.compile(code, { 107 | inlineMap: true, 108 | filename: id, 109 | js: stripTypes, 110 | } as any) as string, 111 | map: null, 112 | } 113 | if (pluginOpts.transformOutput) 114 | transformed = await pluginOpts.transformOutput(transformed.code, id, options) 115 | 116 | for (const parentPlugin of parentPlugins) { 117 | if (parentPlugin?.transform) { 118 | const parentTransformHook = parentPlugin.transform 119 | const transformFn = (typeof parentTransformHook === 'function') 120 | ? parentTransformHook 121 | : parentTransformHook.handler 122 | const transformResult = await transformFn.apply(this, [ 123 | transformed.code, 124 | `${id}.${outputExtension}`, 125 | options, 126 | ]) 127 | if (typeof transformResult === 'string') 128 | transformed.code = transformResult 129 | else if (transformResult != null) 130 | Object.assign(transformed, transformResult) 131 | } 132 | } 133 | 134 | return transformed 135 | }, 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /test/index.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from 'vitest' 2 | 3 | describe('should', () => { 4 | it('work', () => { 5 | expect(1 + 1).toBe(2) 6 | }) 7 | }) 8 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "esnext", 5 | "lib": [ 6 | "esnext" 7 | ], 8 | "moduleResolution": "node", 9 | "esModuleInterop": true, 10 | "strict": true, 11 | "strictNullChecks": true, 12 | "resolveJsonModule": true, 13 | "skipLibCheck": true, 14 | "skipDefaultLibCheck": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'tsup' 2 | 3 | export default defineConfig({ 4 | entry: ['./src/index.ts'], 5 | format: ['cjs', 'esm'], 6 | dts: true, 7 | clean: true, 8 | }) 9 | --------------------------------------------------------------------------------