From dd6974b852a9b1b2d0a7d369552ec60657b13e2f Mon Sep 17 00:00:00 2001 From: Yalda Date: Wed, 6 Jul 2022 18:39:43 +0800 Subject: [PATCH] docs(*):add tags, update readme --- README.md | 2 +- packages/vite-inferno-js/package.json | 10 +++++-- packages/vite-inferno-js/src/App.jsx | 2 +- packages/vite-inferno-js/src/index.css | 8 ++---- packages/vite-inferno-ts/package.json | 9 ++++-- packages/vite-inferno-ts/src/App.tsx | 2 +- packages/vite-inferno-ts/src/index.css | 8 ++---- packages/vite-plugin-inferno/README.md | 34 +++++++++++++++++++++++ packages/vite-plugin-inferno/package.json | 11 +++++++- pnpm-lock.yaml | 8 +++--- 10 files changed, 70 insertions(+), 24 deletions(-) create mode 100644 packages/vite-plugin-inferno/README.md diff --git a/README.md b/README.md index dbec683..9e90eef 100644 --- a/README.md +++ b/README.md @@ -31,4 +31,4 @@ import inferno from 'vite-plugin-inferno' export default defineConfig({ plugins: [inferno()], }) -``` \ No newline at end of file +``` diff --git a/packages/vite-inferno-js/package.json b/packages/vite-inferno-js/package.json index f161d20..3c2bf37 100644 --- a/packages/vite-inferno-js/package.json +++ b/packages/vite-inferno-js/package.json @@ -1,14 +1,18 @@ { "name": "vite-inferno-js-starter", "version": "0.0.0", - "description": "", + "description": "Vite + Inferno + JS", "author": "yalda", "license": "MIT", "type": "module", "keywords": [ "vite", "inferno", - "vite-boilerplate" + "infernojs", + "vite-boilerplate", + "vite-starter", + "vite-template", + "inferno-boilerplate" ], "scripts": { "dev": "vite", @@ -19,7 +23,7 @@ "inferno": "^8.0.1" }, "devDependencies": { - "vite-plugin-inferno": "0.0.1", + "vite-plugin-inferno": "0.0.0", "vite": "^2.9.13" } } diff --git a/packages/vite-inferno-js/src/App.jsx b/packages/vite-inferno-js/src/App.jsx index 8b8cc6f..db0394e 100644 --- a/packages/vite-inferno-js/src/App.jsx +++ b/packages/vite-inferno-js/src/App.jsx @@ -14,7 +14,7 @@ class App extends Component {

{`Welcome to Inferno ${version}`}

- Edit src/App.js and save to reload.! + Edit src/App.jsx and save to reload.!

diff --git a/packages/vite-inferno-js/src/index.css b/packages/vite-inferno-js/src/index.css index e2bd8f3..62e8a98 100644 --- a/packages/vite-inferno-js/src/index.css +++ b/packages/vite-inferno-js/src/index.css @@ -1,14 +1,12 @@ body { margin: 0; padding: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', + 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } diff --git a/packages/vite-inferno-ts/package.json b/packages/vite-inferno-ts/package.json index df6e246..0e0a224 100644 --- a/packages/vite-inferno-ts/package.json +++ b/packages/vite-inferno-ts/package.json @@ -1,14 +1,17 @@ { "name": "vite-inferno-ts-starter", "version": "0.0.0", - "description": "", + "description": "Vite + Inferno + TS", "author": "yalda", "license": "MIT", "type": "module", "keywords": [ "vite", "inferno", - "vite-boilerplate" + "vite-boilerplate", + "vite-starter", + "vite-template", + "inferno-boilerplate" ], "scripts": { "dev": "vite", @@ -19,7 +22,7 @@ "inferno": "^8.0.1" }, "devDependencies": { - "vite-plugin-inferno": "0.0.1", + "vite-plugin-inferno": "0.0.0", "typescript": "^4.6.4", "vite": "^2.9.13" } diff --git a/packages/vite-inferno-ts/src/App.tsx b/packages/vite-inferno-ts/src/App.tsx index ee813de..bf85c3c 100644 --- a/packages/vite-inferno-ts/src/App.tsx +++ b/packages/vite-inferno-ts/src/App.tsx @@ -14,7 +14,7 @@ class App extends Component {

{`Welcome to Inferno ${version}`}

- Edit src/App.js and save to reload.! + Edit src/App.tsx and save to reload.!

diff --git a/packages/vite-inferno-ts/src/index.css b/packages/vite-inferno-ts/src/index.css index e2bd8f3..62e8a98 100644 --- a/packages/vite-inferno-ts/src/index.css +++ b/packages/vite-inferno-ts/src/index.css @@ -1,14 +1,12 @@ body { margin: 0; padding: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', + 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } diff --git a/packages/vite-plugin-inferno/README.md b/packages/vite-plugin-inferno/README.md new file mode 100644 index 0000000..9e90eef --- /dev/null +++ b/packages/vite-plugin-inferno/README.md @@ -0,0 +1,34 @@ +# vite-plugin-inferno + +An all in one preset for writing Inferno apps with the vite bundler. + +## Features + +- 🚀 Hot Module Replacement via prefresh +- 🔨 Devtools bridge during development + +## Installing + +```bash +λ npm i vite-plugin-inferno --save-dev + +# or with pnpm +λ pnpm install vite-plugin-inferno --save-dev + +# or with yarn +yarn add vite-plugin-inferno -D +``` + +## Usage + +configurate in `vite.config.ts` or `vite.config.js` + +```typescript +import { defineConfig } from 'vite' +import inferno from 'vite-plugin-inferno' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [inferno()], +}) +``` diff --git a/packages/vite-plugin-inferno/package.json b/packages/vite-plugin-inferno/package.json index fca8e8c..fcf3042 100644 --- a/packages/vite-plugin-inferno/package.json +++ b/packages/vite-plugin-inferno/package.json @@ -1,6 +1,6 @@ { "name": "vite-plugin-inferno", - "version": "0.0.1", + "version": "0.0.0", "description": "inferno preset for the vite bundler", "author": "yalda", "license": "MIT", @@ -8,6 +8,7 @@ "vite", "vite-preset", "vite-plugin", + "vite-plugin-inferno", "inferno" ], "main": "./cjs/index.js", @@ -25,6 +26,14 @@ "esm", "types" ], + "repository": { + "type": "git", + "url": "git+https://github.com/guocaoyi/vite-plugin-inferno.git" + }, + "bugs": { + "url": "https://github.com/guocaoyi/vite-plugin-inferno/issues" + }, + "homepage": "https://github.com/guocaoyi/vite-plugin-inferno", "scripts": { "build": "rimraf cjs esm types && tsc && tsc -p tsconfig.cjs.json && node scripts/build.mjs", "prepublishOnly": "npm run build" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b5f5033..dbd0d43 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,23 +10,23 @@ importers: lint-staged: 10.5.4 prettier: 2.7.1 - packages/inferno-vite-js: + packages/vite-inferno-js: specifiers: inferno: ^8.0.1 vite: ^2.9.13 - vite-plugin-inferno: 0.0.1 + vite-plugin-inferno: 0.0.0 dependencies: inferno: 8.0.1 devDependencies: vite: 2.9.13 vite-plugin-inferno: link:../vite-plugin-inferno - packages/inferno-vite-ts: + packages/vite-inferno-ts: specifiers: inferno: ^8.0.1 typescript: ^4.6.4 vite: ^2.9.13 - vite-plugin-inferno: 0.0.1 + vite-plugin-inferno: 0.0.0 dependencies: inferno: 8.0.1 devDependencies: