Skip to content

Generic Bundler to concatenate any type of files using a custom left and right delimiter, i.e. css or js files

License

Notifications You must be signed in to change notification settings

go-playground/bundler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bundler

Build Status Go Report Card GoDoc

bundler is a generic file combiner of any type of files using a custom left and right delimiter, i.e. css or js files using a lexer. bundler can be used via command line or as a library.

Why


I was writing an asset pipeline and needed a way to combine the files using some sort of include format and so why not a flexible library to handle that and can be used elsewhere.

Best Part


uses a Lexer to process the files, with necessary components exposed to use as you wish.

Installation


Use go get

go get github.com/go-playground/bundler/cmd/bundler

or to update

go get -u github.com/go-playground/bundler/cmd/bundler

Then import lars package into your code.

import "github.com/go-playground/bundler"

Command Line Use


bundler -h
Usage of ./bundler:
  -i string
    	File or DIR to bundle files for; DIR will bundle all files within the DIR recursivly.
  -ignore string
    	Regexp for files/dirs we should ignore i.e. \.gitignore; only used when -i option is a DIR
  -ld string
    	the Left Delimiter for file includes, if not specified default to //include(. (default "//include(")
  -o string
    	Output filename, or if using a DIR in -i option the suffix, otherwise will be be the filename with appended hash of file contents.
  -rd string
    	the Right Delimiter for file includes, if not specified default to ). (default ")")

About

Generic Bundler to concatenate any type of files using a custom left and right delimiter, i.e. css or js files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages