Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
superwunc committed Mar 26, 2024
1 parent 3c22df1 commit ebab8c6
Show file tree
Hide file tree
Showing 28 changed files with 582 additions and 124 deletions.
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# For more information about the properties used in
# this file, please see the EditorConfig documentation:
# http://editorconfig.org/
#
# Sensible EditorConfig defaults
# https://gist.github.com/matijs/662bf45dd4ec37b3a068
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

# Make sure package.json always uses 2 spaces to indent
[{package.json}]
indent_size = 2
indent_style = space

[{makefile, Makefile}]
indent_style = tab
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
root: true,
extends: '@arcblock/eslint-config',
globals: {
logger: true,
},
};
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy

on:
push:
branches:
- main

jobs:
Deploy:
runs-on: ubuntu-latest

if: "! contains(github.event.head_commit.message, '[skip ci]')"

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

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

- name: Install dependencies
run: yarn

- name: Blocklet workflow
uses: blocklet/action-workflow@v1
with:
skip-upload: false
skip-deploy: false
bundle-command: yarn bundle
store-endpoint: ${{ secrets.STORE_ENDPOINT }}
store-access-token: ${{ secrets.STORE_ACCESS_TOKEN }}
server-endpoint: ${{ secrets.SERVER_ENDPOINT }}
server-access-key: ${{ secrets.SERVER_ACCESS_KEY }}
server-access-secret: ${{ secrets.SERVER_ACCESS_SECRET }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
github-token: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Lint PR Title'

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
branches:
- main
- dev
- master

jobs:
lint-title:
runs-on: ubuntu-latest
steps:
- uses: ArcBlock/action-lint-pull-request-title@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Version Check'

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
branches:
- main
- master
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: action-version-check
uses: arcblock/action-version-check@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144 changes: 21 additions & 123 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,130 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# dependencies
.pnp
.pnp.js
.DS_Store
node_modules

# Coverage directory used by tools like istanbul
# testing
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
# production
build
dist
dist-ssr
.blocklet

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/
# local env files
*.local

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# Log files
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## force pnpm to hoist
shamefully-hoist=true
strict-peer-dependencies=false
node-linker=hoisted
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"printWidth": 120,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "es5",
"bracketSameLine": true,
"semi": true,
"singleQuote": true
}
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2018-2020 ArcBlock

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading

0 comments on commit ebab8c6

Please sign in to comment.