Skip to content

Commit c87e1f2

Browse files
authored
修正安全提示並補完說明文件 (#2)
* 移除 composer.lock * 補上 .editorconfig * Rename phpunit.xml -> phpunit.xml.dist * 補完說明文件
1 parent 2da63a4 commit c87e1f2

File tree

6 files changed

+45
-8028
lines changed

6 files changed

+45
-8028
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/vendor
2+
/coverage
23
.env
34
.php_cs.cache
45
.phpunit.result.cache
6+
composer.lock

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,27 @@
1-
# A Laravel package example
1+
# A2Workspace/Laravel-Stubs
2+
3+
一個基於專案的程式模板注入器。
4+
5+
透過在專案中的 `resources/stubs` 目錄下,放置類別的模板文件,然後透過命令快速注入並生成。相比原生的 `artisan make:*` 命令可大大減少編寫時間,且模板檔案可隨版控被 git 紀錄。
6+
7+
目前支援的類別類型:
8+
- 命名空間 App\\* 開頭的類別
9+
- 命名空間 Tests\\* 開頭的類別
10+
- 命名空間 Database\\* 開頭的類別
11+
12+
## Installation | 安裝
13+
14+
此套件尚未發布到 **Packagist** 需透過下列方法安裝:
15+
16+
```
17+
composer config repositories.a2workspace/laravel-stubs vcs https://github.com/A2Workspace/laravel-stubs.git
18+
composer require "a2workspace/laravel-stubs:*"
19+
```
20+
21+
## Usage | 如何使用
22+
23+
現在你可以使用 `make:a..` [Artisan 命令](https://laravel.com/docs/9.x/artisan)來生成類別。該命令將會讀取 `resources/stubs` 下的目錄或 `.php` 檔案,將佔位符依照格式替換為給定的名稱,並依照類別名稱自動生成檔案到相對的路徑。
24+
25+
```
26+
php artisan make:a..
27+
```

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "a2workspace/laravel-stubs",
3-
"description": "A Laravel package example.",
3+
"description": "一個基於專案的類別模板注入器。",
44
"license": "MIT",
55
"authors": [
66
{

0 commit comments

Comments
 (0)