Skip to content

Instantly share code, notes, and snippets.

@dberget
dberget / release.md
Last active May 22, 2018 15:22
Elixir Release Files

Makefile:

build-release:
	echo "Make sure you bumped the version in mix.exs"
	$(eval VERSION := $(shell sed -n '/version:/s/ *version: "\(.*\)",/\1/p' mix.exs))
	sleep 3
	mix deps.get
	cd assets && ./node_modules/brunch/bin/brunch b -p
	MIX_ENV=prod mix phx.digest
	docker run -it -v `pwd`:/src --rm --workdir /src -e MIX_ENV=prod erlang-builder mix do deps.clean comeonin, deps.get, compile, release --env=prod
@dberget
dberget / Elixir_Formatter.md
Last active February 20, 2018 03:42
Some notes on using Elixir's code formatter

Example of .formatter.exs file

[
  inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"],
  locals_without_parens: [
    # Kernel
    inspect: 1,
    inspect: 2,

    # Phoenix

General Topics

  • Elixir 1.6 Overview
  • "Getting started with Elixir"
  • What is functional programming?
  • OTP
  • Testing/TDD in Elixir
  • Pattern Matching
  • Recursion
  • Deployments
@dberget
dberget / brunch-config.js
Last active December 12, 2017 21:02
Phoenix-Framework Brunch config for swprecache, semantic-ui-css, and React
let glob = require("glob")
exports.config = {
files: {
javascripts: {
joinTo: {
'js/app.js': /^(js)/,
'js/vendor.js': /^node_modules/,
},
},