Skip to content

gawmanarnar/go-template-asset-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-template-asset-pipeline

An example project using Go standard library templates with a modern Webpack asset pipeline.

Table of Contents

Features

  • Webpack Asset Pipeline
    • Bundled assets
    • Hashed filenames for easy caching.
  • Go standard library templates
    • Simple, familiar template language
    • Template function to retrieve hashed filenames from the webpack manifest
  • Frontend
    • Bootstrap 4
    • JQuery
  • Chi router
    • Idiomatic router (can be easily removed if you prefer)
  • Asset caching middleware
  • Builds into single binary with Packr (assets included)

Prerequisites

  • Go 1.8+
    • github.com/go-chi/chi
    • github.com/gobuffalo/packr
  • Node 8.11.1+
  • Yarn (or npm if you prefer)

Getting Started

All yarn commands can be replaced with npm if you prefer

Install dependencies

go get -d ./...
yarn install --dev

Build

yarn build (or yarn dev)
packr build

Run

./go-template-asset-pipeline.exe

Running on localhost:3000

About

Go templates + webpack asset pipeline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published