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

Feature/update #34

Merged
merged 7 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
35 changes: 35 additions & 0 deletions .github/workflows/jestTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test by jest

on: [pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Your node version, default 20 in 2024

- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Install pnpm
run: npm install -g pnpm

- name: Install Dependencies
run: pnpm install

- name: Run Jest Test
run: pnpm run -C apps/aelf-template test
35 changes: 35 additions & 0 deletions .github/workflows/nextBuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Next Build

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Your node version, default 20 in 2024

- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install pnpm
run: npm install -g pnpm

- name: Install Dependencies
run: pnpm install

- name: Run Next Build
run: pnpm run -C apps/aelf-template build
35 changes: 35 additions & 0 deletions .github/workflows/nextLint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Next Lint

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Your node version, default 20 in 2024

- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install pnpm
run: npm install -g pnpm

- name: Install Dependencies
run: pnpm install

- name: Run ESLint
run: pnpm run -C apps/aelf-template lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dist-ssr

# lock
*-lock.yarl
*-lock.yaml
*-lock.json

apps/aelf-template/.next
12 changes: 0 additions & 12 deletions .idea/aelf-nextjs-cli.iml

This file was deleted.

11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ lerna run build

publish to npm
```bash
# Publish all packages
lerna publish

# Publish single package
cd apps/create-aelf-dapp
npm publish
```

rm node_modules
Expand All @@ -48,3 +53,9 @@ lerna clean
rm -rf node_modules/
```

## add dependence

```bash
# example
pnpm install -C apps/aelf-template @ant-design/icons
```
5 changes: 5 additions & 0 deletions apps/aelf-template/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist
.git
Dockerfile
.dockerignore
36 changes: 35 additions & 1 deletion apps/aelf-template/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
{
"plugins": ["tailwindcss"],
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:tailwindcss/recommended",
"plugin:prettier/recommended",
"plugin:@tanstack/eslint-plugin-query/recommended"
]
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module"
},
"ignorePatterns": [],
"rules": {
"quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"@typescript-eslint/no-explicit-any": "off",
"tailwindcss/classnames-order": "off",
"tailwindcss/no-custom-classname": "off",
"tailwindcss/no-contradicting-classname": "error",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": false
}
]
}
}
25 changes: 20 additions & 5 deletions apps/aelf-template/.github/workflows/jestTest.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Test by jest

on: [push, pull_request]
on: [pull_request]

jobs:
lint:
test:
runs-on: ubuntu-latest

steps:
Expand All @@ -13,8 +13,23 @@ jobs:
with:
node-version: '20' # Your node version, default 20 in 2024

- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Install pnpm
run: npm install -g pnpm

- name: Install Dependencies
run: yarn
run: pnpm install

- name: Run Test
run: yarn test
- name: Run Jest Test
run: pnpm test
35 changes: 35 additions & 0 deletions apps/aelf-template/.github/workflows/nextBuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Next Build

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Your node version, default 20 in 2024

- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Install pnpm
run: npm install -g pnpm

- name: Install Dependencies
run: pnpm install

- name: Run Next Build
run: pnpm build
11 changes: 7 additions & 4 deletions apps/aelf-template/.github/workflows/nextLint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Next Lint

on: [push, pull_request]
on: [pull_request]

jobs:
lint:
Expand All @@ -19,14 +19,17 @@ jobs:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn-lock.json') }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Install pnpm
run: npm install -g pnpm

- name: Install Dependencies
run: yarn
run: pnpm install

- name: Run ESLint
run: yarn lint
run: pnpm lint
9 changes: 9 additions & 0 deletions apps/aelf-template/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ yarn-error.log*

# local env files
.env*.local
.env

# vercel
.vercel
Expand All @@ -39,3 +40,11 @@ next-env.d.ts

# Sentry Config File
.env.sentry-build-plugin

# npm pack local test
package

# git ls-files > filelist.txt
filelist.txt

.eslintcache
3 changes: 2 additions & 1 deletion apps/aelf-template/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"plugins": ["prettier-plugin-tailwindcss"]
"plugins": ["prettier-plugin-tailwindcss"],
"singleQuote": true
}
37 changes: 37 additions & 0 deletions apps/aelf-template/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"extends": [
"stylelint-config-standard",
"stylelint-config-css-modules",
"stylelint-prettier/recommended"
],
"plugins": [
"stylelint-order"
],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
],
"order/order": [
"custom-properties",
"declarations"
],
"order/properties-alphabetical-order": true,
"selector-class-pattern": null,
"prettier/prettier": true
},
"ignoreFiles": [
"**/node_modules/**",
"**/dist/**",
"**/build/**",
"**/.next/**"
]
}
Loading
Loading