admin

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

README

Admin Frontend

This module serves static assets. The static assets are built using Typescript and SASS into the ./build folder, and then go-bindata is used to generate a Go file with all assets embedded into it. The Naga module in this folder is responsible for mapping HTTP requests to the embedded files.

Development

The frontend is built in React, with Yarn for dependency management, Jest for tests, and Gulp for build tooling.

Install all dependencies with yarn. Then, refer to the following cheat sheet for available commands.

npx gulp          # compile css, js, html, and bindata
npx gulp watch    # as above, but re-run when files change
npx gulp css      # compile sass to css
npx gulp js       # compile typescript to javascript
npx gulp html     # copy html and images to build dir
npx jest          # run jest tests
npx jest --watch  # as above, but re-run when files change
npm run fmt       # run prettier to reformat code

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Router *router.Module
	Auth   *users.Module
}

func (*Module) Init

func (m *Module) Init(c *service.Config)

func (*Module) ServeHTTP

func (m *Module) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL