Skip to content
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

コーディングルールを gc 配下の example に合わせる #54

Open
3 tasks
dynamis opened this issue Aug 15, 2019 · 5 comments
Open
3 tasks
Labels
Milestone

Comments

@dynamis
Copy link
Contributor

dynamis commented Aug 15, 2019

example とのコーディングルール統一として gc 側の修正を行った
chirimen-oh/chirimen#21 (comment)

が合わせるだけでなく先行して実行タイミング制御 (onload から deferに) や mainFunction などについての扱いが変わっている。

tutorial 側もそれに合わせたい。

  • 実行タイミング制御で onload 使わないで defer にする
    • script defer に関する説明を追加
  • 関数名の変更 mainFunction から main に
@kou029w
Copy link
Contributor

kou029w commented Sep 26, 2020

Markdownコードブロックにコピペするのは簡単ですがメンテナンスし続けるのが困難なので、ページ読み込みは遅くなるのですが emgithub.com や CodeSandbox の埋め込みをつかってリンクさせるのが良さそうに思いました。

@dynamis
Copy link
Contributor Author

dynamis commented Sep 26, 2020

example のコードを挿入するだけなら github のファイルを読み込んで埋め込む系のもので良いのですが、チュートリアルはその途中とか一部だけを抜き出したコードサンプルが大量にある (抜き出しだけなら出来るサービスはあると思うが行数指定だと元コードが変わると困る) ので example コードを参照させる形では解決不能ではないかと。

@kou029w
Copy link
Contributor

kou029w commented Sep 26, 2020

行数指定だと元コードが変わると困る

それは適宜tagやbranchを指定しておくかcommit idを指定しておけば解決しませんか?
例: https://emgithub.com/chirimen-oh/chirimen/blob/8a3c6f438be396c0388dcf04ab2281c54645ae11/gc/gpio/LEDblink/main.js#L11-L11

@dynamis
Copy link
Contributor Author

dynamis commented Sep 26, 2020

あ、はい。そうでした。タグを付ける限りそれの更新の手は真結局残りますけどコピペするよりはマシ&前後の文脈のあるコードにリンクできたりするメリットがありそう。

example コードに存在しないコードというのもあるけど少数派だと思えばそこだけ諦めて Markdown 中に書くか、example 内に一緒に入れておいて同じフォーマットで参照しやすくするかというのは良さそうですね。

@kou029w kou029w assigned kou029w and unassigned saxAllan Nov 17, 2020
@kou029w
Copy link
Contributor

kou029w commented Nov 20, 2020

section2 に関しては https://emgithub.com/ を埋め込んでみています。問題なさそうであればコードの整形・コーディング規約の変更とともに引き続き切り替えていくつもりです

@kou029w kou029w removed their assignment Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants