{"componentChunkName":"component---src-templates-post-tsx","path":"/set-up-development-on-apple-silicon-macbook-pro","result":{"data":{"markdownRemark":{"html":"<div class=\"custom-block info\"><div class=\"custom-block-body\"><p>The information in this post may be obsolete when you are reading it.</p></div></div>\n<p>After days of waiting, I finally got my customized MacBook Pro with Apple M1 chip.</p>\n<h2>Package Manager</h2>\n<p>You need Homebrew or MacPorts to install system level packages. I think <a href=\"https://soffes.blog/homebrew-on-apple-silicon\" target=\"_blank\" rel=\"noopener noreferrer\">Sam's post</a> summarized a good way to maintain both ARM-based Homebrew (experimental) and Intel-based Homebrew (running with Rosetta 2). Most importantly, don't forget to add them to your <code class=\"language-text\">PATH</code> and restart your shell sessions. Using a wrong version of Homebrew may cause errors.</p>\n<h2>Editor (or IDE)</h2>\n<p>I prefer Visual Studio Code. For now, only the insider preview of Visual Studio Code has a ARM version and its name is exploratory version.</p>\n<h2>Node.js Projects</h2>\n<p>The first project I want to develop on this laptop is my blog. My blog uses Gatsby and relies on sharp — a image conversion and compression package. Because there is no Apple Silicon on their CI platform, they don't provide any prebuilt binaries. I just build myself according to comments <a href=\"https://github.com/lovell/sharp/issues/2460\" target=\"_blank\" rel=\"noopener noreferrer\">this issue</a>.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">brew <span class=\"token function\">install</span> pkg-config glib zlib\nbrew <span class=\"token function\">install</span> jpeg libtiff libheif libspng giflib libexif libjpeg-turbo libpng webp\n<span class=\"token assign-left variable\">PKG_CONFIG_PATH</span><span class=\"token operator\">=</span>/opt/homebrew/Cellar/zlib/1.2.11/lib/pkgconfig ./configure\n<span class=\"token function\">make</span>\n<span class=\"token function\">sudo</span> <span class=\"token function\">make</span> <span class=\"token function\">install</span></code></pre></div>\n<p>After completed this, I can finally develop my blog.</p>\n<h1>Sign off commits with GPG keys</h1>\n<p>I just follow every steps in this <a href=\"https://gist.github.com/troyfontaine/18c9146295168ee9ca2b30c00bd1b41e\" target=\"_blank\" rel=\"noopener noreferrer\">tutorial</a>. Important: you should install pinentry-mac with Intel-based Homebrew.</p>","frontmatter":{"title":"Set Up Development on Apple Silicon MacBook Pro","date":"December 15, 2020","tags":["Apple","know-how"],"language":"en"}},"site":{"siteMetadata":{"title":"Luyu Cheng"}}},"pageContext":{"id":"1675882f-7348-531f-a85a-7f3dc9fcf490"}},"staticQueryHashes":["3649515864","63159454","684267432"]}