Skip to content

leanpanda-com/fermo_helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FermoHelpers

Assets

Your webpack.config.js should produce a manifest as build/manifest.json:

const ManifestPlugin = require('webpack-manifest-plugin')

module.exports = {
  ..
  output: {
    path: __dirname + '/build',
    ...
  },
  ...
  plugins: [
    ...
    new ManifestPlugin()
  ]
}

In your Fermo build/0, run the Webpack asset pipeline:

def build do
  ...
  config = FermoHelpers.Assets.build(config)
  ...
end

You can then use these helpers, such as javascript_include_tag, and you will pick up the correctly hashed filenames.

  • javascript_include_tag/n

Date

DateTime

  • current_datetime/1
  • datetime_to_rfc2822/1
  • strftime/2

Timezone Information

Note: If you want to use current_datetime/1, you need to include the following dependency:

{:tzdata, "~> 1.0"}

and add a config option

config :elixir, :time_zone_database, Tzdata.TimeZoneDatabase

Html

I18n

Links

String

Text

About

Utilities for Fermo projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages