Skip to content

Commit

Permalink
fix: add remix snippets (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosn authored Sep 23, 2024
1 parent ff09e07 commit 6a2524f
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 26 deletions.
56 changes: 30 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"javascriptreact",
"htmldjango",
"astro",
"blade"
"blade"
],
"path": "./snippets/html.json"
},
Expand All @@ -257,14 +257,6 @@
"language": ["typescript", "typescriptreact"],
"path": "./snippets/javascript/typescript.json"
},
{
"language": "javascriptreact",
"path": "./snippets/javascript/react.json"
},
{
"language": "javascriptreact",
"path": "./snippets/javascript/react-native.json"
},
{
"language": "javascriptreact",
"path": "./snippets/javascript/next.json"
Expand All @@ -277,6 +269,14 @@
"language": "typescriptreact",
"path": "./snippets/javascript/next-ts.json"
},
{
"language": "javascriptreact",
"path": "./snippets/javascript/react.json"
},
{
"language": "javascriptreact",
"path": "./snippets/javascript/react-native.json"
},
{
"language": "typescriptreact",
"path": "./snippets/javascript/react-native-ts.json"
Expand All @@ -285,6 +285,10 @@
"language": ["javascriptreact", "typescriptreact"],
"path": "./snippets/javascript/react-es7.json"
},
{
"language": "remix",
"path": "./snippets/frameworks/remix-ts.json"
},
{
"language": "terraform",
"path": "./snippets/terraform.json"
Expand Down Expand Up @@ -430,25 +434,25 @@
"path": "./snippets/latex/bibtex.json"
},
{
"language": "twig",
"language": "twig",
"path": "./snippets/frameworks/twig.json"
},
{
"language": "blade",
"path": "./snippets/frameworks/blade/blade.json"
},
{
"language": "blade",
"path": "./snippets/frameworks/blade/helpers.json"
},
{
"language": "blade",
"path": "./snippets/frameworks/blade/livewire.json"
},
{
"language": "blade",
"path": "./snippets/frameworks/blade/snippets.json"
},
{
"language": "blade",
"path": "./snippets/frameworks/blade/blade.json"
},
{
"language": "blade",
"path": "./snippets/frameworks/blade/helpers.json"
},
{
"language": "blade",
"path": "./snippets/frameworks/blade/livewire.json"
},
{
"language": "blade",
"path": "./snippets/frameworks/blade/snippets.json"
},
{
"language": ["r", "rmd"],
"path": "./snippets/r.json"
Expand Down
53 changes: 53 additions & 0 deletions snippets/frameworks/remix-ts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"Remix loader function": {
"prefix": "rxl",
"body": [
"import { type LoaderFunction, json } from '@remix-run/node'",
"import { useLoaderData } from '@remix-run/react'",
"",
"export const loader: LoaderFunction = async () => {",
"\treturn json({ ok: true })",
"}"
],
"description": "Remix loader function"
},
"Remix action function": {
"prefix": "rxa",
"body": [
"import { type ActionFunction, json } from '@remix-run/node'",
"",
"export const action: ActionFunction = async ({ request }) => {",
"\treturn json({ ok: true })",
"}"
],
"description": "Remix action function"
},
"Remix meta function": {
"prefix": "rxm",
"body": [
"import { type MetaFunction } from '@remix-run/node'",
"",
"export const meta: MetaFunction = () => {",
"\treturn [",
"\t\t{ title: ''},",
"\t\t{ name: 'description', content: ''}",
"\t]",
"}"
],
"description": "Remix meta function"
},
"Remix links function": {
"prefix": "rxi",
"body": [
"import { type LinksFunction } from '@remix-run/node'",
"",
"export const links: LinksFunction = () => {",
"\treturn [",
"\t\t{",
"\t\t}",
"\t]",
"}"
],
"description": "Remix links function"
}
}

0 comments on commit 6a2524f

Please sign in to comment.