Opened 3 years ago

Last modified 3 years ago

#1486988 new Feature Requests

Annoying javascript handling (shrink, unshrink).

Reported by: kaz Owned by:
Priority: 5 Milestone: later
Component: Other Version: 0.4-stable
Severity: normal Keywords:
Cc:

Description

The unfortunate design of the javascript compilation system is hostile toward the application of patches and config management in general.

The problem is that the javascript compiling script re-uses the source file name as the name of a compiled file. So if "app.js.src" does not already exist, "app.js" is renamed to "app.js.src", and then "app.js.src" is used to generate a compiled "app.js".

This means that patches which refer to "app.js" will not apply to the compiled version.

Moreover, if you're working with version control, "app.js" suddenly appears to be a locally modified file, until you restore it with "unshrink".

I don't know how you RCU developers live with this! Before every SVN commit, or any other command like "svn diff", you have to "unshrink" the sources, right?

Can we please have two distinct names for the uncompiled and compiled javascript?

Change History (3)

comment:1 Changed 3 years ago by alec

We, developers, are working on not shrinked files. We're using shrinking only on production. Having two files will be not good for development process or we'll need some checks in the code to use src files. I don't want to shrink after every change in src file.

comment:2 Changed 3 years ago by alec

  • Type changed from Bugs to Feature Requests

comment:3 Changed 3 years ago by kaz

To avoid shrinking all the time during development, and not introduce checks in the code about which files to use, what you can do is symlink the object files to the source file names, i.e.: app.js -> app.js.src. When you shrink, the symlink is deleted and replaced by compiled code.

Note: See TracTickets for help on using tickets.