(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# Version key/value should be on his own line | |
PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g') | |
echo $PACKAGE_VERSION |
namelookup: %{time_namelookup}\n | |
connect: %{time_connect}\n | |
appconnect: %{time_appconnect}\n | |
pretransfer: %{time_pretransfer}\n | |
redirect: %{time_redirect}\n | |
starttransfer: %{time_starttransfer}\n | |
----------\n | |
total: %{time_total}\n |
Photo by Ricardo Gomez Angel on Unsplash
This gist is a collection of common patterns I've personally used here and there with Custom Elements.
These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.
const bypass = [ | |
// function names to avoid logging | |
]; | |
const collapsed = [ | |
// function names to groupCollapsed | |
]; | |
module.exports = function(babel) { | |
const { types: t } = babel; | |
const wrapFunctionBody = babel.template(`{ |
Basically, when using Prettier, all ESLint styling rules should be disabled.
This can be done with eslint-config-prettier.
See .eslintrc.js
example below.
In prettier.config.js
you can use anything you want (see example below).
Now the tricky part is how to run them...
Usually ESLint should run first, then Prettier.
Ventura docs for M2 Macs in this comment: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd?permalink_comment_id=4555340#gistcomment-4555340
Old Monterey docs in this old revision: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd/32c410e3a1de73539c76fa13ea5486569c4e0c5d
Solution for Sonoma: https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac
export default function createCrudHooks({ | |
baseKey, | |
indexFn, | |
singleFn, | |
createFn, | |
updateFn, | |
deleteFn, | |
}) { | |
const useIndex = (config) => useQuery([baseKey], indexFn, config) | |
const useSingle = (id, config) => |
const path = require("path"); | |
const { camelCase } = require("camel-case"); | |
const webpack = require("webpack"); | |
const { merge } = require("webpack-merge"); | |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
const CopyPlugin = require("copy-webpack-plugin"); | |
const pkg = require("./package.json"); |