File tree Expand file tree Collapse file tree 7 files changed +77
-0
lines changed
docs/3-golden-week/01-wsl-setup
src/components/ExternalVideoPlayer Expand file tree Collapse file tree 7 files changed +77
-0
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,41 @@ title: WSLのセットアップ (Windows のみ)
55import CodeBlock from '@theme/CodeBlock ';
66import Term from "@site/src /components/Term";
77import OpenInCodeSandbox from "@site/src /components/OpenInCodeSandbox";
8+ import ExternalVideoPlayer from "@site/src /components/ExternalVideoPlayer";
9+
10+ ## Linux と WSL
11+
12+ 現在、Web サービスを提供するコンピューターのほとんどに、** Linux** という名前の OS が搭載されています。このため、Web サービスを開発するには、Linux を用いて開発することが理想です。しかしながら、現在流通している一般的なコンピューターに搭載されている OS は、Windows または macOS です。
13+
14+ 実は、macOS を使う場合はあまり問題になりません。これは、macOS という OS が、Linux と源流を共にしているからです。こういった理由から、macOS は Web 開発者から強く支持されています。
15+
16+ ** WSL** は、こういった状況を覆すべく Microsoft 社によって開発された、** Windows 上で Linux を動かすための仕組み** です。WSL を用いることで、Windows の利便性を享受しつつ、Linux のパワーを活用できます。
17+
18+ ## Windows 環境に WSL をインストールする
19+
20+ WSL のインストールは、10 分程度で終わる簡単な作業です。下の動画を参考に実施しましょう。
21+
22+ <ExternalVideoPlayer src =" https://www.youtube.com/embed/aRf7NYZpUa0 " />
23+
24+ まずは ` ターミナル ` アプリを管理者として実行します。
25+
26+ :::tip 管理者として実行
27+ ` 管理者として実行 ` メニューを使用してアプリを起動することで、アプリは強い権限を行使できるようになります。WSL のインストールにはこのような強い権限が必要なので、起動時に特殊な操作が必要になります。
28+ :::
29+
30+ ![ 管理者として実行] ( run-as-administrator.png )
31+
32+ 続いて、` wsl --install ` コマンドを実行します。これにより、WSL が全自動でインストールされます。
33+
34+ ![ コマンドを打つ] ( type-wsl-install.png )
35+
36+ インストールが完了すると、自動的にコンピューターが再起動します。このとき、3 回質問を受けます。
37+
38+ - ` Enter new UNIX username ` : WSL は、普段使っている Windows とは別のコンピューターのように振る舞います。ここで指定する名前は何でも構いませんが、** 英数字のみで構成された文字列** とすることを強く推奨します。
39+ - ` New password ` と ` Retype new password ` では、上で指定したユーザーのパスワードを入力します。** 入力しても画面に変化はありません** が、入力自体は行われているので気にせず入力しましょう。
40+
41+ ![ ユーザーを作成する] ( type-password.png )
42+
43+ 画面に ` $ ` 記号が表示された状態で止まったら完了です。ウィンドウを閉じても問題ありません。
44+
45+ ![ 完成] ( completed.png )
Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import styles from "./styles.module.css" ;
3+
4+ /**
5+ * @param {Object } props
6+ * @param {string } props.src
7+ */
8+ export default function ExternalVideoPlayer ( { src } ) {
9+ return (
10+ < div className = { styles . root } >
11+ < iframe
12+ className = { styles . iframe }
13+ src = { src }
14+ allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
15+ allowFullScreen
16+ />
17+ </ div >
18+ ) ;
19+ }
Original file line number Diff line number Diff line change 1+ .root {
2+ position : relative;
3+ margin : 2rem auto;
4+ max-width : min (100% , 50rem );
5+ }
6+
7+ .root ::before {
8+ content : "" ;
9+ display : block;
10+ padding-top : 56.25% ; /* 16:9 */
11+ }
12+
13+ .iframe {
14+ position : absolute;
15+ top : 0 ;
16+ left : 0 ;
17+ width : 100% ;
18+ height : 100% ;
19+ border : none;
20+ }
You can’t perform that action at this time.
0 commit comments