This runs provides an .optim job for dragonfly and also adds the .optim job into .thumb
This requires you have the 'image_optim' gem and it's dependencies.
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
## If you are using under a rails project, | |
## I recommend to put this script onto config/initializer instead of applying the patch | |
module Compass::SassExtensions::Functions::GradientSupport | |
class ColorStop < Sass::Script::Literal | |
def initialize(color, stop = nil) | |
self.options = {} | |
if color.is_a?(Sass::Script::String) && color.value == 'transparent' |
This runs provides an .optim job for dragonfly and also adds the .optim job into .thumb
This requires you have the 'image_optim' gem and it's dependencies.
Whenever we change our templates we still have to use our build script and this can get annoying. Thankfully with webpack-dev-server
and BrowserSync we can fix this:
npm i -D browser-sync browser-sync-webpack-plugin webpack-dev-server
BrowserSync will act like a proxy, waiting for webpack to do its thing and then reloading the browser for us.
const webpack = require('webpack'); | |
// Let's us put the CSS in a separate file | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
// Minifies the JavaScript | |
const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin'); | |
// Cleans the build directory before each build | |
const CleanWebpackPlugin = require('clean-webpack-plugin'); |
const { createHttpLink } = require('apollo-link-http'); | |
const fetch = require('node-fetch'); | |
const store = require('store'); | |
const sourceNodes = require('gatsby/dist/utils/source-nodes'); | |
require('dotenv').config(); | |
const craftGqlUrl = process.env.CRAFT_GQL_URL; | |
const craftGqlToken = process.env.CRAFT_GQL_TOKEN; | |
module.exports = { |