Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6633] Reduce compiled TSS file size

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterMichael Gangolf
AssigneeAbir Mukherjee
Created2020-11-20T16:58:38.000+0000
Updated2020-11-21T19:15:53.000+0000

Description

*Problem* Currently an app.tss file is compiled into every "/android/alloy/styles/" style and increases it's file size and has redundant code. *Example* E.g. if you have a very large app.tss (1MB) and 5 controllers with no style you'll end up with five 1MB files (= 5MB total) instead of one 1MB and five empty files (= 1MB total). *Idea:* Controllers use require to include alloy or other controllers already. Why not create a /Resources/android/alloy/styles/app.js file and include that file in the other compiled styled file and merge it to their style.

Comments

  1. Michael Gangolf 2020-11-20

    I've already tried to edit https://github.com/appcelerator/alloy/blob/1b9fd4685f0a6abebe1620b021c1d360523f9e8b/Alloy/commands/compile/index.js#L673 and I'm able to write a appTss.js file. I just have trouble including it in the other style files. Tried it with require but it doesn't seem to work here
  2. Cesar Estrada 2020-11-21

    This also affects iOS Apps. "/Resources/iphone/alloy/styles/style-files-from-all-views"

JSON Source