Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[pull] master from xcatliu:master #7

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
rules: {
// Customize your rules
'no-undef': 'off',
'prefer-arrow-callback': 'off',
'@typescript-eslint/no-invalid-this': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/method-signature-style': 'off',
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build-and-deploy:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -16,15 +16,15 @@ jobs:
- name: Setup deno
uses: denolib/setup-deno@v2
with:
deno-version: v1.11.5
deno-version: v1.34.1

- name: Build gh-pages
run: |
curl -fsSL https://deno.land/x/install/install.sh | sh
export DENO_INSTALL="/home/runner/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
deno --version
deno install --unstable --allow-read --allow-write --allow-net --allow-run -n pagic https://deno.land/x/pagic@v1.4.0/mod.ts
deno install --unstable --allow-read --allow-write --allow-net --allow-run -n pagic https://deno.land/x/pagic@v1.6.3/mod.ts
pagic build

- name: Deploy gh-pages
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ assets
.gitignore
.lintmdrc
.prettierignore
.npmrc

package-lock.json
pnpm-lock.yaml

examples
dist
42 changes: 24 additions & 18 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
// .prettierrc.js
module.exports = {
// max 120 characters per line
// 一行最多 120 字符
printWidth: 120,
// use 2 spaces for indentation
// 使用 2 个空格缩进
tabWidth: 2,
// use spaces instead of indentations
// 不使用缩进符,而使用空格
useTabs: false,
// semicolon at the end of the line
// 行尾需要有分号
semi: true,
// use single quotes
// 使用单引号
singleQuote: true,
// object's key is quoted only when necessary
// 对象的 key 仅在必要时用引号
quoteProps: 'as-needed',
// use double quotes instead of single quotes in jsx
// jsx 不使用单引号,而使用双引号
jsxSingleQuote: false,
// no comma at the end
// 末尾需要有逗号
trailingComma: 'all',
// spaces are required at the beginning and end of the braces
// 大括号内的首尾需要空格
bracketSpacing: true,
// end tag of jsx need to wrap
jsxBracketSameLine: false,
// brackets are required for arrow function parameter, even when there is only one parameter
// jsx 标签的反尖括号需要换行
bracketSameLine: false,
// 箭头函数,只有一个参数的时候,也需要括号
arrowParens: 'always',
// format the entire contents of the file
// 每个文件格式化的范围是文件的全部内容
rangeStart: 0,
rangeEnd: Infinity,
// no need to write the beginning @prettier of the file
// 不需要写文件开头的 @prettier
requirePragma: false,
// No need to automatically insert @prettier at the beginning of the file
// 不需要自动在文件开头插入 @prettier
insertPragma: false,
// use default break criteria
// 使用默认的折行标准
proseWrap: 'preserve',
// decide whether to break the html according to the display style
// 根据显示样式决定 html 要不要折行
htmlWhitespaceSensitivity: 'css',
// lf for newline
// vue 文件中的 script 和 style 内不用缩进
vueIndentScriptAndStyle: false,
// 换行符使用 lf
endOfLine: 'lf',
// 格式化嵌入的内容
embeddedLanguageFormatting: 'auto',
// html, vue, jsx 中每个属性占一行
singleAttributePerLine: false,
};
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
// 保存时自动修复 ESLint 错误
"source.fixAll.eslint": true
},
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
File renamed without changes.
Binary file added TypeScript 入门教程.epub
Binary file not shown.
Loading