-
Notifications
You must be signed in to change notification settings - Fork 3
演習問題にSandpackによる実行環境を追加 #889
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
base: main
Are you sure you want to change the base?
Conversation
chvmvd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
途中までですが
後は、Pull requestのタイトルと説明欄を書いていただけると、ありがたいです 🙇
Pull requestの大まかな内容と差分だけからではわからない意図などを書いていただけるとレビューがしやすくなり助かります 🥰
| <Sandpack | ||
| template="static" | ||
| files={{ | ||
| "/index.html": answerWhileHtml, | ||
| "/script.js": answerWhileJs, | ||
| }} | ||
| options={{ | ||
| activeFile: "/script.js", | ||
| }} | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
うーむ
これはどうしよう。
SyntaxError: Identifier 'i' has already been declared
となっている。
chvmvd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
途中ですが、Sandpackを用いて実行環境を追加すること以外の差分が多く含まれているような気がします。たとえば、既存のViewSourceコンポーネントの削除や場所の移動などが挙げられます。一旦、Sandpackを用いて実行環境を追加することのみに絞っても良いかと思います。
| "/style.css": yellowHelloCssCss, | ||
| }} | ||
| options={{ | ||
| activeFile: "/index.html", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これはCSSに関する演習問題なので、CSSファイルをアクティブにする方が良いように思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "/style.css": fooCss, | ||
| }} | ||
| options={{ | ||
| activeFile: "/index.html", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同様
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <ViewSource url={import.meta.url} path="_samples/answer-while" /> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なぜこちらは削除しているのでしょうか。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
復活しました
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
削除されています。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
復活しました
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
削除されています。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
復活しました
|
@chvmvd |

変更内容
@codesandbox/sandpack-reactを追加raw-loaderを使ってサンプルファイルを読み込むように変更削除したファイル
Sandpack導入に伴い、ViewSource用に存在していた一部のサンプルファイルを削除