Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Introduce basic project examples #302

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ runs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 19
node-version: 20
cache: pnpm
cache-dependency-path: 'app'
cache-dependency-path: |
app
examples

- name: Install dependencies
run: cd app && pnpm install
Expand Down
4 changes: 3 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "next build && pnpm build:examples",
"build:examples": "mkdir -p out/examples && cd ../examples && pnpm install && pnpm -r build:example && pnpm -r copy:next",
"export": "next export",
"start": "next start",
"lint": "eslint -c .eslintrc.json --ext .jsx,.tsx ./src ./local ./data ./app",
"typecheck": "tsc --noEmit"
Expand Down
1 change: 1 addition & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
19 changes: 19 additions & 0 deletions examples/list_names/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021
},
"extends": [
"plugin:v3xlabs/recommended"
],
"ignorePatterns": [
"!**/*"
],
"plugins": [
"v3xlabs"
],
"env": {
"browser": true
},
"rules": {}
}
2 changes: 2 additions & 0 deletions examples/list_names/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
Empty file added examples/list_names/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions examples/list_names/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tabWidth": 4,
"useTabs": false,
"singleQuote": true
}
lucemans marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 10 additions & 0 deletions examples/list_names/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Send To Example

[Live Preview](https://docs.ens.domains/examples/send_to/)

## Getting Started

```
pnpm install
pnpm dev
```
12 changes: 12 additions & 0 deletions examples/list_names/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello Example</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
44 changes: 44 additions & 0 deletions examples/list_names/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "example-profile",
"version": "0.0.0",
"private": true,
"type": "module",
"dependencies": {
"@ens-tools/format": "^0.0.3",
"@ensdomains/ensjs": "4.0.1-alpha.0",
"@ensdomains/ensjs-react": "^0.0.3",
"@ensdomains/thorin": "1.0.0-beta.9",
"@tanstack/react-query": "5.54",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"@wagmi/chains": "^1.8.0",
"autoprefixer": "^10.4.20",
"ens-tools": "^0.0.14",
"postcss": "^8.4.47",
"postcss-nested": "^6.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^5.3.0",
"tailwindcss": "^3.4.13",
"ts-node": "^10.9.2",
"use-debounce": "^10.0.3",
"viem": "^1.21.4",
"vite": "^5.4.7",
"wagmi": "~1.3.11"
},
"scripts": {
"start": "vite",
"dev": "vite",
"build": "vite build",
"build:example": "vite build --base=/examples/list_names/",
"copy:next": "cp -r ./dist ../../app/out/examples/list_names",
"lint": "eslint -c .eslintrc.json --ext .tsx,.ts ./src"
},
"devDependencies": {
"@types/tailwindcss": "^3.1.0",
"@typescript-eslint/parser": "^8.8.0",
"eslint": "^8.48.0",
"eslint-plugin-v3xlabs": "^1.6.5",
"typescript": "^5.6.2"
}
}
lucemans marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading