随笔分类 - Tools
摘要:You can open files into Vim directly from the terminal. This works for both single files and multiple files. In addition to reading these files into b
阅读全文
摘要:You'll often find yourself going through a tutorial where you need to copy some code from a webpage and create a file and paste the contents onto your
阅读全文
摘要:For example we have following code: $(el).hide() // el.style.display = 'none' $(el).forEach(() => {}) foo.hide() We want $(el).hide() replace with: el
阅读全文
摘要:Are you using z? Greatly speed up your file system traversal and say goodbye to finder. Install: brew install z 2. Go the github: https://github.com/r
阅读全文
摘要:For example we want to just conver a VariableDeclaration to Foo.bar.otherBaz("one", 2); We can use Babel template to do that: export default function(
阅读全文
摘要:Continue with previous post: https://www.cnblogs.com/Answer1215/p/12342540.html Now we need to think about functionExpression and ArrowFunction: funct
阅读全文
摘要:Continue with the previous post: https://www.cnblogs.com/Answer1215/p/12337243.html What we want to do in this post, is adding parent function name in
阅读全文
摘要:For example we have current code: function add(a, b) { console.log(a, b) return a + b } function subtract(a, b) { console.log(a, b) return a - b } add
阅读全文
摘要:For example, we have the source code: getVersison('3.4.5') function getVersion(versionString) { const versionRegex = /(\d)\.(\d)\.(\d+)/ const [, majo
阅读全文
摘要:Code: const disallowedMethods = ['log', 'info', 'warn', 'error', 'dir'] module.exports = { meta: { docs: { description: 'Disallow use of console', cat
阅读全文
摘要:For eslint prevent console plugin, we also want to prevent user do so: var csl = console csl.log() Code: const disallowedMethods = ['log', 'info', 'wa
阅读全文
摘要:Yarn 2 is workspace aware. When you need to upgrade a package in one workspace, yarn will ask you if you want to resolve the version of the package to
阅读全文
摘要:yarn dlx can be used to run packages without installing them. This is useful for packages like create-react-app and gatsby that scaffold out apps for
阅读全文
摘要:This lesson goes over how to install yarn 2 through npm. To install yarn 2 globally, we use npm install -g yarn@berry Init a project: yarn init -y To
阅读全文
摘要:1 . Create a directory for global packages mkdir "${HOME}/.npm-packages" 2. Tell npm where to store globally installed packages npm config set prefix
阅读全文
摘要:VSCode Themes are a quick way to update the color scheme and syntax highlighting of your code, but you might find your favorite theme isn't quite perf
阅读全文
摘要:Before we publish our package, we want to make sure everything is set up correctly. We’ll cover versioning, preparing our package, adding a proper REA
阅读全文
摘要:{ // UI IMPROVEMENTS —————————————————— // Part 1. "editor.minimap.enabled": false, "workbench.editor.enablePreview": false, "explorer.openEditors.visible": 1, "workbench.star...
阅读全文
只有注册用户登录后才能阅读该文。
摘要:For example you have the following code; If you want to debug is in Node, you can do: Then in cmd, run: Then just type 'continue' or just 'c'. It will
阅读全文