[Buildroot] [PATCH 1/1] angularjs: new package.

Thomas De Schampheleire patrickdepinguin at gmail.com
Mon Jul 20 11:56:39 UTC 2015


On Mon, Jul 20, 2015 at 1:49 PM, Ignacy Gawędzki
<ignacy.gawedzki at green-communications.fr> wrote:
> On Sat, Jul 18, 2015 at 09:25:41PM +0200, thus spake Thomas De Schampheleire:
>> >> > +define ANGULARJS_INSTALL_TARGET_CMDS
>> >> > +       for f in $(strip $(ANGULARJS_FILES)); do        \
>> >> > +               $(INSTALL) -m 0644 -D $(@D)/$$f         \
>> >> > +               $(TARGET_DIR)/var/www/$${f%.min.js}.js; \
>>
>> Here, IIUC, you are installing foo.min.js as foo.js. I think this is
>> misleading: it is common practice in web development to actually
>> include minified files as .min.js instead of renaming this, so I don't
>> see why it should be done here.
>
> Hi Thomas,
>
> I think it should be up to the web server to decide whether the
> version served is minified or not.  Otherwise you'd have to make the
> JS application choose the actual version, while it makes no functional
> difference.  Therefore, the application includes some .js file and
> ignores whether it is minified or not.
>
> I got my inspiration from the jquery package, which installs a
> minified version as jquery.js.  Do you think I should install minified
> files as .min.js anyway?

Hmm, ok, then it makes sense to be consistent.

I wonder if anyone ever would like to have the unminified files on
target, and how we'd call them if the minified is installed as .js.
But that's probably a problem to be solved then...

/Thomas



More information about the buildroot mailing list