Skip to content

Commit f57227a

Browse files
committed
feat: add npm modules
1 parent fc778f0 commit f57227a

5 files changed

Lines changed: 73 additions & 1 deletion

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+
package-lock.json

chapters.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
- intro.md: Bash 简介
2+
- grammar.md: Bash 的基本语法
3+
- expansion.md: Bash 的扩展模式
4+
- string.md: 字符串操作
5+
- quotation.md: 引号和转义
6+
- arithmetic.md: Bash 的算术运算
7+
- variable.md: Bash 变量
8+
- script.md: Bash 脚本简介
9+
- condition.md: 条件判断
10+
- loop.md: 循环
11+
- function.md: Bash 函数
12+
- startup.md: Bash 启动环境
13+
- stack.md: 目录堆栈
14+
- array.md: 数组
15+
- readline.md: Bash 行操作
16+
- prompt.md: 命令提示符
17+
- debug.md: 脚本除错
18+
- set.md: set 命令
19+
- mktemp.md: mktemp 命令
20+
- trap.md: trap 命令

docs/script.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Bash 脚本
1+
# Bash 脚本简介
22

33
脚本(script)就是包含一系列命令的一个文件。Shell 读取这个文件,依次执行文件中的所有命令,就好像这些命令直接输入到命令行一样。所有能够在命令行中完成的任务,也能够用脚本来实现。
44

loppo.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
dir: docs
2+
output: dist
3+
site: Bash 脚本教程
4+
theme: wangdoc
5+
customization: false
6+
themeDir: loppo-theme
7+
direction: ltr
8+
id: bash

package.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "bash-tutorial",
3+
"version": "1.0.0",
4+
"description": "本教程介绍 Linux 命令行 Bash 的基本用法和脚本编程。",
5+
"main": "index.js",
6+
"directories": {
7+
"doc": "docs"
8+
},
9+
"scripts": {
10+
"test": "echo \"Error: no test specified\" && exit 1"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+https://github.com/wangdoc/bash-tutorial.git"
15+
},
16+
"keywords": [],
17+
"author": "",
18+
"license": "CC-BY-SA-4.0",
19+
"bugs": {
20+
"url": "https://github.com/wangdoc/bash-tutorial/issues"
21+
},
22+
"scripts": {
23+
"build": "loppo --site \"Bash 脚本教程\" --id bash --theme wangdoc",
24+
"build-and-commit": "npm run build && npm run commit",
25+
"commit": "gh-pages --dist dist --dest dist/bash --branch master --repo [email protected]:wangdoc/website.git",
26+
"chapter": "loppo chapter",
27+
"server": "loppo server"
28+
},
29+
"husky": {
30+
"hooks": {
31+
"pre-push": "npm update"
32+
}
33+
},
34+
"homepage": "https://github.com/wangdoc/bash-tutorial#readme",
35+
"dependencies": {
36+
"gh-pages": "^2.2.0",
37+
"husky": "^4.2.3",
38+
"loppo": "latest",
39+
"loppo-theme-wangdoc": "latest"
40+
}
41+
}

0 commit comments

Comments
 (0)