Skip to content

feat(connect): まとめを追加 #69

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

Merged
merged 4 commits into from
Sep 19, 2015
Merged
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ JavaScriptはとにかく柔軟な言語なので、こういうプラグイン
- [ ] どういう仕組み?
- [ ] どういう用途に向いている?
- [ ] どういう用途に向いていない?
- [ ] この仕組みを使ってるもの
- [ ] この仕組みを使っているもの
- [ ] 実装してみよう
- [ ] エコシステム
2 changes: 1 addition & 1 deletion ja/ESLint/README.md
Original file line number Diff line number Diff line change
@@ -263,7 +263,7 @@ ESLintのように与えられたコードを読み取ってチェックする
> これはルールからの書き換えのコマンドを`SourceCode`というオブジェクトに集約して、最後に実際の書き換えを行うという抽象レイヤーを設けています。
> - [Implement autofixing · Issue #3134 · eslint/eslint](https://github.com/eslint/eslint/issues/3134 "Implement autofixing · Issue #3134 · eslint/eslint")
## この仕組みを使ってるもの
## この仕組みを使っているもの

- [azu/textlint](https://github.com/azu/textlint "azu/textlint")
- テキストやMarkdownをパースしてASTにしてLintするツール
14 changes: 13 additions & 1 deletion ja/connect/README.md
Original file line number Diff line number Diff line change
@@ -180,11 +180,23 @@ Connect自体の機能は少ないため、その分_middleware_が多くある
> [WSGI ミドルウェア](http://docs.pylonsproject.org/projects/pylons-webframework/en/v1.0.1rc1/concepts.html#wsgi-middleware "WSGI ミドルウェア")より引用

## この仕組みを使ってるもの
## この仕組みを使っているもの

- [Express](http://expressjs.com/ "Express")
- Connectと_middleware_の互換性がある
- 元々はConnectを利用していたが[4.0.0](https://github.com/strongloop/express/blob/4.0.0/History.md "4.0.0")で自前の実装に変更
- [wooorm/retext](https://github.com/wooorm/retext "wooorm/retext")
- `use`でプラグインを登録していくテキスト処理ライブラリ

## まとめ

ここではConnectのプラグインアーキテクチャについて学びました。

- Connectは_middleware_を使ったHTTPサーバライブラリである
- Connect自体は機能は少ない
- 複数の_middleware_を組わせてアプリケーションを作ることができる

## 参考資料

- [Ruby - Rack解説 - Rackの構造とRack DSL - Qiita](http://qiita.com/higuma/items/838f4f58bc4a0645950a#2-5)
- [Pylons のコンセプト — Pylons 0.9.7 documentation](http://docs.pylonsproject.org/projects/pylons-webframework/en/v1.0.1rc1/concepts.html)
6 changes: 5 additions & 1 deletion test/prh-rule.yaml
Original file line number Diff line number Diff line change
@@ -74,4 +74,8 @@ rules:
- プラグインのアーキテクチャ
- expected: middleware
pattern:
- ミドルウェア
- ミドルウェア
- expected:
pattern: のは
- expected: 使っているもの
pattern: 使ってるもの