go.rice icon indicating copy to clipboard operation
go.rice copied to clipboard

exclude option for rice

Open gertcuykens opened this issue 10 years ago • 6 comments

Can you add a exclude option please so I can specify which files or directories should not be in the *.rice-box.go

gertcuykens avatar Nov 22 '14 19:11 gertcuykens

Can you elaborate a bit on this request? A box is supposed to be a set of resources that are required by the program, I think the box folder should only contain files that are required by the program.

GeertJohan avatar Nov 22 '14 19:11 GeertJohan

In polymer you use the vulcanize tool to import all html, js, css files into a build.html to reduce request to the server. So for example in this static directorie https://github.com/HouzuoGuo/tiedot/tree/webjwt/webcp/static I only need bower_components, js, css and the html directorie during development when not vulcanized into a build.html. If I can exclude them it would be much easier to build a final executable that only includes the build.html and img directory if needed.

gertcuykens avatar Nov 22 '14 19:11 gertcuykens

After the exclude feature, a second request would be for rice to be able to rename files in its *.rice-box.go For example rename build.html to index.html.

My final build script would then look like this

vulcanize -o static/build.html static/index.html
rice embed-go webcp.go -exclude=static/html -exclude=static/js -exclude=static/css -exclude=static/index.html -exclude=static/bower_components
rice mv-go static.rice-box.go build.html index.html
go build

gertcuykens avatar Nov 22 '14 20:11 gertcuykens

I would love to have that options too. Or include those files manually. To prevent minified html file in addition to the non-minified html file.

boombuler avatar Dec 12 '14 18:12 boombuler

I'm thinking about changing how rice embeds/appends boxes to a binary. Please read and comment on #47 This request sounds like a good idea for it.

GeertJohan avatar Feb 03 '15 15:02 GeertJohan

Also maybe a flag to exclude . files, eg .sass-cache etc..

pedromorgan avatar May 08 '19 10:05 pedromorgan