diff --git a/ts-router/.gitignore b/ts-router/.gitignore new file mode 100644 index 0000000..76add87 --- /dev/null +++ b/ts-router/.gitignore @@ -0,0 +1,2 @@ +node_modules +dist \ No newline at end of file diff --git a/ts-router/README.md b/ts-router/README.md new file mode 100644 index 0000000..c9dddca --- /dev/null +++ b/ts-router/README.md @@ -0,0 +1,32 @@ +## Usage + +Those templates dependencies are maintained via [pnpm](https://pnpm.js.org/) via `pnpm up -i --latest`. +This is the reason you see a `pnpm-lock.yaml`. This is my favorite package manager because it's fast and doesn't bloat the `node_modules` folder. + +Note that any package manager should work. I'd just advice you to remove the `pnpm-lock.yml` file before doing an install via your package manager of choice. + +```bash +$ pnpm install # or npm install or yarn install +``` +## Available Scripts + +In the project directory, you can run: + +### `npm run dev` + +Runs the app in the development mode.
+Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.
+ +### `npm run build` + +Builds the app for production to the `dist` folder.
+It correctly bundles Solid in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.
+Your app is ready to be deployed! + +## Deployment + +You can deploy the `dist` folder to any static host provider (netlify, surge, now, etc.) diff --git a/ts-router/index.html b/ts-router/index.html new file mode 100644 index 0000000..9def310 --- /dev/null +++ b/ts-router/index.html @@ -0,0 +1,15 @@ + + + + + + + Solid App + + + +
+ + + + diff --git a/ts-router/package.json b/ts-router/package.json new file mode 100644 index 0000000..6d6cb0a --- /dev/null +++ b/ts-router/package.json @@ -0,0 +1,19 @@ +{ + "name": "vite-template-solid", + "version": "0.0.0", + "description": "My solid + vite project + ts", + "scripts": { + "dev": "vite", + "build": "vite build" + }, + "license": "ISC", + "devDependencies": { + "vite": "^2.0.1", + "vite-plugin-solid": "^1.1.3", + "vite-plugin-windicss": "^0.4.7" + }, + "dependencies": { + "solid-app-router": "^0.0.23", + "solid-js": "^0.24.7" + } +} diff --git a/ts-router/pnpm-lock.yaml b/ts-router/pnpm-lock.yaml new file mode 100644 index 0000000..bbad3e3 --- /dev/null +++ b/ts-router/pnpm-lock.yaml @@ -0,0 +1,726 @@ +dependencies: + solid-app-router: 0.0.23_solid-js@0.24.7 + solid-js: 0.24.7 +devDependencies: + vite: 2.0.1 + vite-plugin-solid: 1.1.3 + vite-plugin-windicss: 0.4.7_vite@2.0.1 +lockfileVersion: 5.2 +packages: + /@babel/code-frame/7.12.13: + dependencies: + '@babel/highlight': 7.12.13 + dev: true + resolution: + integrity: sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== + /@babel/core/7.12.17: + dependencies: + '@babel/code-frame': 7.12.13 + '@babel/generator': 7.12.17 + '@babel/helper-module-transforms': 7.12.17 + '@babel/helpers': 7.12.17 + '@babel/parser': 7.12.17 + '@babel/template': 7.12.13 + '@babel/traverse': 7.12.17 + '@babel/types': 7.12.17 + convert-source-map: 1.7.0 + debug: 4.3.1 + gensync: 1.0.0-beta.2 + json5: 2.2.0 + lodash: 4.17.21 + semver: 5.7.1 + source-map: 0.5.7 + dev: true + engines: + node: '>=6.9.0' + resolution: + integrity: sha512-V3CuX1aBywbJvV2yzJScRxeiiw0v2KZZYYE3giywxzFJL13RiyPjaaDwhDnxmgFTTS7FgvM2ijr4QmKNIu0AtQ== + /@babel/generator/7.12.17: + dependencies: + '@babel/types': 7.12.17 + jsesc: 2.5.2 + source-map: 0.5.7 + dev: true + resolution: + integrity: sha512-DSA7ruZrY4WI8VxuS1jWSRezFnghEoYEFrZcw9BizQRmOZiUsiHl59+qEARGPqPikwA/GPTyRCi7isuCK/oyqg== + /@babel/helper-create-class-features-plugin/7.12.17_@babel+core@7.12.17: + dependencies: + '@babel/core': 7.12.17 + '@babel/helper-function-name': 7.12.13 + '@babel/helper-member-expression-to-functions': 7.12.17 + '@babel/helper-optimise-call-expression': 7.12.13 + '@babel/helper-replace-supers': 7.12.13 + '@babel/helper-split-export-declaration': 7.12.13 + dev: true + peerDependencies: + '@babel/core': ^7.0.0 + resolution: + integrity: sha512-I/nurmTxIxHV0M+rIpfQBF1oN342+yvl2kwZUrQuOClMamHF1w5tknfZubgNOLRoA73SzBFAdFcpb4M9HwOeWQ== + /@babel/helper-function-name/7.12.13: + dependencies: + '@babel/helper-get-function-arity': 7.12.13 + '@babel/template': 7.12.13 + '@babel/types': 7.12.17 + dev: true + resolution: + integrity: sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== + /@babel/helper-get-function-arity/7.12.13: + dependencies: + '@babel/types': 7.12.17 + dev: true + resolution: + integrity: sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== + /@babel/helper-member-expression-to-functions/7.12.17: + dependencies: + '@babel/types': 7.12.17 + dev: true + resolution: + integrity: sha512-Bzv4p3ODgS/qpBE0DiJ9qf5WxSmrQ8gVTe8ClMfwwsY2x/rhykxxy3bXzG7AGTnPB2ij37zGJ/Q/6FruxHxsxg== + /@babel/helper-module-imports/7.12.13: + dependencies: + '@babel/types': 7.12.17 + dev: true + resolution: + integrity: sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== + /@babel/helper-module-transforms/7.12.17: + dependencies: + '@babel/helper-module-imports': 7.12.13 + '@babel/helper-replace-supers': 7.12.13 + '@babel/helper-simple-access': 7.12.13 + '@babel/helper-split-export-declaration': 7.12.13 + '@babel/helper-validator-identifier': 7.12.11 + '@babel/template': 7.12.13 + '@babel/traverse': 7.12.17 + '@babel/types': 7.12.17 + lodash: 4.17.21 + dev: true + resolution: + integrity: sha512-sFL+p6zOCQMm9vilo06M4VHuTxUAwa6IxgL56Tq1DVtA0ziAGTH1ThmJq7xwPqdQlgAbKX3fb0oZNbtRIyA5KQ== + /@babel/helper-optimise-call-expression/7.12.13: + dependencies: + '@babel/types': 7.12.17 + dev: true + resolution: + integrity: sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA== + /@babel/helper-plugin-utils/7.12.13: + dev: true + resolution: + integrity: sha512-C+10MXCXJLiR6IeG9+Wiejt9jmtFpxUc3MQqCmPY8hfCjyUGl9kT+B2okzEZrtykiwrc4dbCPdDoz0A/HQbDaA== + /@babel/helper-replace-supers/7.12.13: + dependencies: + '@babel/helper-member-expression-to-functions': 7.12.17 + '@babel/helper-optimise-call-expression': 7.12.13 + '@babel/traverse': 7.12.17 + '@babel/types': 7.12.17 + dev: true + resolution: + integrity: sha512-pctAOIAMVStI2TMLhozPKbf5yTEXc0OJa0eENheb4w09SrgOWEs+P4nTOZYJQCqs8JlErGLDPDJTiGIp3ygbLg== + /@babel/helper-simple-access/7.12.13: + dependencies: + '@babel/types': 7.12.17 + dev: true + resolution: + integrity: sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA== + /@babel/helper-split-export-declaration/7.12.13: + dependencies: + '@babel/types': 7.12.17 + dev: true + resolution: + integrity: sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== + /@babel/helper-validator-identifier/7.12.11: + dev: true + resolution: + integrity: sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== + /@babel/helper-validator-option/7.12.17: + dev: true + resolution: + integrity: sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== + /@babel/helpers/7.12.17: + dependencies: + '@babel/template': 7.12.13 + '@babel/traverse': 7.12.17 + '@babel/types': 7.12.17 + dev: true + resolution: + integrity: sha512-tEpjqSBGt/SFEsFikKds1sLNChKKGGR17flIgQKXH4fG6m9gTgl3gnOC1giHNyaBCSKuTfxaSzHi7UnvqiVKxg== + /@babel/highlight/7.12.13: + dependencies: + '@babel/helper-validator-identifier': 7.12.11 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + resolution: + integrity: sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww== + /@babel/parser/7.12.17: + dev: true + engines: + node: '>=6.0.0' + hasBin: true + resolution: + integrity: sha512-r1yKkiUTYMQ8LiEI0UcQx5ETw5dpTLn9wijn9hk6KkTtOK95FndDN10M+8/s6k/Ymlbivw0Av9q4SlgF80PtHg== + /@babel/plugin-syntax-jsx/7.12.13_@babel+core@7.12.17: + dependencies: + '@babel/core': 7.12.17 + '@babel/helper-plugin-utils': 7.12.13 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g== + /@babel/plugin-syntax-typescript/7.12.13_@babel+core@7.12.17: + dependencies: + '@babel/core': 7.12.17 + '@babel/helper-plugin-utils': 7.12.13 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w== + /@babel/plugin-transform-typescript/7.12.17_@babel+core@7.12.17: + dependencies: + '@babel/core': 7.12.17 + '@babel/helper-create-class-features-plugin': 7.12.17_@babel+core@7.12.17 + '@babel/helper-plugin-utils': 7.12.13 + '@babel/plugin-syntax-typescript': 7.12.13_@babel+core@7.12.17 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-1bIYwnhRoetxkFonuZRtDZPFEjl1l5r+3ITkxLC3mlMaFja+GQFo94b/WHEPjqWLU9Bc+W4oFZbvCGe9eYMu1g== + /@babel/preset-typescript/7.12.17_@babel+core@7.12.17: + dependencies: + '@babel/core': 7.12.17 + '@babel/helper-plugin-utils': 7.12.13 + '@babel/helper-validator-option': 7.12.17 + '@babel/plugin-transform-typescript': 7.12.17_@babel+core@7.12.17 + dev: true + peerDependencies: + '@babel/core': ^7.0.0-0 + resolution: + integrity: sha512-T513uT4VSThRcmWeqcLkITKJ1oGQho9wfWuhQm10paClQkp1qyd0Wf8mvC8Se7UYssMyRSj4tZYpVTkCmAK/mA== + /@babel/template/7.12.13: + dependencies: + '@babel/code-frame': 7.12.13 + '@babel/parser': 7.12.17 + '@babel/types': 7.12.17 + dev: true + resolution: + integrity: sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== + /@babel/traverse/7.12.17: + dependencies: + '@babel/code-frame': 7.12.13 + '@babel/generator': 7.12.17 + '@babel/helper-function-name': 7.12.13 + '@babel/helper-split-export-declaration': 7.12.13 + '@babel/parser': 7.12.17 + '@babel/types': 7.12.17 + debug: 4.3.1 + globals: 11.12.0 + lodash: 4.17.21 + dev: true + resolution: + integrity: sha512-LGkTqDqdiwC6Q7fWSwQoas/oyiEYw6Hqjve5KOSykXkmFJFqzvGMb9niaUEag3Rlve492Mkye3gLw9FTv94fdQ== + /@babel/types/7.12.17: + dependencies: + '@babel/helper-validator-identifier': 7.12.11 + lodash: 4.17.21 + to-fast-properties: 2.0.0 + dev: true + resolution: + integrity: sha512-tNMDjcv/4DIcHxErTgwB9q2ZcYyN0sUfgGKUK/mm1FJK7Wz+KstoEekxrl/tBiNDgLK1HGi+sppj1An/1DR4fQ== + /@nodelib/fs.scandir/2.1.4: + dependencies: + '@nodelib/fs.stat': 2.0.4 + run-parallel: 1.2.0 + dev: true + engines: + node: '>= 8' + resolution: + integrity: sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== + /@nodelib/fs.stat/2.0.4: + dev: true + engines: + node: '>= 8' + resolution: + integrity: sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== + /@nodelib/fs.walk/1.2.6: + dependencies: + '@nodelib/fs.scandir': 2.1.4 + fastq: 1.10.1 + dev: true + engines: + node: '>= 8' + resolution: + integrity: sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== + /@windicss/plugin-utils/0.4.7: + dependencies: + esbuild: 0.8.50 + esbuild-register: 2.0.0_esbuild@0.8.50 + fast-glob: 3.2.5 + micromatch: 4.0.2 + windicss: 2.1.19 + dev: true + resolution: + integrity: sha512-esAqHNpNL4DIWd/uFn8Y0chzkcrFVrUcO41JosyHu78ujEaOD5Joi5ZyPVmTIiaOlFwNHpfb0wNtkCr3J+vU/w== + /ansi-styles/3.2.1: + dependencies: + color-convert: 1.9.3 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + /babel-plugin-jsx-dom-expressions/0.25.4_@babel+core@7.12.17: + dependencies: + '@babel/helper-module-imports': 7.12.13 + '@babel/plugin-syntax-jsx': 7.12.13_@babel+core@7.12.17 + '@babel/types': 7.12.17 + dev: true + peerDependencies: + '@babel/core': '*' + resolution: + integrity: sha512-0A5NvJfpOZV/6G5Mu5WfEDGJ3nthYgT911BgL8IT4pKBNjOCzdxMu2HaaiQtycVKw7ZB/0BfGnKZnB/tqOIlEw== + /babel-preset-solid/0.24.2_@babel+core@7.12.17: + dependencies: + babel-plugin-jsx-dom-expressions: 0.25.4_@babel+core@7.12.17 + dev: true + peerDependencies: + '@babel/core': '*' + resolution: + integrity: sha512-Ihm37tnVvE6BRDQIAunW9bI598L1+a6OwJS2KdZdMEQiX2fM7sVVc7w2wkpw0a5JP8haJQ92jyLL56OYCfEa9w== + /braces/3.0.2: + dependencies: + fill-range: 7.0.1 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + /buffer-from/1.1.1: + dev: true + resolution: + integrity: sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + /chalk/2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + /color-convert/1.9.3: + dependencies: + color-name: 1.1.3 + dev: true + resolution: + integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + /color-name/1.1.3: + dev: true + resolution: + integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + /colorette/1.2.1: + dev: true + resolution: + integrity: sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== + /convert-source-map/1.7.0: + dependencies: + safe-buffer: 5.1.2 + dev: true + resolution: + integrity: sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + /debug/4.3.1: + dependencies: + ms: 2.1.2 + dev: true + engines: + node: '>=6.0' + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + resolution: + integrity: sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + /esbuild-register/2.0.0_esbuild@0.8.50: + dependencies: + esbuild: 0.8.50 + joycon: 2.2.5 + pirates: 4.0.1 + source-map-support: 0.5.19 + strip-json-comments: 3.1.1 + dev: true + peerDependencies: + esbuild: '>=0.8.31' + resolution: + integrity: sha512-98i1+7OnCURCbKaWw5wnY05e4v7uknFEER7LtVxi/lCs8U+sl6/LnITvfeoDLrsqxlA3O6BjxK8QqsirfYULfA== + /esbuild/0.8.50: + dev: true + hasBin: true + requiresBuild: true + resolution: + integrity: sha512-oidFLXssA7IccYzkqLVZSqNJDwDq8Mh/vqvrW+3fPWM7iUiC5O2bCllhnO8+K9LlyL/2Z6n+WwRJAz9fqSIVRg== + /escape-string-regexp/1.0.5: + dev: true + engines: + node: '>=0.8.0' + resolution: + integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + /fast-glob/3.2.5: + dependencies: + '@nodelib/fs.stat': 2.0.4 + '@nodelib/fs.walk': 1.2.6 + glob-parent: 5.1.1 + merge2: 1.4.1 + micromatch: 4.0.2 + picomatch: 2.2.2 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== + /fastq/1.10.1: + dependencies: + reusify: 1.0.4 + dev: true + resolution: + integrity: sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA== + /fill-range/7.0.1: + dependencies: + to-regex-range: 5.0.1 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + /fsevents/2.3.2: + dev: true + engines: + node: ^8.16.0 || ^10.6.0 || >=11.0.0 + optional: true + os: + - darwin + resolution: + integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + /function-bind/1.1.1: + dev: true + resolution: + integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + /gensync/1.0.0-beta.2: + dev: true + engines: + node: '>=6.9.0' + resolution: + integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + /glob-parent/5.1.1: + dependencies: + is-glob: 4.0.1 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + /globals/11.12.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + /has-flag/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + /has/1.0.3: + dependencies: + function-bind: 1.1.1 + dev: true + engines: + node: '>= 0.4.0' + resolution: + integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + /is-core-module/2.2.0: + dependencies: + has: 1.0.3 + dev: true + resolution: + integrity: sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + /is-extglob/2.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + /is-glob/4.0.1: + dependencies: + is-extglob: 2.1.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + /is-number/7.0.0: + dev: true + engines: + node: '>=0.12.0' + resolution: + integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + /joycon/2.2.5: + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-YqvUxoOcVPnCp0VU1/56f+iKSdvIRJYPznH22BdXV3xMk75SFXhWeJkZ8C9XxUWt1b5x2X1SxuFygW1U0FmkEQ== + /js-tokens/4.0.0: + dev: true + resolution: + integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + /jsesc/2.5.2: + dev: true + engines: + node: '>=4' + hasBin: true + resolution: + integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + /json5/2.2.0: + dependencies: + minimist: 1.2.5 + dev: true + engines: + node: '>=6' + hasBin: true + resolution: + integrity: sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== + /lodash/4.17.21: + dev: true + resolution: + integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + /merge2/1.4.1: + dev: true + engines: + node: '>= 8' + resolution: + integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + /micromatch/4.0.2: + dependencies: + braces: 3.0.2 + picomatch: 2.2.2 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + /minimist/1.2.5: + dev: true + resolution: + integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + /ms/2.1.2: + dev: true + resolution: + integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + /nanoid/3.1.20: + dev: true + engines: + node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 + hasBin: true + resolution: + integrity: sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== + /node-modules-regexp/1.0.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= + /path-parse/1.0.6: + dev: true + resolution: + integrity: sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + /picomatch/2.2.2: + dev: true + engines: + node: '>=8.6' + resolution: + integrity: sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + /pirates/4.0.1: + dependencies: + node-modules-regexp: 1.0.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== + /postcss/8.2.6: + dependencies: + colorette: 1.2.1 + nanoid: 3.1.20 + source-map: 0.6.1 + dev: true + engines: + node: ^10 || ^12 || >=14 + resolution: + integrity: sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg== + /queue-microtask/1.2.2: + dev: true + resolution: + integrity: sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg== + /resolve.exports/1.0.2: + dev: true + engines: + node: '>=10' + resolution: + integrity: sha512-1+PDdTR3xrGWB/NzXLkzS1+PQlJ+BOR2baBGJSVat4HasiY1mnkyAQws3FUTmBDB79oK54QFaDM8Ig9nUtJwvQ== + /resolve/1.20.0: + dependencies: + is-core-module: 2.2.0 + path-parse: 1.0.6 + dev: true + resolution: + integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + /reusify/1.0.4: + dev: true + engines: + iojs: '>=1.0.0' + node: '>=0.10.0' + resolution: + integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + /rollup/2.39.0: + dev: true + engines: + node: '>=10.0.0' + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + resolution: + integrity: sha512-+WR3bttcq7zE+BntH09UxaW3bQo3vItuYeLsyk4dL2tuwbeSKJuvwiawyhEnvRdRgrII0Uzk00FpctHO/zB1kw== + /run-parallel/1.2.0: + dependencies: + queue-microtask: 1.2.2 + dev: true + resolution: + integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + /safe-buffer/5.1.2: + dev: true + resolution: + integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + /semver/5.7.1: + dev: true + hasBin: true + resolution: + integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + /solid-app-router/0.0.23_solid-js@0.24.7: + dependencies: + solid-js: 0.24.7 + dev: false + peerDependencies: + solid-js: ^0.24.0 + resolution: + integrity: sha512-VVgjgSx6MewArRVBKMuTakxHPCHKUsGE6JI2NyxUQk4K/9nPe2Szyqe5K4Mopc0Xr6Vf/HJgZV3/MZDJp5JLtg== + /solid-js/0.24.7: + resolution: + integrity: sha512-Hi/Kvf3+e+664bBMG5NhZb+0jkWJHvMbWagCDH1AQMODFwoOZABBpUK1xfOhrtHEWMKpIz3fOzg5jOWwd/cdMA== + /solid-refresh/0.0.3_solid-js@0.24.7: + dependencies: + solid-js: 0.24.7 + dev: true + peerDependencies: + solid-js: ^0.24.0 + resolution: + integrity: sha512-RqUq4d4IMPel8mHwy4WA5RMpymNtIX6Ux5tlD048KRV64b82/dOoNEbcrRf3cjbjnqlNbYA2dQR30mQoZMYZAw== + /source-map-support/0.5.19: + dependencies: + buffer-from: 1.1.1 + source-map: 0.6.1 + dev: true + resolution: + integrity: sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + /source-map/0.5.7: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + /source-map/0.6.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + /strip-json-comments/3.1.1: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + /supports-color/5.5.0: + dependencies: + has-flag: 3.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + /to-fast-properties/2.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + /to-regex-range/5.0.1: + dependencies: + is-number: 7.0.0 + dev: true + engines: + node: '>=8.0' + resolution: + integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + /vite-plugin-solid/1.1.3: + dependencies: + '@babel/core': 7.12.17 + '@babel/preset-typescript': 7.12.17_@babel+core@7.12.17 + babel-preset-solid: 0.24.2_@babel+core@7.12.17 + resolve.exports: 1.0.2 + solid-js: 0.24.7 + solid-refresh: 0.0.3_solid-js@0.24.7 + vite: 2.0.1 + dev: true + resolution: + integrity: sha512-zKoQK3xGkvOAJ3DhuSv/AzoRVNwzy1U7XSuZODLf+UL07v5oRo/RMquJdzJlUPgCBPzeqm6dKVXyMt0UTPW1gw== + /vite-plugin-windicss/0.4.7_vite@2.0.1: + dependencies: + '@windicss/plugin-utils': 0.4.7 + vite: 2.0.1 + windicss: 2.1.19 + dev: true + peerDependencies: + vite: ^2.0.1 + resolution: + integrity: sha512-xesJIam2t3yBppZMyMoHSUDHtZOoDRcIdfzCRwIgbAnjELo8t/cR60OfGJf5JWLAR72oZ5/dYVYT2o0EO0co6A== + /vite/2.0.1: + dependencies: + esbuild: 0.8.50 + postcss: 8.2.6 + resolve: 1.20.0 + rollup: 2.39.0 + dev: true + engines: + node: '>=12.0.0' + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + resolution: + integrity: sha512-x7ZfikjNs+6n4cdvwb9L5r5xBCdjmtmHFHaI4JVR3nAkJbMCK/dynfDWky8/NseZ9Ncz1jVxTQ/Bcf+n1ps1Ww== + /windicss/2.1.19: + dev: true + engines: + node: '>= 12' + hasBin: true + resolution: + integrity: sha512-jqHQ6tEWt/nxN/KLvxYyqO6K0JV3nlwC5D60Hrry02G4D3h0gx/dN/3FaqC0n5EqOKCcIrDasrmclquKiJA4JQ== +specifiers: + solid-app-router: ^0.0.23 + solid-js: ^0.24.7 + vite: ^2.0.1 + vite-plugin-solid: ^1.1.3 + vite-plugin-windicss: ^0.4.7 diff --git a/ts-router/src/app.tsx b/ts-router/src/app.tsx new file mode 100644 index 0000000..e87a903 --- /dev/null +++ b/ts-router/src/app.tsx @@ -0,0 +1,46 @@ +import { Component } from "solid-js"; +import { Link, Route, useRouter } from "solid-app-router"; + +const App: Component = () => { + const router = useRouter(); + + return ( + <> + + +
+ +
+ + ); +}; + +export default App; diff --git a/ts-router/src/errors/404.tsx b/ts-router/src/errors/404.tsx new file mode 100644 index 0000000..56e5ad5 --- /dev/null +++ b/ts-router/src/errors/404.tsx @@ -0,0 +1,8 @@ +export default function NotFound() { + return ( +
+

404: Not Found

+

It's gone 😞

+
+ ); +} diff --git a/ts-router/src/index.tsx b/ts-router/src/index.tsx new file mode 100644 index 0000000..e1b308c --- /dev/null +++ b/ts-router/src/index.tsx @@ -0,0 +1,15 @@ +import "windi.css"; + +import { render } from "solid-js/web"; +import { Router } from "solid-app-router"; +import { routes } from "./routes"; +import App from "./app"; + +render( + () => ( + + + + ), + document.getElementById("root") +); diff --git a/ts-router/src/pages/about.tsx b/ts-router/src/pages/about.tsx new file mode 100644 index 0000000..1af565e --- /dev/null +++ b/ts-router/src/pages/about.tsx @@ -0,0 +1,13 @@ +export default function About(props) { + return ( +
+

About

+ +

A page all about this website.

+ +
+        {JSON.stringify(props, null, 2)}
+      
+
+ ); +} diff --git a/ts-router/src/pages/home.tsx b/ts-router/src/pages/home.tsx new file mode 100644 index 0000000..08871ba --- /dev/null +++ b/ts-router/src/pages/home.tsx @@ -0,0 +1,30 @@ +import { createSignal } from "solid-js"; + +export default function Home() { + const [count, setCount] = createSignal(0); + + return ( +
+

Home

+

This is the home page.

+ +
+ + + Count: {count} + + +
+
+ ); +} diff --git a/ts-router/src/routes.ts b/ts-router/src/routes.ts new file mode 100644 index 0000000..588abbd --- /dev/null +++ b/ts-router/src/routes.ts @@ -0,0 +1,24 @@ +import { RouteDefinition } from "solid-app-router"; +import { lazy, Component } from "solid-js"; + +const pages = import.meta.glob("./pages/**/*.tsx"); + +const autoRoutes = Object.keys(pages).map((path) => { + const name = path.match(/\.\/pages(.*)\.[tj]sx$/)[1].toLowerCase(); + const Comp = pages[path] as () => Promise<{ default: Component }>; + + const routePath = ["/home", "/index"].includes(name) ? "/" : name; + + return { + path: routePath, + component: lazy(Comp), + } as RouteDefinition; +}); + +export const routes: RouteDefinition[] = [ + ...autoRoutes, + { + path: "**", + component: lazy(() => import("./errors/404")), + }, +]; diff --git a/ts-router/tailwind.config.ts b/ts-router/tailwind.config.ts new file mode 100644 index 0000000..20d5599 --- /dev/null +++ b/ts-router/tailwind.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from "vite-plugin-windicss"; + +export default defineConfig({ + darkMode: false, + theme: { + extend: {}, + }, +}); diff --git a/ts-router/tsconfig.json b/ts-router/tsconfig.json new file mode 100644 index 0000000..e27ffb7 --- /dev/null +++ b/ts-router/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + "types": ["vite/client"] + } +} diff --git a/ts-router/vite.config.ts b/ts-router/vite.config.ts new file mode 100644 index 0000000..340126a --- /dev/null +++ b/ts-router/vite.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from "vite"; +import solidPlugin from "vite-plugin-solid"; +import WindiCSS from "vite-plugin-windicss"; + +export default defineConfig({ + plugins: [solidPlugin(), WindiCSS()], + build: { + target: "esnext", + polyfillDynamicImport: false, + }, +});