0

Can you explain, or point to good resource on how to setup a minifier (preferably google closure) to work with Google App Engine.

I use AngularJS for client side. So have bunch of JS files, and like to serve it as one, minified during production. Without manually editing index.html for which files to server, and not having trouble with GAE setup, how can I achieve this?

thanks.

4

2 回答 2

1

借助 Page Speed 服务,您可以让 App Engine 为您完成优化工作,您可以从管理控制台设置页面启用该服务:

https://developers.google.com/appengine/docs/adminconsole/performancesettings#pagespeed

于 2012-10-23T16:18:58.667 回答
0

modernizr has an ant build script that searches your html files for js and css, minifies and concatenates etc, etc creating a published version of your code. You will probably want to tweak it to ensure that things like jquery and angularjs get put in the right place. I hadn't used ant for awhile and it was pretty comprehensible. I imagine you could replace whatever js minifier is there with something like closure.

Just as an aside, make sure that you use $inject dependency injection so the minifier doesn't mess up your angular code.

hope this helps

--dan

于 2012-10-11T22:30:04.487 回答