From 9db0670fcc7d10be01e135368422118e0dbebb7a Mon Sep 17 00:00:00 2001 From: Alexandre Mouton-Brady Date: Sat, 23 Jan 2021 13:56:32 +0100 Subject: [PATCH] :arrow_up: Update to latest dependencies --- ts-tailwind/README.md | 9 +++- ts-tailwind/package.json | 4 +- ts-tailwind/pnpm-lock.yaml | 78 ++++++++++++++-------------------- ts-tailwind/src/App.tsx | 6 ++- ts-tailwind/src/index.tsx | 9 +++- ts-tailwind/src/tailwind.css | 2 - ts-tailwind/tailwind.config.js | 19 +++------ ts-tailwind/vite.config.ts | 4 ++ 8 files changed, 62 insertions(+), 69 deletions(-) diff --git a/ts-tailwind/README.md b/ts-tailwind/README.md index 03a2e3f..d307303 100644 --- a/ts-tailwind/README.md +++ b/ts-tailwind/README.md @@ -1,14 +1,19 @@ ## 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 -$ npm install # or pnpm install or yarn install +$ pnpm install # or npm install or yarn install ``` ## Available Scripts In the project directory, you can run: -### `npm start` +### `npm run dev` Runs the app in the development mode.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. diff --git a/ts-tailwind/package.json b/ts-tailwind/package.json index 00ebe68..6f87010 100644 --- a/ts-tailwind/package.json +++ b/ts-tailwind/package.json @@ -10,8 +10,8 @@ "devDependencies": { "autoprefixer": "^10.2.3", "tailwindcss": "^2.0.2", - "vite": "^2.0.0-beta.33", - "vite-plugin-solid": "^0.6.0" + "vite": "^2.0.0-beta.44", + "vite-plugin-solid": "^0.7.0" }, "dependencies": { "solid-js": "^0.23.11" diff --git a/ts-tailwind/pnpm-lock.yaml b/ts-tailwind/pnpm-lock.yaml index bdc49d4..318ded8 100644 --- a/ts-tailwind/pnpm-lock.yaml +++ b/ts-tailwind/pnpm-lock.yaml @@ -3,8 +3,8 @@ dependencies: devDependencies: autoprefixer: 10.2.3 tailwindcss: 2.0.2_autoprefixer@10.2.3 - vite: 2.0.0-beta.33 - vite-plugin-solid: 0.6.0 + vite: 2.0.0-beta.44 + vite-plugin-solid: 0.7.0 lockfileVersion: 5.2 packages: /@babel/code-frame/7.12.11: @@ -280,7 +280,7 @@ packages: /autoprefixer/10.2.3: dependencies: browserslist: 4.16.1 - caniuse-lite: 1.0.30001178 + caniuse-lite: 1.0.30001179 colorette: 1.2.1 fraction.js: 4.0.13 normalize-range: 0.1.2 @@ -324,9 +324,9 @@ packages: integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== /browserslist/4.16.1: dependencies: - caniuse-lite: 1.0.30001178 + caniuse-lite: 1.0.30001179 colorette: 1.2.1 - electron-to-chromium: 1.3.642 + electron-to-chromium: 1.3.644 escalade: 3.1.1 node-releases: 1.1.70 dev: true @@ -347,10 +347,10 @@ packages: node: '>= 6' resolution: integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== - /caniuse-lite/1.0.30001178: + /caniuse-lite/1.0.30001179: dev: true resolution: - integrity: sha512-VtdZLC0vsXykKni8Uztx45xynytOi71Ufx9T8kHptSw9AL4dpqailUJJHavttuzUe1KYuBYtChiWv+BAb7mPmQ== + integrity: sha512-blMmO0QQujuUWZKyVrD1msR4WNDAqb/UPO1Sw2WWsQ7deoM5bJiicKnWJ1Y0NS/aGINSnKPIWBMw5luX+NDUCA== /chalk/2.4.2: dependencies: ansi-styles: 3.2.1 @@ -469,16 +469,16 @@ packages: dev: true resolution: integrity: sha1-6S7f2tplN9SE1zwBcv0eugxJdv8= - /electron-to-chromium/1.3.642: + /electron-to-chromium/1.3.644: dev: true resolution: - integrity: sha512-cev+jOrz/Zm1i+Yh334Hed6lQVOkkemk2wRozfMF4MtTR7pxf3r3L5Rbd7uX1zMcEqVJ7alJBnJL7+JffkC6FQ== - /esbuild/0.8.33: + integrity: sha512-N7FLvjDPADxad+OXXBuYfcvDvCBG0aW8ZZGr7G91sZMviYbnQJFxdSvUus4SJ0K7Q8dzMxE+Wx1d/CrJIIJ0sw== + /esbuild/0.8.34: dev: true hasBin: true requiresBuild: true resolution: - integrity: sha512-2ms/P6Y9zJfopR9dKo2vHzhXKfGSNlquVVoVOF8YnhjuzZVrvManMVBPadBsR/t7jzIkRnwqvxrs7d4f3C3eyg== + integrity: sha512-tnr0V1ooakYr1aRLXQLzCn2GVG1kBTW3FWpRyC+NgrR3ntsouVpJOlTOV0BS4YLATx3/c+x3h/uBq9lWJlUAtQ== /escalade/3.1.1: dev: true engines: @@ -495,17 +495,17 @@ packages: dev: true resolution: integrity: sha512-E1fz2Xs9ltlUp+qbiyx9wmt2n9dRzPsS11Jtdb8D2o+cC7wr9xkkKsVKJuBX0ST+LVS+LhLO+SbLJNtfWcJvXA== - /fs-extra/9.0.1: + /fs-extra/9.1.0: dependencies: at-least-node: 1.0.0 graceful-fs: 4.2.4 jsonfile: 6.1.0 - universalify: 1.0.0 + universalify: 2.0.0 dev: true engines: node: '>=10' resolution: - integrity: sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== + integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== /fs.realpath/1.0.0: dev: true resolution: @@ -721,7 +721,7 @@ packages: /postcss-js/3.0.3: dependencies: camelcase-css: 2.0.1 - postcss: 8.2.2 + postcss: 8.2.4 dev: true engines: node: '>=10.0' @@ -766,16 +766,6 @@ packages: node: '>=4.0.0' resolution: integrity: sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag== - /postcss/8.2.2: - dependencies: - colorette: 1.2.1 - nanoid: 3.1.20 - source-map: 0.6.1 - dev: true - engines: - node: ^10 || ^12 || >=14 - resolution: - integrity: sha512-HM1NDNWLgglJPQQMNwvLxgH2KcrKZklKLi/xXYIOaqQB57p/pDWEJNS83PVICYsn1Dg/9C26TiejNr422/ePaQ== /postcss/8.2.4: dependencies: colorette: 1.2.1 @@ -796,19 +786,19 @@ packages: dependencies: commander: 6.2.1 glob: 7.1.6 - postcss: 8.2.2 + postcss: 8.2.4 postcss-selector-parser: 6.0.4 dev: true hasBin: true resolution: integrity: sha512-hRSLN9mguJ2lzlIQtW4qmPS2kh6oMnA9RxdIYK8sz18QYqd6ePp4GNDl18oWHA1f2v2NEQIh51CO8s/E3YGckQ== - /reduce-css-calc/2.1.7: + /reduce-css-calc/2.1.8: dependencies: css-unit-converter: 1.1.2 postcss-value-parser: 3.3.1 dev: true resolution: - integrity: sha512-fDnlZ+AybAS3C7Q9xDq5y8A2z+lT63zLbynew/lur/IR24OQF5x98tfNwf79mzEdfywZ0a2wpM860FhFfMxZlA== + integrity: sha512-8liAVezDmUcH+tdzoEGrhfbGcP7nOV4NkGE3a74+qqvE7nt9i4sKLGBuZNOnpI4WiGksiNPklZxva80061QiPg== /resolve/1.19.0: dependencies: is-core-module: 2.2.0 @@ -816,7 +806,7 @@ packages: dev: true resolution: integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - /rollup/2.37.0: + /rollup/2.38.0: dev: true engines: node: '>=10.0.0' @@ -824,7 +814,7 @@ packages: optionalDependencies: fsevents: 2.1.3 resolution: - integrity: sha512-cbxuxkMGCQV+TnVh+yZSUerbVb5i8soRydbzHYoMNojgt7MMi+jDLLs24U9HHCssKkwkXmsj+LXcOZMldTbz2w== + integrity: sha512-ay9zDiNitZK/LNE/EM2+v5CZ7drkB2xyDljvb1fQJCGnq43ZWRkhxN145oV8GmoW1YNi4sA/1Jdkr2LfawJoXw== /safe-buffer/5.1.2: dev: true resolution: @@ -880,7 +870,7 @@ packages: color: 3.1.3 detective: 5.2.0 didyoumean: 1.2.1 - fs-extra: 9.0.1 + fs-extra: 9.1.0 html-tags: 3.1.0 lodash: 4.17.20 modern-normalize: 1.0.0 @@ -892,7 +882,7 @@ packages: postcss-selector-parser: 6.0.4 postcss-value-parser: 4.1.0 pretty-hrtime: 1.0.3 - reduce-css-calc: 2.1.7 + reduce-css-calc: 2.1.8 resolve: 1.19.0 dev: true engines: @@ -913,12 +903,6 @@ packages: dev: true resolution: integrity: sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - /universalify/1.0.0: - dev: true - engines: - node: '>= 10.0.0' - resolution: - integrity: sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== /universalify/2.0.0: dev: true engines: @@ -929,22 +913,22 @@ packages: dev: true resolution: integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - /vite-plugin-solid/0.6.0: + /vite-plugin-solid/0.7.0: dependencies: '@babel/core': 7.12.10 '@babel/preset-typescript': 7.12.7_@babel+core@7.12.10 babel-preset-solid: 0.23.8_@babel+core@7.12.10 solid-js: 0.23.11 - vite: 2.0.0-beta.33 + vite: 2.0.0-beta.44 dev: true resolution: - integrity: sha512-nGF87Mh6g5ZKsmausJRRl1MQRduv2T/v57JZQVYPAtLhIboVE62BtfXBkVNKHBhU7WoKM+0wCm5bt34uEJwrRw== - /vite/2.0.0-beta.33: + integrity: sha512-gU0xb5zFpjIZiCvPpyir5fSBDIUPC2S32NYdJ9x8pbA/W0J/bzfB5yw2DTa7ZQoFXfnkNWZsEdsjkGXhw0aHTw== + /vite/2.0.0-beta.44: dependencies: - esbuild: 0.8.33 + esbuild: 0.8.34 postcss: 8.2.4 resolve: 1.19.0 - rollup: 2.37.0 + rollup: 2.38.0 dev: true engines: node: '>=12.0.0' @@ -952,7 +936,7 @@ packages: optionalDependencies: fsevents: 2.1.3 resolution: - integrity: sha512-vg7rZbO19w1+nkV3fXsk0ggfI7J8DBDm74olVKgN7/SarrlisOZI/YWwP4XybGVNPnsSsOG9pKXhXl1mY6Oe5A== + integrity: sha512-NTzmP7HEKDg3J5r3I22f87jK3ugPVEU81BQ8hWn3hNWU0msCziUlj7aHwItSUEbQA+ymqO3TBO2fN7Aa+OKckQ== /wrappy/1.0.2: dev: true resolution: @@ -967,5 +951,5 @@ specifiers: autoprefixer: ^10.2.3 solid-js: ^0.23.11 tailwindcss: ^2.0.2 - vite: ^2.0.0-beta.33 - vite-plugin-solid: ^0.6.0 + vite: ^2.0.0-beta.44 + vite-plugin-solid: ^0.7.0 diff --git a/ts-tailwind/src/App.tsx b/ts-tailwind/src/App.tsx index fa552fe..74d62bd 100644 --- a/ts-tailwind/src/App.tsx +++ b/ts-tailwind/src/App.tsx @@ -1,7 +1,9 @@ -import { Component } from "solid-js"; +import type { Component } from "solid-js"; const App: Component = () => { - return

