Do this once
sudo dseditgroup -o create brew
Create a brew group
Do this once
sudo dseditgroup -o create brew
Create a brew group// Example of Proxy in JS | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy | |
class Target{ | |
log(msg){ | |
console.log(msg) | |
return msg | |
} | |
} |
// Composing Apollo links | |
// https://www.apollographql.com/docs/link/composition/ | |
// for apollo-retry-link info: | |
// - https://www.apollographql.com/docs/link/links/retry/ | |
// - https://www.youtube.com/watch?v=bv74TcKb1jw | |
// for gatsby-source-grapql config info: | |
// see https://www.gatsbyjs.com/plugins/gatsby-source-graphql/ |
exports.onPostBuild = async ({ reporter }) => { | |
fs.copyFile(`./firebase.json`, `./public/firebase.json`, (err) => { | |
if (err) { | |
reporter.error( | |
"An error occured when copying firebase.json to public dir", | |
err | |
); | |
} | |
}); | |
}; |
// gatsby-node.js | |
exports.onCreateWebpackConfig = ({ stage, actions, getConfig, rules }) => { | |
const config = getConfig(); | |
const miniCssExtractPlugin = config.plugins.find( | |
(plugin) => plugin.constructor.name === 'MiniCssExtractPlugin' | |
); | |
if (miniCssExtractPlugin) { | |
miniCssExtractPlugin.options.ignoreOrder = true; | |
} |
// .eslintrc.js | |
module.exports = { | |
globals: { | |
__PATH_PREFIX__: true, | |
}, | |
extends: `react-app`, | |
rules:{ | |
"react/jsx-pascal-case": [1, {allowAllCaps: true}] | |
} |
const React = require("react") | |
exports.onRenderBody = ({ setHeadComponents }) => { | |
setHeadComponents([ | |
<link | |
href="https://cloud.typography.com/path/to/your/file.css" | |
rel="stylesheet" | |
type="text/css" | |
media="print" |
module.exports = { | |
plugins: [ | |
{ | |
resolve: `gatsby-source-wordpress`, | |
options: { | |
url: process.env.WORDPRESS_GRAPHQL_ENDPOINT, | |
presets: [ | |
{ | |
presetName: `PREVIEW_OPTIMIZATION`, | |
useIf: () => |
/** | |
* Configure your Gatsby site with this file. | |
* | |
* See: https://www.gatsbyjs.com/docs/gatsby-config/ | |
*/ | |
module.exports = { | |
/* Your site config here */ | |
plugins: [ | |
process.env.GATSBY_CLOUD && "gatsby-plugin-gatsby-cloud", |