-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate public as bindata optionally (#293)
* Dropped unused codekit config * Integrated dynamic and static bindata for public * Ignore public bindata * Add a general generate make task * Integrated flexible public assets into web command * Updated vendoring, added all missiong govendor deps * Made the linter happy with the bindata and dynamic code * Moved public bindata definition to modules directory * Ignoring the new bindata path now * Updated to the new public modules import path * Updated public bindata command and drop the new prefix
- Loading branch information
Showing
691 changed files
with
305,318 additions
and
1,272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ _testmain.go | |
|
||
coverage.out | ||
|
||
/modules/public/bindata.go | ||
|
||
*.db | ||
*.log | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// +build !bindata | ||
|
||
// Copyright 2016 The Gitea Authors. All rights reserved. | ||
// Use of this source code is governed by a MIT-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package public | ||
|
||
import ( | ||
"gopkg.in/macaron.v1" | ||
) | ||
|
||
// Static implements the macaron static handler for serving assets. | ||
func Static(opts *Options) macaron.Handler { | ||
return macaron.Static( | ||
opts.Directory, | ||
macaron.StaticOptions{ | ||
SkipLogging: opts.SkipLogging, | ||
}, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2016 The Gitea Authors. All rights reserved. | ||
// Use of this source code is governed by a MIT-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package public | ||
|
||
//go:generate go-bindata -tags "bindata" -ignore "\\.go|\\.less" -pkg "public" -o "bindata.go" ../../public/... | ||
//go:generate go fmt bindata.go | ||
|
||
// Options represents the available options to configure the macaron handler. | ||
type Options struct { | ||
Directory string | ||
SkipLogging bool | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// +build bindata | ||
|
||
// Copyright 2016 The Gitea Authors. All rights reserved. | ||
// Use of this source code is governed by a MIT-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package public | ||
|
||
import ( | ||
"github.com/go-macaron/bindata" | ||
"gopkg.in/macaron.v1" | ||
) | ||
|
||
// Static implements the macaron static handler for serving assets. | ||
func Static(opts *Options) macaron.Handler { | ||
return macaron.Static( | ||
opts.Directory, | ||
macaron.StaticOptions{ | ||
SkipLogging: opts.SkipLogging, | ||
FileSystem: bindata.Static(bindata.Options{ | ||
Asset: Asset, | ||
AssetDir: AssetDir, | ||
AssetInfo: AssetInfo, | ||
AssetNames: AssetNames, | ||
Prefix: "../../public", | ||
}), | ||
}, | ||
) | ||
} |
Oops, something went wrong.