From d86ff71b73fd1330df711a4316c807503e2a0377 Mon Sep 17 00:00:00 2001 From: Zhiwei Li <65117011+Levix@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:50:57 +0800 Subject: [PATCH] chore: update config --- CONTRIBUTING.md | 1 - LICENSE | 2 +- README.md | 35 +++++--------- eslint.config.js | 3 ++ package.json | 17 ++++--- pnpm-lock.yaml | 118 ++++++++++++++++++++++++++++------------------- 6 files changed, 97 insertions(+), 79 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6c3f5ff..e69de29 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +0,0 @@ -Please refer to https://github.com/antfu/contribute diff --git a/LICENSE b/LICENSE index 7d71216..4503327 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Anthony Fu +Copyright (c) 2022 Levix Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index cedf6c4..a074288 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# pkg-placeholder +# vite-plugin-runtime-cdn [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] @@ -6,32 +6,21 @@ [![JSDocs][jsdocs-src]][jsdocs-href] [![License][license-src]][license-href] -_description_ - -> **Note**: -> Replace `pkg-placeholder`, `_description_` and `antfu` globally to use this template. - -## Sponsors - -

- - - -

+A Vite plugin that supports runtime CDN configuration. ## License -[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu) +[MIT](./LICENSE) License © 2023-PRESENT [Levix](https://github.com/Levix) -[npm-version-src]: https://img.shields.io/npm/v/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669 -[npm-version-href]: https://npmjs.com/package/pkg-placeholder -[npm-downloads-src]: https://img.shields.io/npm/dm/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669 -[npm-downloads-href]: https://npmjs.com/package/pkg-placeholder -[bundle-src]: https://img.shields.io/bundlephobia/minzip/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669&label=minzip -[bundle-href]: https://bundlephobia.com/result?p=pkg-placeholder -[license-src]: https://img.shields.io/github/license/antfu/pkg-placeholder.svg?style=flat&colorA=080f12&colorB=1fa669 -[license-href]: https://github.com/antfu/pkg-placeholder/blob/main/LICENSE +[npm-version-src]: https://img.shields.io/npm/v/vite-plugin-runtime-cdn?style=flat&colorA=080f12&colorB=1fa669 +[npm-version-href]: https://npmjs.com/package/vite-plugin-runtime-cdn +[npm-downloads-src]: https://img.shields.io/npm/dm/vite-plugin-runtime-cdn?style=flat&colorA=080f12&colorB=1fa669 +[npm-downloads-href]: https://npmjs.com/package/vite-plugin-runtime-cdn +[bundle-src]: https://img.shields.io/bundlephobia/minzip/vite-plugin-runtime-cdn?style=flat&colorA=080f12&colorB=1fa669&label=minzip +[bundle-href]: https://bundlephobia.com/result?p=vite-plugin-runtime-cdn +[license-src]: https://img.shields.io/github/license/Levix/vite-plugin-runtime-cdn.svg?style=flat&colorA=080f12&colorB=1fa669 +[license-href]: https://github.com/Levix/vite-plugin-runtime-cdn/blob/main/LICENSE [jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669 -[jsdocs-href]: https://www.jsdocs.io/package/pkg-placeholder +[jsdocs-href]: https://www.jsdocs.io/package/vite-plugin-runtime-cdn diff --git a/eslint.config.js b/eslint.config.js index 64149c8..587ac7c 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -10,6 +10,9 @@ export default antfu( { rules: { // overrides + 'no-cond-assign': 'off', + 'jsdoc/require-returns-check': 'off', + 'no-template-curly-in-string': 'off', }, }, ) diff --git a/package.json b/package.json index 85141f2..42642f1 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,18 @@ { - "name": "pkg-placeholder", + "name": "vite-plugin-runtime-cdn", "type": "module", "version": "0.0.0", "packageManager": "pnpm@8.12.1", - "description": "_description_", - "author": "Anthony Fu ", + "description": "A Vite plugin that supports runtime CDN configuration.", + "author": "Levix", "license": "MIT", - "funding": "https://github.com/sponsors/antfu", - "homepage": "https://github.com/antfu/pkg-placeholder#readme", + "funding": "https://github.com/sponsors/Levix", + "homepage": "https://github.com/Levix/vite-plugin-runtime-cdn#readme", "repository": { "type": "git", - "url": "git+https://github.com/antfu/pkg-placeholder.git" + "url": "git+https://github.com/Levix/vite-plugin-runtime-cdn.git" }, - "bugs": "https://github.com/antfu/pkg-placeholder/issues", + "bugs": "https://github.com/Levix/vite-plugin-runtime-cdn/issues", "keywords": [], "sideEffects": false, "exports": { @@ -53,11 +53,14 @@ "@antfu/utils": "^0.7.7", "@types/node": "^20.10.5", "bumpp": "^9.2.1", + "es-module-lexer": "^1.4.1", "eslint": "^8.56.0", "esno": "^4.0.0", "lint-staged": "^15.2.0", + "magic-string": "^0.30.5", "pnpm": "^8.12.1", "rimraf": "^5.0.5", + "rollup": "^4.9.3", "simple-git-hooks": "^2.9.0", "typescript": "^5.3.3", "unbuild": "^2.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ce779b9..9905681 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - importers: .: @@ -23,6 +19,9 @@ importers: bumpp: specifier: ^9.2.1 version: 9.2.1 + es-module-lexer: + specifier: ^1.4.1 + version: 1.4.1 eslint: specifier: ^8.56.0 version: 8.56.0 @@ -32,12 +31,18 @@ importers: lint-staged: specifier: ^15.2.0 version: 15.2.0 + magic-string: + specifier: ^0.30.5 + version: 0.30.5 pnpm: specifier: ^8.12.1 version: 8.12.1 rimraf: specifier: ^5.0.5 version: 5.0.5 + rollup: + specifier: ^4.9.3 + version: 4.9.3 simple-git-hooks: specifier: ^2.9.0 version: 2.9.0 @@ -1028,102 +1033,110 @@ packages: rollup: optional: true dependencies: - '@types/estree': 1.0.0 + '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 rollup: 3.28.1 dev: true - /@rollup/rollup-android-arm-eabi@4.4.1: - resolution: {integrity: sha512-Ss4suS/sd+6xLRu+MLCkED2mUrAyqHmmvZB+zpzZ9Znn9S8wCkTQCJaQ8P8aHofnvG5L16u9MVnJjCqioPErwQ==} + /@rollup/rollup-android-arm-eabi@4.9.3: + resolution: {integrity: sha512-nvh9bB41vXEoKKvlWCGptpGt8EhrEwPQFDCY0VAto+R+qpSbaErPS3OjMZuXR8i/2UVw952Dtlnl2JFxH31Qvg==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.4.1: - resolution: {integrity: sha512-sRSkGTvGsARwWd7TzC8LKRf8FiPn7257vd/edzmvG4RIr9x68KBN0/Ek48CkuUJ5Pj/Dp9vKWv6PEupjKWjTYA==} + /@rollup/rollup-android-arm64@4.9.3: + resolution: {integrity: sha512-kffYCJ2RhDL1DlshLzYPyJtVeusHlA8Q1j6k6s4AEVKLq/3HfGa2ADDycLsmPo3OW83r4XtOPqRMbcFzFsEIzQ==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.4.1: - resolution: {integrity: sha512-nz0AiGrrXyaWpsmBXUGOBiRDU0wyfSXbFuF98pPvIO8O6auQsPG6riWsfQqmCCC5FNd8zKQ4JhgugRNAkBJ8mQ==} + /@rollup/rollup-darwin-arm64@4.9.3: + resolution: {integrity: sha512-Fo7DR6Q9/+ztTyMBZ79+WJtb8RWZonyCgkBCjV51rW5K/dizBzImTW6HLC0pzmHaAevwM0jW1GtB5LCFE81mSw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.4.1: - resolution: {integrity: sha512-Ogqvf4/Ve/faMaiPRvzsJEqajbqs00LO+8vtrPBVvLgdw4wBg6ZDXdkDAZO+4MLnrc8mhGV6VJAzYScZdPLtJg==} + /@rollup/rollup-darwin-x64@4.9.3: + resolution: {integrity: sha512-5HcxDF9fqHucIlTiw/gmMb3Qv23L8bLCg904I74Q2lpl4j/20z9ogaD3tWkeguRuz+/17cuS321PT3PAuyjQdg==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.4.1: - resolution: {integrity: sha512-9zc2tqlr6HfO+hx9+wktUlWTRdje7Ub15iJqKcqg5uJZ+iKqmd2CMxlgPpXi7+bU7bjfDIuvCvnGk7wewFEhCg==} + /@rollup/rollup-linux-arm-gnueabihf@4.9.3: + resolution: {integrity: sha512-cO6hKV+99D1V7uNJQn1chWaF9EGp7qV2N8sGH99q9Y62bsbN6Il55EwJppEWT+JiqDRg396vWCgwdHwje8itBQ==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.4.1: - resolution: {integrity: sha512-phLb1fN3rq2o1j1v+nKxXUTSJnAhzhU0hLrl7Qzb0fLpwkGMHDem+o6d+ZI8+/BlTXfMU4kVWGvy6g9k/B8L6Q==} + /@rollup/rollup-linux-arm64-gnu@4.9.3: + resolution: {integrity: sha512-xANyq6lVg6KMO8UUs0LjA4q7di3tPpDbzLPgVEU2/F1ngIZ54eli8Zdt3uUUTMXVbgTCafIO+JPeGMhu097i3w==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.4.1: - resolution: {integrity: sha512-M2sDtw4tf57VPSjbTAN/lz1doWUqO2CbQuX3L9K6GWIR5uw9j+ROKCvvUNBY8WUbMxwaoc8mH9HmmBKsLht7+w==} + /@rollup/rollup-linux-arm64-musl@4.9.3: + resolution: {integrity: sha512-TZJUfRTugVFATQToCMD8DNV6jv/KpSwhE1lLq5kXiQbBX3Pqw6dRKtzNkh5wcp0n09reBBq/7CGDERRw9KmE+g==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.4.1: - resolution: {integrity: sha512-mHIlRLX+hx+30cD6c4BaBOsSqdnCE4ok7/KDvjHYAHoSuveoMMxIisZFvcLhUnyZcPBXDGZTuBoalcuh43UfQQ==} + /@rollup/rollup-linux-riscv64-gnu@4.9.3: + resolution: {integrity: sha512-4/QVaRyaB5tkEAGfjVvWrmWdPF6F2NoaoO5uEP7N0AyeBw7l8SeCWWKAGrbx/00PUdHrJVURJiYikazslSKttQ==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.9.3: + resolution: {integrity: sha512-koLC6D3pj1YLZSkTy/jsk3HOadp7q2h6VQl/lPX854twOmmLNekHB6yuS+MkWcKdGGdW1JPuPBv/ZYhr5Yhtdg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.4.1: - resolution: {integrity: sha512-tB+RZuDi3zxFx7vDrjTNGVLu2KNyzYv+UY8jz7e4TMEoAj7iEt8Qk6xVu6mo3pgjnsHj6jnq3uuRsHp97DLwOA==} + /@rollup/rollup-linux-x64-musl@4.9.3: + resolution: {integrity: sha512-0OAkQ4HBp+JO2ip2Lgt/ShlrveOMzyhwt2D0KvqH28jFPqfZco28KSq76zymZwmU+F6GRojdxtQMJiNSXKNzeA==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.4.1: - resolution: {integrity: sha512-Hdn39PzOQowK/HZzYpCuZdJC91PE6EaGbTe2VCA9oq2u18evkisQfws0Smh9QQGNNRa/T7MOuGNQoLeXhhE3PQ==} + /@rollup/rollup-win32-arm64-msvc@4.9.3: + resolution: {integrity: sha512-z5uvoMvdRWggigOnsb9OOCLERHV0ykRZoRB5O+URPZC9zM3pkoMg5fN4NKu2oHqgkzZtfx9u4njqqlYEzM1v9A==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.4.1: - resolution: {integrity: sha512-tLpKb1Elm9fM8c5w3nl4N1eLTP4bCqTYw9tqUBxX8/hsxqHO3dxc2qPbZ9PNkdK4tg4iLEYn0pOUnVByRd2CbA==} + /@rollup/rollup-win32-ia32-msvc@4.9.3: + resolution: {integrity: sha512-wxomCHjBVKws+O4N1WLnniKCXu7vkLtdq9Fl9CN/EbwEldojvUrkoHE/fBLZzC7IT/x12Ut6d6cRs4dFvqJkMg==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.4.1: - resolution: {integrity: sha512-eAhItDX9yQtZVM3yvXS/VR3qPqcnXvnLyx1pLXl4JzyNMBNO3KC986t/iAg2zcMzpAp9JSvxB5VZGnBiNoA98w==} + /@rollup/rollup-win32-x64-msvc@4.9.3: + resolution: {integrity: sha512-1Qf/qk/iEtx0aOi+AQQt5PBoW0mFngsm7bPuxHClC/hWh2hHBktR6ktSfUg5b5rC9v8hTwNmHE7lBWXkgqluUQ==} cpu: [x64] os: [win32] requiresBuild: true @@ -1200,8 +1213,8 @@ packages: - typescript dev: true - /@types/estree@1.0.0: - resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: true /@types/json-schema@7.0.12: @@ -2044,6 +2057,10 @@ packages: is-arrayish: 0.2.1 dev: true + /es-module-lexer@1.4.1: + resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==} + dev: true + /esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} @@ -3007,7 +3024,7 @@ packages: /is-reference@1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} dependencies: - '@types/estree': 1.0.0 + '@types/estree': 1.0.5 dev: true /is-stream@3.0.0: @@ -3834,23 +3851,26 @@ packages: fsevents: 2.3.3 dev: true - /rollup@4.4.1: - resolution: {integrity: sha512-idZzrUpWSblPJX66i+GzrpjKE3vbYrlWirUHteoAbjKReZwa0cohAErOYA5efoMmNCdvG9yrJS+w9Kl6csaH4w==} + /rollup@4.9.3: + resolution: {integrity: sha512-JnchF0ZGFiqGpAPjg3e89j656Ne4tTtCY1VZc1AxtoQcRIxjTu9jyYHBAtkDXE+X681n4un/nX9SU52AroSRzg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + dependencies: + '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.4.1 - '@rollup/rollup-android-arm64': 4.4.1 - '@rollup/rollup-darwin-arm64': 4.4.1 - '@rollup/rollup-darwin-x64': 4.4.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.4.1 - '@rollup/rollup-linux-arm64-gnu': 4.4.1 - '@rollup/rollup-linux-arm64-musl': 4.4.1 - '@rollup/rollup-linux-x64-gnu': 4.4.1 - '@rollup/rollup-linux-x64-musl': 4.4.1 - '@rollup/rollup-win32-arm64-msvc': 4.4.1 - '@rollup/rollup-win32-ia32-msvc': 4.4.1 - '@rollup/rollup-win32-x64-msvc': 4.4.1 + '@rollup/rollup-android-arm-eabi': 4.9.3 + '@rollup/rollup-android-arm64': 4.9.3 + '@rollup/rollup-darwin-arm64': 4.9.3 + '@rollup/rollup-darwin-x64': 4.9.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.3 + '@rollup/rollup-linux-arm64-gnu': 4.9.3 + '@rollup/rollup-linux-arm64-musl': 4.9.3 + '@rollup/rollup-linux-riscv64-gnu': 4.9.3 + '@rollup/rollup-linux-x64-gnu': 4.9.3 + '@rollup/rollup-linux-x64-musl': 4.9.3 + '@rollup/rollup-win32-arm64-msvc': 4.9.3 + '@rollup/rollup-win32-ia32-msvc': 4.9.3 + '@rollup/rollup-win32-x64-msvc': 4.9.3 fsevents: 2.3.3 dev: true @@ -4362,7 +4382,7 @@ packages: '@types/node': 20.10.5 esbuild: 0.19.5 postcss: 8.4.32 - rollup: 4.4.1 + rollup: 4.9.3 optionalDependencies: fsevents: 2.3.3 dev: true @@ -4549,3 +4569,7 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} dev: true + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false