A CLI for scaffolding ATProto web applications

fix: adjust postinstall scripts for all templates #2

merged opened by besaid.zone targeting main from fix/adjust-postinstall-script
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:qttsv4e7pu2jl3ilanfgc3zn/sh.tangled.repo.pull/3mezlr7lqma22
+63 -188
Diff #0
+5
.changeset/shiny-lions-rhyme.md
··· 1 + --- 2 + "@nulfrost/create-atproto-app": patch 3 + --- 4 + 5 + adjust postinstall scripts for all templates
+27
templates/react-ts/README.md
··· 6 6 7 7 - [Introduction to the AT Protocol](https://atproto.com/articles/atproto-ethos) 8 8 - [Bluesky Developer Documentation](https://docs.bsky.app) 9 + - [@atproto/lex documentation](https://github.com/bluesky-social/atproto/tree/HEAD/packages/lex/lex#quick-start) 10 + 11 + ## Getting Started 12 + 13 + You'll need to install some lexicons before starting development. In your terminal, run: 14 + 15 + ```bash 16 + npx @atproto/lex install app.bsky.actor.getProfile 17 + ``` 18 + 19 + Then generate the TypeScript files. You can change the destination to where these files are generated but remember to update your ``.gitignore`` file so you don't commit them. 20 + 21 + ```bash 22 + npx @atproto/lex build --out ./src/__generated__ 23 + ``` 24 + 25 + Next, install the package dependencies: 26 + 27 + ```bash 28 + npm install 29 + ``` 30 + 31 + Finally, run the development server: 32 + 33 + ```bash 34 + npm run dev 35 + ```
-93
templates/react-ts/lexicons.json
··· 1 - { 2 - "version": 1, 3 - "lexicons": [ 4 - "app.bsky.actor.getProfile", 5 - "app.bsky.actor.profile" 6 - ], 7 - "resolutions": { 8 - "app.bsky.actor.defs": { 9 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.defs", 10 - "cid": "bafyreigwqwhe2jxohagozazfbrf6dxgzphvkg3d3lg7uxdvepsimqyclka" 11 - }, 12 - "app.bsky.actor.getProfile": { 13 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.getProfile", 14 - "cid": "bafyreigrtosreva7e5m7bwbbfsmw77gkdnieizgxwpobw5iobuck3j54xa" 15 - }, 16 - "app.bsky.actor.profile": { 17 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.profile", 18 - "cid": "bafyreia6umzg3a6d7mjbow4p57tviey45muohklhgsvjoamcctoiusr4pe" 19 - }, 20 - "app.bsky.actor.status": { 21 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.status", 22 - "cid": "bafyreifdg4b64wohpwkh5lydc6tckvol2rspnpni6dec6recy2rhvlnz4a" 23 - }, 24 - "app.bsky.embed.defs": { 25 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.defs", 26 - "cid": "bafyreia42uud4qil67wknywzbxfyxc3b7woewsii54cakq2ould3ldetei" 27 - }, 28 - "app.bsky.embed.external": { 29 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.external", 30 - "cid": "bafyreiblxmpzgwg4fbr45b4xzts3h4k72k7cdnrxy2ub2w5d7mnwzznkwi" 31 - }, 32 - "app.bsky.embed.images": { 33 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.images", 34 - "cid": "bafyreifrntpx63uebiskpooozv6hji62swectq3pocw5h5gpkkqynmazdm" 35 - }, 36 - "app.bsky.embed.record": { 37 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.record", 38 - "cid": "bafyreigdtmu53blwxoygphg5zh5zpmlftz64c3jyqpv2yqpx3nrichkyla" 39 - }, 40 - "app.bsky.embed.recordWithMedia": { 41 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.recordWithMedia", 42 - "cid": "bafyreia7jrw2p73egm7vrunssgzeyj2rwmk3s4dymfhgzcavxjfaje3qfi" 43 - }, 44 - "app.bsky.embed.video": { 45 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.video", 46 - "cid": "bafyreie3nug4ezpwodl6yrpgv5edkazzn22t7ea4yaeuun4rctyekkngai" 47 - }, 48 - "app.bsky.feed.defs": { 49 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.feed.defs", 50 - "cid": "bafyreiadwvxawxifsnm7ae6l56aq23qs7ndih7npgs6pxmkoin7gi3k6pu" 51 - }, 52 - "app.bsky.feed.postgate": { 53 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.feed.postgate", 54 - "cid": "bafyreiai5efexyluyptv5tbl6kqbqlnneczqzexcqnxmitmulyjfaftgva" 55 - }, 56 - "app.bsky.feed.threadgate": { 57 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.feed.threadgate", 58 - "cid": "bafyreiht77wd6duduz4yqp62m6dwma5dy7gdihps4g2nd73acfzqlglvdi" 59 - }, 60 - "app.bsky.graph.defs": { 61 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.graph.defs", 62 - "cid": "bafyreifcipomli7yggtl46xufgxlnrw7se6xmsdxmzgfcz2tiu76ljatxm" 63 - }, 64 - "app.bsky.labeler.defs": { 65 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.labeler.defs", 66 - "cid": "bafyreicxx5i36v5dbqk5vvfzhnta5gajrvc544mnepux4wksrkid7mw3q4" 67 - }, 68 - "app.bsky.notification.defs": { 69 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.notification.defs", 70 - "cid": "bafyreickbpnayydlyfakliahgf23jjuesllh6qrslyofk5yz5xizjavhui" 71 - }, 72 - "app.bsky.richtext.facet": { 73 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.richtext.facet", 74 - "cid": "bafyreidg56eo7zynf6ihz4xb627vwoqf5idnevkmwp7sxc4tijg6xngbu4" 75 - }, 76 - "com.atproto.label.defs": { 77 - "uri": "at://did:plc:6msi3pj7krzih5qxqtryxlzw/com.atproto.lexicon.schema/com.atproto.label.defs", 78 - "cid": "bafyreig4hmnb2xkecyg4aaqfhr2rrcxxb3gsr4xks4rqb7rscrycalbrji" 79 - }, 80 - "com.atproto.moderation.defs": { 81 - "uri": "at://did:plc:6msi3pj7krzih5qxqtryxlzw/com.atproto.lexicon.schema/com.atproto.moderation.defs", 82 - "cid": "bafyreideawy4rlpgces2oebk5q4kpurbonhb5qtl4pes7dvxsc5osaiksy" 83 - }, 84 - "com.atproto.repo.strongRef": { 85 - "uri": "at://did:plc:6msi3pj7krzih5qxqtryxlzw/com.atproto.lexicon.schema/com.atproto.repo.strongRef", 86 - "cid": "bafyreifrkdbnkvfjujntdaeigolnrjj3srrs53tfixjhmacclps72qlov4" 87 - }, 88 - "tools.ozone.report.defs": { 89 - "uri": "at://did:plc:33dt5kftu3jq2h5h4jjlqezt/com.atproto.lexicon.schema/tools.ozone.report.defs", 90 - "cid": "bafyreic3l2rmh2ugirt3jz372wcvy333m7t2ynlyzj2k54oshijs6lxdfu" 91 - } 92 - } 93 - }
+2 -1
templates/react-ts/package.json
··· 7 7 "dev": "vite", 8 8 "build": "tsc -b && vite build", 9 9 "preview": "vite preview", 10 - "postinstall": "lex install --ci && lex install --update && lex build --out ./src/__generated__", 10 + "update-lexicons": "lex install --update --save", 11 + "postinstall": "lex install --ci", 11 12 "prebuild": "lex build --out ./src/__generated__" 12 13 }, 13 14 "dependencies": {
+27
templates/svelte-ts/README.md
··· 6 6 7 7 - [Introduction to the AT Protocol](https://atproto.com/articles/atproto-ethos) 8 8 - [Bluesky Developer Documentation](https://docs.bsky.app) 9 + - [@atproto/lex documentation](https://github.com/bluesky-social/atproto/tree/HEAD/packages/lex/lex#quick-start) 10 + 11 + ## Getting Started 12 + 13 + You'll need to install some lexicons before starting development. In your terminal, run: 14 + 15 + ```bash 16 + npx @atproto/lex install app.bsky.actor.getProfile 17 + ``` 18 + 19 + Then generate the TypeScript files. You can change the destination to where these files are generated but remember to update your ``.gitignore`` file so you don't commit them. 20 + 21 + ```bash 22 + npx @atproto/lex build --out ./src/__generated__ 23 + ``` 24 + 25 + Next, install the package dependencies: 26 + 27 + ```bash 28 + npm install 29 + ``` 30 + 31 + Finally, run the development server: 32 + 33 + ```bash 34 + npm run dev 35 + ```
-93
templates/svelte-ts/lexicons.json
··· 1 - { 2 - "version": 1, 3 - "lexicons": [ 4 - "app.bsky.actor.getProfile", 5 - "app.bsky.actor.profile" 6 - ], 7 - "resolutions": { 8 - "app.bsky.actor.defs": { 9 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.defs", 10 - "cid": "bafyreigwqwhe2jxohagozazfbrf6dxgzphvkg3d3lg7uxdvepsimqyclka" 11 - }, 12 - "app.bsky.actor.getProfile": { 13 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.getProfile", 14 - "cid": "bafyreigrtosreva7e5m7bwbbfsmw77gkdnieizgxwpobw5iobuck3j54xa" 15 - }, 16 - "app.bsky.actor.profile": { 17 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.profile", 18 - "cid": "bafyreia6umzg3a6d7mjbow4p57tviey45muohklhgsvjoamcctoiusr4pe" 19 - }, 20 - "app.bsky.actor.status": { 21 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.status", 22 - "cid": "bafyreifdg4b64wohpwkh5lydc6tckvol2rspnpni6dec6recy2rhvlnz4a" 23 - }, 24 - "app.bsky.embed.defs": { 25 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.defs", 26 - "cid": "bafyreia42uud4qil67wknywzbxfyxc3b7woewsii54cakq2ould3ldetei" 27 - }, 28 - "app.bsky.embed.external": { 29 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.external", 30 - "cid": "bafyreiblxmpzgwg4fbr45b4xzts3h4k72k7cdnrxy2ub2w5d7mnwzznkwi" 31 - }, 32 - "app.bsky.embed.images": { 33 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.images", 34 - "cid": "bafyreifrntpx63uebiskpooozv6hji62swectq3pocw5h5gpkkqynmazdm" 35 - }, 36 - "app.bsky.embed.record": { 37 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.record", 38 - "cid": "bafyreigdtmu53blwxoygphg5zh5zpmlftz64c3jyqpv2yqpx3nrichkyla" 39 - }, 40 - "app.bsky.embed.recordWithMedia": { 41 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.recordWithMedia", 42 - "cid": "bafyreia7jrw2p73egm7vrunssgzeyj2rwmk3s4dymfhgzcavxjfaje3qfi" 43 - }, 44 - "app.bsky.embed.video": { 45 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.embed.video", 46 - "cid": "bafyreie3nug4ezpwodl6yrpgv5edkazzn22t7ea4yaeuun4rctyekkngai" 47 - }, 48 - "app.bsky.feed.defs": { 49 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.feed.defs", 50 - "cid": "bafyreiadwvxawxifsnm7ae6l56aq23qs7ndih7npgs6pxmkoin7gi3k6pu" 51 - }, 52 - "app.bsky.feed.postgate": { 53 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.feed.postgate", 54 - "cid": "bafyreiai5efexyluyptv5tbl6kqbqlnneczqzexcqnxmitmulyjfaftgva" 55 - }, 56 - "app.bsky.feed.threadgate": { 57 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.feed.threadgate", 58 - "cid": "bafyreiht77wd6duduz4yqp62m6dwma5dy7gdihps4g2nd73acfzqlglvdi" 59 - }, 60 - "app.bsky.graph.defs": { 61 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.graph.defs", 62 - "cid": "bafyreifcipomli7yggtl46xufgxlnrw7se6xmsdxmzgfcz2tiu76ljatxm" 63 - }, 64 - "app.bsky.labeler.defs": { 65 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.labeler.defs", 66 - "cid": "bafyreicxx5i36v5dbqk5vvfzhnta5gajrvc544mnepux4wksrkid7mw3q4" 67 - }, 68 - "app.bsky.notification.defs": { 69 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.notification.defs", 70 - "cid": "bafyreickbpnayydlyfakliahgf23jjuesllh6qrslyofk5yz5xizjavhui" 71 - }, 72 - "app.bsky.richtext.facet": { 73 - "uri": "at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.richtext.facet", 74 - "cid": "bafyreidg56eo7zynf6ihz4xb627vwoqf5idnevkmwp7sxc4tijg6xngbu4" 75 - }, 76 - "com.atproto.label.defs": { 77 - "uri": "at://did:plc:6msi3pj7krzih5qxqtryxlzw/com.atproto.lexicon.schema/com.atproto.label.defs", 78 - "cid": "bafyreig4hmnb2xkecyg4aaqfhr2rrcxxb3gsr4xks4rqb7rscrycalbrji" 79 - }, 80 - "com.atproto.moderation.defs": { 81 - "uri": "at://did:plc:6msi3pj7krzih5qxqtryxlzw/com.atproto.lexicon.schema/com.atproto.moderation.defs", 82 - "cid": "bafyreideawy4rlpgces2oebk5q4kpurbonhb5qtl4pes7dvxsc5osaiksy" 83 - }, 84 - "com.atproto.repo.strongRef": { 85 - "uri": "at://did:plc:6msi3pj7krzih5qxqtryxlzw/com.atproto.lexicon.schema/com.atproto.repo.strongRef", 86 - "cid": "bafyreifrkdbnkvfjujntdaeigolnrjj3srrs53tfixjhmacclps72qlov4" 87 - }, 88 - "tools.ozone.report.defs": { 89 - "uri": "at://did:plc:33dt5kftu3jq2h5h4jjlqezt/com.atproto.lexicon.schema/tools.ozone.report.defs", 90 - "cid": "bafyreic3l2rmh2ugirt3jz372wcvy333m7t2ynlyzj2k54oshijs6lxdfu" 91 - } 92 - } 93 - }
+2 -1
templates/svelte-ts/package.json
··· 8 8 "build": "vite build", 9 9 "preview": "vite preview", 10 10 "check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json", 11 - "postinstall": "lex install --ci && lex install --update && lex build --out ./src/__generated__", 11 + "update-lexicons": "lex install --update --save", 12 + "postinstall": "lex install --ci", 12 13 "prebuild": "lex build --out ./src/__generated__" 13 14 }, 14 15 "dependencies": {

History

1 round 0 comments
sign up or login to add to the discussion
besaid.zone submitted #0
2 commits
expand
fix(templates): update readme and project scripts for templates
chore: changeset
expand 0 comments
pull request successfully merged