minimal

; + return ( +

Hello tailwind!

+ ); }; export default App; diff --git a/ts-tailwind/src/index.tsx b/ts-tailwind/src/index.tsx index 0920d8c..1fecb84 100644 --- a/ts-tailwind/src/index.tsx +++ b/ts-tailwind/src/index.tsx @@ -1,6 +1,11 @@ import "./tailwind.css"; -import { render } from "solid-js/dom"; +import { render } from "solid-js/web"; import App from "./App"; -export const dispose = render(() => , document.getElementById("root")); +const dispose = render(() => , document.getElementById("root")); + +if (import.meta.hot) { + import.meta.hot.accept(); + import.meta.hot.dispose(dispose); +} diff --git a/ts-tailwind/src/tailwind.css b/ts-tailwind/src/tailwind.css index 7f39374..b5c61c9 100644 --- a/ts-tailwind/src/tailwind.css +++ b/ts-tailwind/src/tailwind.css @@ -1,5 +1,3 @@ @tailwind base; - @tailwind components; - @tailwind utilities; diff --git a/ts-tailwind/tailwind.config.js b/ts-tailwind/tailwind.config.js index 3061c17..e8200b9 100644 --- a/ts-tailwind/tailwind.config.js +++ b/ts-tailwind/tailwind.config.js @@ -1,16 +1,11 @@ module.exports = { - purge: { - enabled: process.env["npm_lifecycle_event"] === "build", - mode: "layers", - layers: ["base", "components", "utilities"], - content: [ - "src/**/*.tsx", - "src/**/*.ts", - "src/**/*.html", - "src/**/*.css", - "index.html", - ], - }, + purge: [ + "src/**/*.tsx", + "src/**/*.ts", + "src/**/*.html", + "src/**/*.css", + "index.html", + ], darkMode: false, // or 'media' or 'class' theme: { extend: {}, diff --git a/ts-tailwind/vite.config.ts b/ts-tailwind/vite.config.ts index 2ef329d..31ca950 100644 --- a/ts-tailwind/vite.config.ts +++ b/ts-tailwind/vite.config.ts @@ -3,4 +3,8 @@ import solidPlugin from "vite-plugin-solid"; export default defineConfig({ plugins: [solidPlugin()], + build: { + target: "esnext", + polyfillDynamicImport: false, + }, });