Markdownã ãã§ã¹ã©ã¤ããä½ãCLIã®å¤§è¦æ¨¡ã¢ãããã¼ãããã
ååã®è¨äº
- å¤æ´ç¹
- mdxã®è¿½å
- Live Modeã®è¿½å
- Sidebarã®UIå¤æ´
- ç»å£è ã®è¡åããã©ããã³ã°ãã
- é³å£°ãé²é³ãã¦ã¿ã¤ã ãã©ãã«ãã
- ããã©ã¼ãã³ã¹
- ãããã«
ãã®ä¸é±éã¯ãèªåã®OSSã®ã¿ããã£ã¦ãã¾ããã
ããã¦ã以ä¸ã®æ©è½ãå®è£
ããã®ã§ã¾ã¨ãã¦ç´¹ä»ãããã¨æãã¾ãã
ã¹ã¿ã¼ã3000è¶ãã¾ããð ãã£ãï¼
å¤æ´ç¹
æ©è½è¿½å
- zero-config
- initãã¦è¨å®ãã¡ã¤ã«ãçæããå¿ è¦ããªããªã£ã
- SEOãã¹ã©ã¤ãã®è¨å®ããã¨ãã¯çæãã¦ãã ãã
- mdxã®å©ç¨ãå¯è½ã«
- markdownã®ä¸ã§react componentsãæ±ã
- Live Modeã®è¿½å
- ç»å£ä¸ã«ãã¤ã¼ãããªã¢ã«ã¿ã¤ã ã§æµãã
- Sidebarã®UIãå¤æ´
- å ¨ä½çã«è²ãè½ã¨ãã
- ã¹ã©ã¤ãã®åããã¿ã¤ã ã©ã¤ã³ã¨ãã¦å¯è¦å
- ãã¤ãã¼ã¸éã£ããããã
- Recording Modeã®è¿½å
- é³å£°ãé²é³ãã¦ãç»å£æã®ç¶æ ãåç¾ã§ãã
å é¨
- monorepoå
- azure-pipelinesã¸ã®ç§»è¡
- md-loader, html-loaderãæããMDXASTãèµ°æ»ããç¬èªãã¼ãã¼ã追å
ãã®ä»
- ç»åãwebpã«ãªã£ããããIEã¨Safariã§ã¯ç»åã表示ãããªããªã£ã
- ãã©ã¦ã¶å¯¾å¿ã¯ããæ°ãåºããã(
<picture>
ã«å¤æããã®ã大å¤)
- ãã©ã¦ã¶å¯¾å¿ã¯ããæ°ãåºããã(
- æ¬çªãã«ãã®æé©åãè¡ããã
- repositoryã®urlãèªåçã«ç¹å®ããããã«å¤æ´
name
->title
ã¸ãã¼åãå¤æ´(äºæã®ããname
ã使ç¨å¯è½)- :smile: -> ð ã®å¤æãå¯è½ã«ãªã£ã
mdxã®è¿½å
Markdownã®ä¸ã§ãReactã³ã³ãã¼ãã³ããæ¸ããããã«ãªãã¾ããã
ããã«ãããMarkdownã§ã¯ã§ããªãã£ãã¢ã¸ã¥ã¼ã«ã®åå©ç¨æ§ãé«ã¾ãå
±éåãè¡ãããããªãã¾ãã
以ä¸ã®ä¾ã¯ãstyled-componentsã使ã£ãä¾ã§ãã
<!-- index.mdx --> import { Sample } from '../scripts/sample'; <Sample />
// sample.js import React from 'react'; import styled, { keyframes } from 'styled-components'; const rotate = keyframes` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `; const Rotate = styled.h2` display: inline-block; animation: ${rotate} 3s linear infinite; `; export const Sample = () => <Rotate>Hello from jsx!!</Rotate>;
ã¹ã©ã¤ã: hiroppy.github.io
Live Modeã®è¿½å
ç»å£ä¸ã«ãã¤ã¼ãçãæµãããå ´åã¯ããã®ã¢ã¼ãã§èµ·åããã¨ããã¨æãã¾ãã
Twitterããã®ãã¤ã¼ã㨠fusumaæ¬ä½ã®apiã¨ã³ããã¤ã³ããããã®ã§2ã¤ã®æ¹æ³ã§ã¹ã©ã¤ãã«æ稿ãå¯è½ã§ãã
fusumaæ¬ä½ããµã¼ãã¼ã¨ãã¦èµ·åãã¾ãã
ãããæ¬ä½ã®apiã使ãããå ´åã¯ã©ããã®ãµã¼ãã¼ã«ãããã¤ãããprivate ipã«æãã¦ãã ããã
Twitterã®åå¾ã¯ãã¼ã«ã«ãã¹ãããã§å¤§ä¸å¤«ã§ãããèµ·åæã«apiãå©ãããã«éçºè ãã¼ã¯ã³ãè¦æ±ãã¾ãã
# create .env $ npx fusuma init -s live # add keys to .env $ npx fusuma live -w '@nodejs' $ open http://localhost:3000
Sidebarã®UIå¤æ´
å ¨ä½çã«éãä¸å¿ã«è¦ãããæãã«ãã¾ããã
ç»å£è ã®è¡åããã©ããã³ã°ãã
lacolacoã®æ¡ã§ãããããã¨ããããã¾ãã
ã©ã®ãã¼ã¸ã®æç¹ã§ä½åçµéãã¦ãããã®è¨é²ãã»ãããã ãããçµãã£ãã¨ãã«ä½åã ã£ããããããããªãã¦ããã¼ã¸ãããã¨ã¿ã¤ã ã¹ã¿ã³ãã®ãã¢ãå¾ã§ç¢ºèªã§ããã¨ç·´ç¿ã«è¯ããã
— lacolaco / Suguru Inatomi (@laco2net) 2019å¹´6æ21æ¥
ãã¤ã¹ã©ã¤ããåãæ¿ãããã®è¨é²ãåããããã«ãªãã¾ããã
ãã®æ©è½ã¯ã¿ã¤ãã¼ãéå§ãã¦ãããªã»ããããã¾ã§è¨é²ãã¾ãã
é³å£°ãé²é³ãã¦ã¿ã¤ã ãã©ãã«ãã
ä¸è¨ã«å ãã¦ãé³å£°ãé²é³ãããã¨ãå¯è½ã¨ãªãã¾ããã
WebRTCã«å¯¾å¿ãã¦ããchrome, firefoxã®ã©ã¡ãã使ã£ã¦ãã ããã
ããã«ãããä¸è¨ã®ã¿ã¤ã ã©ã¤ã³ã¨é³å£°ãç´ä»ãç»å£æã¨åãç¶æ
ãåç¾ã§ãã¾ãã
ã¾ããã·ã¼ã¯ãã¼ãåããã¨ãã®æã®ã¹ã©ã¤ãã«æ»ããããç»å£ã®ç·´ç¿ã«ãå½¹ã«ç«ã¤ã¨æãã¾ãã
Recording Mode pic.twitter.com/KCHJpureFE
— hiroppy ð®ðª (@about_hiroppy) 2019å¹´6æ22æ¥
æ©è½ã試ãããå ´åã¯ããµã³ãã«ã§ç¢ºèªã§ãã¾ãã
å·¦ä¸ã®ä¸
ãã¯ãªãã¯ãã¦ããã®å¾ã«ä¸ã«ãããã£ã¹ãã¬ã¤ã®ãã¼ã¯ãã¯ãªãã¯ããã¨ãã¬ã¼ã³ã¿ã¼ã¢ã¼ãã«ãªãã¾ãã
ãã®å¾ã«ä¸ã«ãããã¤ã¯ã®ã¢ã¤ã³ã³ããªã³ã«ãã¦ã¹ã¿ã¼ãããã°é²é³ãéå§ããã¾ãã
ããã©ã¼ãã³ã¹
æ¬çªãã«ãã§ã®ããã©ã¼ãã³ã¹ãåä¸ããã¾ããã
Fusumaã§ã¯PWAã®å¯¾å¿ã¯è¡ãã¾ããã(SWãããã¯å
¥ãã¦ããããã©ãmanifestã¯äºå®ãªã)
ãã以ä¸ã¯github pagesã¨ã©ã¤ãã©ãªã«ä¾åããåé¡ã§ä¿®æ£ãã§ããªããããããæé«ã®å¤ã¨ãªãã¾ãã
ãã¨ããããã¨ã¯ãpurgecss-webpack-pluginã§ä½¿ã£ã¦ãªãcssæ¶ããããããªï¼
https://github.com/hiroppy/fusuma#performance
ãããã«
ããªãè¯ããªã£ã¦ãã¦ããã®ã§ãã²ä½¿ã£ã¦ã¿ã¦ãã ããã
ãã°ã»æ©è½è¿½å çã®ãã£ã¼ãããã¯ãPRããå¾
ã¡ãã¦ããã¾ãã
ã¤ãã£ãã¼