configure rewrite in command line

オープン
#220 コメント 0 件 リアクション 9 件 担当者 0 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
cli, web-dev

調査の方向性

コマンドラインのエントリーポイントと既存の superstatic.json の rewrite 設定から始め、CLI オプションと rewrite ルールがどのように読み込まれるかを追跡します。マッチしないルートを選択した HTML ファイルへ rewrite するために要求されたオプションを追加し、高度な設定のサポートを維持したまま SPA ルートへの直接アクセスを検証します。

索引モデルが issue の本文から書いたものです。

説明

Most of SPA which use html5 pushstate need a url rewrite when user directly access to an url which is not a file but a route (ex : refresh on /customers/1) and superstatic is great for that. I guess
{ "rewrites": [ {"source":"/**","destination":"/index.html"} ] } in superstatic.json is very common (index.html or default.html or whatever).

It would be great to have a command line argument for that, something like :
superstatic -ra index.html (ra for "rewrite all").

then the superstatic.json could be removed or used only for advanced configuration. Modern js app already requires many js config (gulp.js, package.js, config.js, etc...) so if the http server could work without another config file for basic settings it would be great.

http-server-fallback use a -f flag (for fallback, but makes a redirect and not a rewrite, which makes it useless for spa)

主要言語
TypeScript
スター
1.1k
フォーク
90
平均マージ
3日 19時間
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/superstatic のほかの issue

firebase/superstatic の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。