This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new SWPrecacheWebpackPlugin({ | |
// By default, a cache-busting query parameter is appended to requests | |
// used to populate the caches, to ensure the responses are fresh. | |
// If a URL is already hashed by Webpack, then there is no concern | |
// about it being stale, and the cache-busting can be skipped. | |
dontCacheBustUrlsMatching: /\.\w{8}\./, | |
filename: 'service-worker.js', | |
logger(message) { | |
if (message.indexOf('Total precache size is') === 0) { | |
// This message occurs for every build and is a bit too noisy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--mobile-max-width: 768px; | |
} | |
.o-flex { | |
display: flex; | |
&--wrap { | |
flex-wrap: wrap; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import add from './add' | |
console.log(add(1, 2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add (a, b) { | |
return a + b | |
} | |
const sum = (...args) => args.reduce(add) | |
export default sum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add (a, b) { | |
return a + b | |
} | |
export default add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add (a, b) { | |
return a + b | |
} | |
module.exports = add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
entry: './src/index.js', | |
output: { | |
filename: 'build/bundle.js' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install wget | |
brew install wget | |
# Install Chrome | |
wget https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg | |
open googlechrome.dmg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var exit = require('exit') | |
var join = require('path').join | |
var fullPackagePath = join(process.cwd(), 'package.json') | |
var pkg = require(fullPackagePath) | |
const varsToInterpolate = process.argv.slice(2) | |
const vars = getInterpolations(varsToInterpolate) | |
function getInterpolations() { |