随笔分类 - Tools
摘要:The highlighted part is important, without this, if you hint the page url: It will show 404 page, because it will be regareded as a server request. Wi
阅读全文
摘要:First of all, install Prettier extension: "Pettier - Code formatter". The open the VSCode setting: Search for "format": and enable "Format On Save" Ad
阅读全文
摘要:Create an ssh key: Copy an SSH key to a remoate server: Then enter your password. To make sure you can SSH into remote server, you can do: Since ssh-c
阅读全文
摘要:Converting all of our modern JavaScript into ES5 compatible syntax is a great way to use modern features while targeting older browsers. What happens
阅读全文
摘要:We can separate our custom application code from the common libraries we leverage, such as React and ReactDOM. In this lesson we'll configure webpack
阅读全文
摘要:Bundle size has a huge impact on JavaScript performance. It's not just about download speed, but all the JavaScript we ship to the browser needs to be
阅读全文
摘要:.bash_profile is a file that bash invokes (or more technically sources) before the start of a new bash session. In .bash_profile, we have the opportun
阅读全文
摘要:We can get a lot of utility through CLI tools invoked via npm scripts. Many of these tools have APIs with many flags and options, meaning we will freq
阅读全文
摘要:The development and production modes in webpack optimize the output in different ways. In development mode, the focus is on faster builds and a better
阅读全文
摘要:To let people easily share the patio11bot, we'll add a "Tweet" button to the page. You can easily add a static share button by going to https://publis
阅读全文
摘要:Creating Markdown files from a template is a straightforward process with Node.js and Mustache. You can define a template, load it into your script, t
阅读全文
摘要:As you refactor and modify applications, it's difficult to manage and keep track of files as they become unused. Keeping this "dead" code around adds
阅读全文
摘要:TypeScript can help you with your plain JavaScript files if you add a simple //@ts-check comment. Then you can enhance the experience by add proper JS
阅读全文
摘要:TO get started with TypeScirpt quickly in your local computer is using parcel-bunlder: Create a index.html: Create a index.ts, put whatever you want.
阅读全文
摘要:It's common to setup Webpack aliases to make imports much more convenient, but then you lose the ability to navigate and autocomplete paths in VS Code
阅读全文
摘要:Command-line tools can help you with all sorts of tasks. This lesson covers the very basics of setting up a CLI tool in Node.js by creating your proje
阅读全文
摘要:Your page is showing high CPU usage and spinning up your laptop fan, but nothing is visibly happening. What is it doing, and why is it so slow? This l
阅读全文
摘要:Now by Zeit has recently been updated and now supports multi-language monorepos. In this lesson we'll build and deploy a simple app with an API powere
阅读全文
摘要:For a file which contians lots of lines of code, we can use 'comments region' to collapse the code.
阅读全文
摘要:Given a epxress application and an svg template, we want to draw some text, date onto it and convert it to pdf as output. Code: Github
阅读全文