2020-03-01ãã1ã¶æéã®è¨äºä¸è¦§
Maps JavaScript API ã使ã£ã¦ google map ãä½æãã¦ãã¦ããªãªã¸ãã«ã® Marker (ãã³) ãä½æãã¦ãã¾ããã SVG ç»åã使ããã°åé¡ããªãã£ãã®ã§ããã諸äºæ 㧠png 㧠Marker ãä½æãããã¨ã«ãªã£ãã®ã§ãããretina ãã£ã¹ãã¬ã¤ã ã¨èããªã£ã¦ãã¾â¦
API KEY ãå¿ è¦ãª script ã¿ã°ã HTML ã«æ¸ãå¿ è¦ããã£ã¦ API KEY ãç´æ¥æ¸ãããã¡ã¤ã«ã git ã«ã³ãããããããªãã®ã§ãgitignore ãã .env ã«å¤æ°ã¨ãã¦æãã㦠HTML ã«æ¸¡ãæ¹æ³ã®ã¡ã¢ JavaScript 㧠.env ã使ã loadenv ã使ã㨠.env ãã¡ã¤ã«ããªâ¦
build ãããã£ã¬ã¯ããªãåé¤ãããã¨ã rm -rf ã³ãã³ãã npm script ã§å¼ã¶ # package.json "scripts": { "cleanup": "rm -rf build" } rimraf ã使ã rm ã³ãã³ãããªãç°å¢ã ã¨ä¸è¨ã¯ä½¿ããªãã®ã§ $ npm install --save-dev rimraf # package.json "scâ¦
ç°å¢ã¥ããã®åå¼·ãã¦ã ReactHooksã»ãã¹ã㯠JEST + Enzyme ã§ä½ã£ã¦ããããã¸ã§ã¯ãã TypeScript åããã¡ã¢ 1. TypeScript åã®ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã« ã㦠babel é¢é£ã®ããã±ã¼ã¸ãã¢ã³ã¤ã³ã¹ãã¼ã« TypeScript åããã«ããã£ã¦å¿ è¦ãªããã±ã¼ã¸â¦
TAG ã®ä½æ $ git tag -a <tag_name> # ã³ã¡ã³ãä»ãã§ä½æ $ git tag -a <tag_name> -m 'comment' TAG ã®ç¢ºèª $ git tag TAG ããªã¢ã¼ãã« push ãã $ git push origin <tag_name> # ä¸åº¦ã«push $ git push origin --tags TAG ã®åé¤ $ git tag -d <tag_name> # ãªã¢ã¼ãã®ã¿ã°ãåé¤ $ git push or</tag_name></tag_name></tag_name></tag_name>â¦
ããã±ã¼ã¸åã被ã£ã¦ã¦ä½¿ããªãã£ãã¨ããååãã¤ã±ã¦ãªãã¨ããGitHubã®ãªãã¸ããªåãå¤ããããã¨ãæã ããã¾ãã ãªãã¸ããªåã®å¤æ´èªä½ã¯ GitHub ã®ãµã¤ãä¸ããã«ã³ã¿ã³ã«ã§ããã®ã§ãããå¤æ´ãã㨠local ã®ãã¹ãå¤ãã£ã¦ãã¾ãã®ã§ããã¹ãåâ¦
create-react-app ã使ããã«èªåã§ç¬èªã«ä½æãã¦ããããã¸ã§ã¯ãã«ãã¹ãã¨ã㦠Jest ãå°å ¥ãããã©ããã¹ãã³ãã³ããèµ°ããã㨠SyntaxError: Unexpected identifier ãåºã¦ããã£ã¦ãã¾ã£ãã®ã§ã¡ã¢ã æ§æ |- /tests | |- setup.enzyme.js | |- App.â¦
React ã®ãã¹ãã®å®çª Jest + Enzyme ã®æ§æã§ãReact 16.x ç³»ã 㨠Enzyme ã® Adapter ãèªã¿è¾¼ã¾ããå¿ è¦ãããä»ã¾ã§ã¯ä¸è¨ã®ç¨ãªæã㧠Adapter ãèªã¿è¾¼ã¾ãããã¡ã¤ã«ãä½ããã¹ããã¡ã¤ã«ã§é½åº¦ import ããã¦ãã¾ããã setup.enzyme.js import Enzymâ¦
APIãããããªãã¸ã§ã¯ãã渡ãããããã³ãã§ãã¼ã¿ãç¡ããã°ããã©ã«ãå¤ãä»ãããããªå¦çã TypeScript ã§æ¸ãã¦ãã¦ããã£ãã®ã§ã¡ã¢ã â» ããã³ã㯠React ã§ã API ãã渡ããããã¼ã¿ InitUnitData = { first: { id: 1, name: 'æ¥é¢¨ ããã°', typeâ¦