Commit Graph

15 Commits

Author SHA1 Message Date
Brad Fitzpatrick dcc41792fb Add a genfileembed package comment
Change-Id: I65bfd3c1956921bb8d1d805cd6df84bc376ec802
2013-06-11 00:55:31 +02:00
Brad Fitzpatrick 3658434d42 fileembed: remove Camlistore-specific hack we're no longer going to do.
death to all.js & Closure compiler output. Yay SPDY.

Change-Id: I44ca96d1b6d1d5d64822870558025e15dee4870c
2013-06-10 01:47:45 +02:00
Brad Fitzpatrick c6cb32bcac fileembed: put all metadata first, and also support rolling checksum splitting of large embeds
Change-Id: I9da21c9a21cb2f9b04484d4374a621cb4b97679d
2013-06-10 01:11:03 +02:00
Brad Fitzpatrick 99267e1f71 Merge "Add -fileembed-package and -all flags" 2013-06-05 16:39:04 +00:00
mpl 3040e3852e Merge "WIP: switch from ui to newui" 2013-06-05 12:29:29 +00:00
Josh Bleecher Snyder f72c466501 Add -fileembed-package and -all flags
The -fileembed-package flag makes genfileembed
play nicely with goven. If you use goven to
vendorize fileembed, the fileembed package path
changes (to be relative to the current project).
With -fileembed-package, you can make the
generated code import the correct (vendorized)
fileembed package.

The -all flag forces processing of all files,
not just modified files. This is useful when
changing -import-prefix, when
working on a filesystem with unreliable mtimes,
or when being neurotic/defensive in build scripts.

Addresses https://code.google.com/p/camlistore/issues/detail?id=137

Change-Id: I54215429dabd02bc1fa72c6718e1cabccb1cffaf
2013-06-04 19:07:58 -07:00
Josh Bleecher Snyder 92645983c6 Handle requests for / in fileembed
The motivation is to make fileembed play
nicely with http.FileServer, particularly
when index.html is involved.

Why add Listable to Files?

* Don't change behavior for existing integrations
* Don't make it too easy for developers to
  accidentally leak potentially private
  information

Change-Id: I3f4fd3457b606ee98e5f4b117ff9b87e1230c589
2013-06-04 18:51:47 -07:00
mpl 11a3f78691 WIP: switch from ui to newui
This CL proposes 4 changes:

1) When making the embeds, any .html files in newui is rewwritten
on the fly so that the resulting embed uses all.js instead of
individual .js files. all.js is the only javascript file embedded
for newui.

2) Various bugs and paths in the newui/*.js files were fixed so that
everything works when using all.js

3) pkg/server/ui.go was modified so that all features from ui should
now have an equivalent in newui, that is served through ui/new/.
In a next step, we can move back everything from newui/ into ui/ and
completely get rid of the old ui.

4) The published gallery now uses closure too.
In another next step, we should probably work on serving its static
part directly from an .html file or (include it in the zembed somehow?)
instead of generating it at every request. Or at least cache it?

This commit includes the zembeds in newui, except for zembed_all.js.go
since it is large and it would take a lot of space in the git history
everytime we change it.
The plan is to roll-sum it into chunks to address that problem.

Change-Id: I381d8ddf3a2bbe37e3c4b1c4bf423f16beffaaf4
2013-06-04 16:34:51 +02:00
mpl 8d3c5acca7 website,genfileembed: exclude zembeds and fileembed.go from godoc
Change-Id: I6af25a566a519274b15b72c3e41dccd016de5442
2013-03-16 01:16:40 +01:00
mpl f7ff5bb17b file embedding: enable compression (mainly for
large .js files).

We will need this when we start getting large js
files generated when using the closure library.

Change-Id: Iaecacd54c3d08637918b1afd420fb90f1a84aabb
2012-11-30 19:03:37 +01:00
Brad Fitzpatrick 824dbf768f genfileembed: work around a Go 1.0 vs Go 1.1 bug in fmt %q, doing it ourselves.
folder.png and node.png had problems generating on Go 1.1's %q and compiling with Go 1.0.3
2012-11-05 18:43:20 +01:00
Brad Fitzpatrick 7751fac185 fix dev-server for file embedding
Change-Id: I23254930eaedf11a87389d85f54f86bafac20866
2012-02-29 08:01:59 -08:00
Brad Fitzpatrick a98c59f082 include file modtimes in filembed
Change-Id: I9255071c163664bd9b00786df65e630668e227d0
2012-02-28 22:49:52 -08:00
Brad Fitzpatrick 552b768eeb add genfileembed tool, to embed html/css/js/etc into zembed_*.go files 2012-02-28 14:50:17 +11:00
Brad Fitzpatrick 64bbffc3b5 move fileembed from misc 2012-02-28 12:45:46 +11:00