From 59a5a6034704f7099dea579e90e05144b8615a7e Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 19 Aug 2024 11:05:35 +0100 Subject: [PATCH 1/4] template --- .github/workflows/npm-previews.yaml | 2 +- packages/template/README.md | 50 +++++++ packages/template/index.js | 3 + packages/template/package.json | 14 ++ packages/template/pnpm-lock.yaml | 194 ++++++++++++++++++++++++++++ pnpm-lock.yaml | 6 + 6 files changed, 268 insertions(+), 1 deletion(-) create mode 100644 packages/template/README.md create mode 100644 packages/template/index.js create mode 100644 packages/template/package.json create mode 100644 packages/template/pnpm-lock.yaml diff --git a/.github/workflows/npm-previews.yaml b/.github/workflows/npm-previews.yaml index e2eedcdd..80db757f 100644 --- a/.github/workflows/npm-previews.yaml +++ b/.github/workflows/npm-previews.yaml @@ -23,4 +23,4 @@ jobs: env: CI: true name: mdsvex - - run: pnpx pkg-pr-new publish './packages/*' + - run: pnpx pkg-pr-new publish './packages/*' --template './packages/template/' diff --git a/packages/template/README.md b/packages/template/README.md new file mode 100644 index 00000000..285765bb --- /dev/null +++ b/packages/template/README.md @@ -0,0 +1,50 @@ + +# Default Template + +This is a template that leverages the experimental templates feature in the `pkg.pr.new` tool. + +## Overview + +Templates are particularly useful for creating live, interactive examples of your packages, which can be very beneficial for both development and documentation purposes. + +As a user, you can check the package.json file and see the new generated packages! You can just copy those and put them in your package.json or install them with your favorite package manager. + + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/mdsvex@e9631f1 +``` + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/pfm-parse@e9631f1 +``` + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/svast@e9631f1 +``` + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/svast-stringify@e9631f1 +``` + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/svast-utils@e9631f1 +``` + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/svelte-parse@e9631f1 +``` + + +## Usage + +To use this feature as a maintainer, you can run the following command: + +```sh +npx pkg-pr-new publish './packages/A' --template './examples/*' +``` + +## Benefits + +- Interactive Demos: Automatically create live demos that users can interact with directly in their browser. +- Enhanced Testing: Quickly spin up environments to test your package in different scenarios. +- Improved Sharing: Easily share working examples of your package with collaborators or users without needing them to set up their environment. diff --git a/packages/template/index.js b/packages/template/index.js new file mode 100644 index 00000000..7dcdaa09 --- /dev/null +++ b/packages/template/index.js @@ -0,0 +1,3 @@ +import { compile } from 'mdsvex'; + +compile('# hello').then(console.log); diff --git a/packages/template/package.json b/packages/template/package.json new file mode 100644 index 00000000..d697fb35 --- /dev/null +++ b/packages/template/package.json @@ -0,0 +1,14 @@ +{ + "name": "mdsvex-test", + "version": "1.0.0", + "description": "generated by pkg.pr.new", + "main": "index.js", + "dependencies": { + "mdsvex": "workspace:*" + }, + "keywords": [], + "author": "pkg.pr.new", + "license": "ISC", + "private": "true", + "type": "module" +} diff --git a/packages/template/pnpm-lock.yaml b/packages/template/pnpm-lock.yaml new file mode 100644 index 00000000..508e5929 --- /dev/null +++ b/packages/template/pnpm-lock.yaml @@ -0,0 +1,194 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + mdsvex: + specifier: https://pkg.pr.new/pngwn/MDsveX/mdsvex@e9631f1 + version: '@pkg.pr.new/pngwn/MDsveX/mdsvex@e9631f1(svelte@4.2.18)' + +packages: + + /@ampproject/remapping@2.3.0: + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + dev: false + + /@jridgewell/gen-mapping@0.3.5: + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + dev: false + + /@jridgewell/resolve-uri@3.1.2: + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + dev: false + + /@jridgewell/set-array@1.2.1: + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + dev: false + + /@jridgewell/sourcemap-codec@1.5.0: + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + dev: false + + /@jridgewell/trace-mapping@0.3.25: + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + dev: false + + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: false + + /@types/unist@2.0.11: + resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} + dev: false + + /acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: false + + /aria-query@5.3.0: + resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} + dependencies: + dequal: 2.0.3 + dev: false + + /axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} + dev: false + + /code-red@1.0.4: + resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + '@types/estree': 1.0.5 + acorn: 8.12.1 + estree-walker: 3.0.3 + periscopic: 3.1.0 + dev: false + + /css-tree@2.3.1: + resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + dependencies: + mdn-data: 2.0.30 + source-map-js: 1.2.0 + dev: false + + /dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + dev: false + + /estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + dependencies: + '@types/estree': 1.0.5 + dev: false + + /is-reference@3.0.2: + resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} + dependencies: + '@types/estree': 1.0.5 + dev: false + + /locate-character@3.0.0: + resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + dev: false + + /magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + dev: false + + /mdn-data@2.0.30: + resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + dev: false + + /periscopic@3.1.0: + resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} + dependencies: + '@types/estree': 1.0.5 + estree-walker: 3.0.3 + is-reference: 3.0.2 + dev: false + + /prism-svelte@0.4.7: + resolution: {integrity: sha512-yABh19CYbM24V7aS7TuPYRNMqthxwbvx6FF/Rw920YbyBWO3tnyPIqRMgHuSVsLmuHkkBS1Akyof463FVdkeDQ==} + dev: false + + /prismjs@1.29.0: + resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} + engines: {node: '>=6'} + dev: false + + /source-map-js@1.2.0: + resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + engines: {node: '>=0.10.0'} + dev: false + + /svelte@4.2.18: + resolution: {integrity: sha512-d0FdzYIiAePqRJEb90WlJDkjUEx42xhivxN8muUBmfZnP+tzUgz12DJ2hRJi8sIHCME7jeK1PTMgKPSfTd8JrA==} + engines: {node: '>=16'} + dependencies: + '@ampproject/remapping': 2.3.0 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + '@types/estree': 1.0.5 + acorn: 8.12.1 + aria-query: 5.3.0 + axobject-query: 4.1.0 + code-red: 1.0.4 + css-tree: 2.3.1 + estree-walker: 3.0.3 + is-reference: 3.0.2 + locate-character: 3.0.0 + magic-string: 0.30.11 + periscopic: 3.1.0 + dev: false + + /unist-util-stringify-position@2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + dependencies: + '@types/unist': 2.0.11 + dev: false + + /vfile-message@2.0.4: + resolution: {integrity: sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==} + dependencies: + '@types/unist': 2.0.11 + unist-util-stringify-position: 2.0.3 + dev: false + + '@pkg.pr.new/pngwn/MDsveX/mdsvex@e9631f1(svelte@4.2.18)': + resolution: {tarball: https://pkg.pr.new/pngwn/MDsveX/mdsvex@e9631f1} + id: '@pkg.pr.new/pngwn/MDsveX/mdsvex@e9631f1' + name: mdsvex + version: 0.12.2 + peerDependencies: + svelte: ^3.56.0 || ^4.0.0 || ^5.0.0-next.120 + dependencies: + '@types/unist': 2.0.11 + prism-svelte: 0.4.7 + prismjs: 1.29.0 + svelte: 4.2.18 + vfile-message: 2.0.4 + dev: false diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b944cb90..b937d66d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -297,6 +297,12 @@ importers: specifier: workspace:^0.2.1 version: link:../svast + packages/template: + dependencies: + mdsvex: + specifier: workspace:* + version: link:../mdsvex + packages: '@ampproject/remapping@2.2.1': From 09b533324d5368b8ad962e43102108c7b5714821 Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 19 Aug 2024 11:09:17 +0100 Subject: [PATCH 2/4] template --- .github/workflows/npm-previews.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-previews.yaml b/.github/workflows/npm-previews.yaml index 80db757f..0003082c 100644 --- a/.github/workflows/npm-previews.yaml +++ b/.github/workflows/npm-previews.yaml @@ -23,4 +23,4 @@ jobs: env: CI: true name: mdsvex - - run: pnpx pkg-pr-new publish './packages/*' --template './packages/template/' + - run: pnpx pkg-pr-new publish './packages/*' --template './packages/template/' --no-template From 1f3adbeb6eba80e6c4856793c8047db2d0c27de8 Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 19 Aug 2024 11:10:51 +0100 Subject: [PATCH 3/4] template --- .github/workflows/npm-previews.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-previews.yaml b/.github/workflows/npm-previews.yaml index 0003082c..80db757f 100644 --- a/.github/workflows/npm-previews.yaml +++ b/.github/workflows/npm-previews.yaml @@ -23,4 +23,4 @@ jobs: env: CI: true name: mdsvex - - run: pnpx pkg-pr-new publish './packages/*' --template './packages/template/' --no-template + - run: pnpx pkg-pr-new publish './packages/*' --template './packages/template/' From 6d4929b3e404e0342844db745a272ede0fe701fe Mon Sep 17 00:00:00 2001 From: pngwn Date: Wed, 21 Aug 2024 13:10:34 +0100 Subject: [PATCH 4/4] format --- packages/template/README.md | 97 ++++++++++++++++------------------ packages/template/package.json | 28 +++++----- 2 files changed, 61 insertions(+), 64 deletions(-) diff --git a/packages/template/README.md b/packages/template/README.md index 285765bb..3a6fba6e 100644 --- a/packages/template/README.md +++ b/packages/template/README.md @@ -1,50 +1,47 @@ - -# Default Template - -This is a template that leverages the experimental templates feature in the `pkg.pr.new` tool. - -## Overview - -Templates are particularly useful for creating live, interactive examples of your packages, which can be very beneficial for both development and documentation purposes. - -As a user, you can check the package.json file and see the new generated packages! You can just copy those and put them in your package.json or install them with your favorite package manager. - - -```sh -npm i https://pkg.pr.new/pngwn/MDsveX/mdsvex@e9631f1 -``` - -```sh -npm i https://pkg.pr.new/pngwn/MDsveX/pfm-parse@e9631f1 -``` - -```sh -npm i https://pkg.pr.new/pngwn/MDsveX/svast@e9631f1 -``` - -```sh -npm i https://pkg.pr.new/pngwn/MDsveX/svast-stringify@e9631f1 -``` - -```sh -npm i https://pkg.pr.new/pngwn/MDsveX/svast-utils@e9631f1 -``` - -```sh -npm i https://pkg.pr.new/pngwn/MDsveX/svelte-parse@e9631f1 -``` - - -## Usage - -To use this feature as a maintainer, you can run the following command: - -```sh -npx pkg-pr-new publish './packages/A' --template './examples/*' -``` - -## Benefits - -- Interactive Demos: Automatically create live demos that users can interact with directly in their browser. -- Enhanced Testing: Quickly spin up environments to test your package in different scenarios. -- Improved Sharing: Easily share working examples of your package with collaborators or users without needing them to set up their environment. +# Default Template + +This is a template that leverages the experimental templates feature in the `pkg.pr.new` tool. + +## Overview + +Templates are particularly useful for creating live, interactive examples of your packages, which can be very beneficial for both development and documentation purposes. + +As a user, you can check the package.json file and see the new generated packages! You can just copy those and put them in your package.json or install them with your favorite package manager. + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/mdsvex@e9631f1 +``` + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/pfm-parse@e9631f1 +``` + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/svast@e9631f1 +``` + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/svast-stringify@e9631f1 +``` + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/svast-utils@e9631f1 +``` + +```sh +npm i https://pkg.pr.new/pngwn/MDsveX/svelte-parse@e9631f1 +``` + +## Usage + +To use this feature as a maintainer, you can run the following command: + +```sh +npx pkg-pr-new publish './packages/A' --template './examples/*' +``` + +## Benefits + +- Interactive Demos: Automatically create live demos that users can interact with directly in their browser. +- Enhanced Testing: Quickly spin up environments to test your package in different scenarios. +- Improved Sharing: Easily share working examples of your package with collaborators or users without needing them to set up their environment. diff --git a/packages/template/package.json b/packages/template/package.json index d697fb35..16061ce5 100644 --- a/packages/template/package.json +++ b/packages/template/package.json @@ -1,14 +1,14 @@ -{ - "name": "mdsvex-test", - "version": "1.0.0", - "description": "generated by pkg.pr.new", - "main": "index.js", - "dependencies": { - "mdsvex": "workspace:*" - }, - "keywords": [], - "author": "pkg.pr.new", - "license": "ISC", - "private": "true", - "type": "module" -} +{ + "name": "mdsvex-test", + "version": "1.0.0", + "description": "generated by pkg.pr.new", + "main": "index.js", + "dependencies": { + "mdsvex": "workspace:*" + }, + "keywords": [], + "author": "pkg.pr.new", + "license": "ISC", + "private": "true", + "type": "module" +}