Skip to content

Commit

Permalink
Generating dist folder at crosscompile time
Browse files Browse the repository at this point in the history
  • Loading branch information
oxtoacart committed Feb 20, 2015
1 parent 0cbfe03 commit aff48f2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ envvars.bash
Lantern.app
lantern.dmg
src/github.com/getlantern/flashlight/ui/resources.go
src/github.com/getlantern/lantern-ui/dist
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ lantern).

Flashlight requires [Go 1.4.x](http://golang.org/dl/).

You will also need [npm](https://www.npmjs.com/) and gulp.

`npm install -g gulp`

It is convenient to build flashlight for multiple platforms using
[gox](https://github.com/mitchellh/gox).

Expand Down
10 changes: 9 additions & 1 deletion genassets.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

echo "Generating UI resources for embedding"

echo "First, generating dist folder"
cd src/github.com/getlantern/lantern-ui
npm install
rm -Rf dist
gulp build
cd -

echo "Now generating resources.go"
go install github.com/getlantern/tarfs/tarfs
dest="src/github.com/getlantern/flashlight/ui/resources.go"
echo "// +build prod" > $dest
echo " " >> $dest
tarfs -pkg ui src/github.com/getlantern/lantern-ui/app >> $dest
tarfs -pkg ui src/github.com/getlantern/lantern-ui/dist >> $dest

0 comments on commit aff48f2

Please sign in to comment.