Skip to content

Commit

Permalink
feat(template): [release-minor] polish create-blocklet template (#325)
Browse files Browse the repository at this point in the history
* chore(ci): update ci version

* chore(deps): update deps

* chore(deps): update template deps

* chore(deps): update zx & bumpp

* chore(deps): update missing deps

* chore(ci): update ci deps

* chore(create): update react-static templace

* chore(templace): update template html file viewport

* chore(template): update clean script

* chore(template): update react-dapp template

* chore(template): update react-dapp-ts templat

* chore(remplate): update prepare scripts

* chore(template): update express-api template

* chore(template): update nestjs-api template

* chore(template): update solidjs-static template

* chore(template): update solidjs-dapp template

* chore(template): update vue-static template

* chore(deps): update eslint-config-prettier version

* chore(template): update vue-dapp template

* chore(template): update svelte-static template

* chore(template): update svelte-dapp template

* chore(template): update todo-list-example template

* chore(template): update dapp bundle mode -> compact

* chore(style): update prettier config

* chore(deps): update deps

* chore(create): eslint should work with create-app

* chore(template): tweak template info

* chore(template): update template doc link

* chore(template): update blocklet specVersion

* chore(template): polish template details

* chore(template): remove svelte template eslint config

* chore(template): update template docs link

* chore: update root bump-version script

* chore(release): v0.8.0

* chore(deps): update deps

* chore(template): update template author
  • Loading branch information
LancelotLewis authored Jun 30, 2024
1 parent 504845c commit 37fa5f9
Show file tree
Hide file tree
Showing 270 changed files with 5,893 additions and 5,176 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
# - uses: pnpm/action-setup@v2.0.1
# - uses: pnpm/action-setup@v3
# with:
# version: latest
# - uses: actions/setup-node@v2
# version: 9
# - uses: actions/setup-node@v4
# with:
# node-version: '16'
# node-version: '20'
# cache: 'pnpm'

# - run: npm add -g @antfu/ni
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
# - uses: pnpm/action-setup@v2.0.1
# - uses: pnpm/action-setup@v3
# with:
# version: latest
# - uses: actions/setup-node@v2
# version: 9
# - uses: actions/setup-node@v4
# with:
# node-version: '16'
# node-version: '20'
# cache: 'pnpm'

# - run: npm add -g @antfu/ni
Expand Down
67 changes: 6 additions & 61 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
changed-files: ${{ toJSON(steps.changed-files-docs.outputs) }}
bump-version: ${{ steps.changed-files-docs.outputs.only_changed == 'false' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files in the docs folder
Expand All @@ -23,77 +23,22 @@ jobs:
files: |
website/**
upload:
if: "! contains(toJSON(github.event.commits.*.message), '[skip actions]')"
needs: check-files
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/[email protected]
with:
version: latest
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'pnpm'

- run: npm add -g @antfu/ni
- run: nci

# - name: Deploy Page Site
# uses: blocklet/action-workflow@v1
# with:
# skip-deps: false
# skip-bundle: false
# skip-upload: true
# skip-deploy: false
# skip-release: true
# deploy-app-did: zNKkQuRidtsBVskb8oDXKVh5PpM5uD5PKxim
# deploy-mount-point: /
# bundle-command: nr bundle
# working-directory: website/pages
# server-endpoint: ${{ secrets.XMARK_NODE_ENDPOINT }}
# server-access-key: ${{ secrets.XMARK_NODE_ACCESS_KEY }}
# server-access-secret: ${{ secrets.XMARK_NODE_ACCESS_SECRET }}
# slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

# - name: Deploy Docs Site
# uses: blocklet/action-workflow@v1
# with:
# skip-deps: true
# skip-bundle: false
# skip-upload: true
# skip-deploy: false
# skip-release: true
# deploy-app-did: zNKkQuRidtsBVskb8oDXKVh5PpM5uD5PKxim
# deploy-mount-point: /docs
# bundle-command: nr bundle
# working-directory: website/docs
# server-endpoint: ${{ secrets.XMARK_NODE_ENDPOINT }}
# server-access-key: ${{ secrets.XMARK_NODE_ACCESS_KEY }}
# server-access-secret: ${{ secrets.XMARK_NODE_ACCESS_SECRET }}
# slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

publish:
if: needs.check-files.outputs.bump-version == 'true'
runs-on: ubuntu-latest
needs:
- check-files
- upload
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GIT_HUB_TOKEN }}
- uses: pnpm/action-setup@v2.0.1
- uses: pnpm/action-setup@v3
with:
version: latest
- uses: actions/setup-node@v2
version: 9
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'pnpm'
- run: npm add -g @antfu/ni
- run: nci
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"trailingComma": "all",
"jsxBracketSameLine": true,
"semi": true,
"singleQuote": true
Expand Down
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
## 0.8.0 (2024-6-30)

- chore: update root bump-version script
- chore(template): update template docs link
- chore(template): remove svelte template eslint config
- chore(template): polish template details
- chore(template): update blocklet specVersion
- chore(template): update template doc link
- chore(template): tweak template info
- chore(create): eslint should work with create-app
- chore(deps): update deps
- chore(style): update prettier config
- chore(template): update dapp bundle mode -> compact
- chore(template): update todo-list-example template
- chore(template): update svelte-dapp template
- chore(template): update svelte-static template
- chore(template): update vue-dapp template
- chore(deps): update eslint-config-prettier version
- chore(template): update vue-static template
- chore(template): update solidjs-dapp template
- chore(template): update solidjs-static template
- chore(template): update nestjs-api template
- chore(template): update express-api template
- chore(remplate): update prepare scripts
- chore(template): update react-dapp-ts templat
- chore(template): update react-dapp template
- chore(template): update clean script
- chore(templace): update template html file viewport
- chore(create): update react-static templace
- chore(ci): update ci deps
- chore(deps): update missing deps
- chore(deps): update zx & bumpp
- chore(deps): update template deps
- chore(deps): update deps
- chore(ci): update ci version

## 0.7.9 (2024-4-7)

- feat(todo-list-example): improve the todo-list template
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"name": "create-blocklet",
"private": true,
"version": "0.7.9",
"version": "0.8.0",
"description": "",
"keywords": [],
"author": "",
"license": "ISC",
"scripts": {
"prepare": "npx simple-git-hooks",
"debug": "node packages/create-app/index.js",
"test": "echo \"Error: no test specified\" && exit 1",
"bump-version": "zx --quiet scripts/bump-version.mjs",
"update:deps": "pnpm -r exec taze -r -n '/arcblock|ocap|abtnode|blocklet|did-connect|did-comment|nedb/' -w",
"update:deps": "pnpm -r exec npx taze -r -n '/arcblock|ocap|abtnode|blocklet|did-connect|did-comment|nedb/' -w",
"preinstall": "npx only-allow pnpm",
"publish-plugins": "zx --quiet scripts/publish-plugins.mjs"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"bumpp": "^7.2.0",
"taze": "^0.13.0",
"zx": "^7.2.3"
"bumpp": "^9.4.1",
"zx": "^8.1.3"
},
"devDependencies": {
"simple-git-hooks": "^2.11.1"
},
"resolutions": {
"@blocklet/sdk": "^1.16.20",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.1",
"vite-plugin-node-polyfills": "^0.17.0"
"simple-git-hooks": {
"pre-commit": "pnpm -r lint"
}
}
1 change: 1 addition & 0 deletions packages/create-app/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
templates
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
},
extends: '@arcblock/eslint-config-base',
rules: {
'no-use-before-define': ['error', { functions: false }],
'import/extensions': 'off',
'no-console': 'off',
'import/no-unresolved': 'off',
Expand Down
17 changes: 10 additions & 7 deletions packages/create-app/common/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- master

jobs:
Deploy:
Expand All @@ -13,20 +14,22 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set yarn cache
uses: c-hive/gha-yarn-cache@v2

- name: Install dependencies
run: yarn
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Blocklet workflow
uses: blocklet/action-workflow@v1
with:
skip-upload: false
skip-deploy: false
bundle-command: yarn bundle
bundle-command: pnpm bundle
store-endpoint: ${{ secrets.STORE_ENDPOINT }}
store-access-token: ${{ secrets.STORE_ACCESS_TOKEN }}
server-endpoint: ${{ secrets.SERVER_ENDPOINT }}
Expand Down
4 changes: 0 additions & 4 deletions packages/create-app/common/.husky/pre-commit

This file was deleted.

2 changes: 1 addition & 1 deletion packages/create-app/common/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"printWidth": 120,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "es5",
"trailingComma": "all",
"bracketSameLine": true,
"semi": true,
"singleQuote": true
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/common/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2018-2020 ArcBlock
Copyright 2018-2024 ArcBlock

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions packages/create-app/common/_gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ build
dist
dist-ssr
.blocklet
.next

# local env files
*.local
Expand Down
4 changes: 0 additions & 4 deletions packages/create-app/common/_npmrc

This file was deleted.

5 changes: 0 additions & 5 deletions packages/create-app/common/scripts/build-clean.js

This file was deleted.

7 changes: 7 additions & 0 deletions packages/create-app/common/scripts/build-clean.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* eslint-disable no-console */

import { rimrafSync } from 'rimraf';

console.log('clean .blocklet folder');
rimrafSync('.blocklet');
console.log('clean .blocklet folder done!');
Loading

0 comments on commit 37fa5f9

Please sign in to comment.