Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1372] Titanium Studio doesn't recognise .jslocal as a valid javascript file

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2015-09-29T01:00:06.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStudio
LabelsWebView, defect, studio3
ReporterAdrian Holmes
AssigneeShak Hossain
Created2014-11-19T17:12:24.000+0000
Updated2016-03-08T07:37:47.000+0000

Description

According to the documentation, when using a WebView any js file which is loaded locally but dynamically must have an extension of .jslocal to avoid it being removed at build time. However, when working with these files Studio does not recognise them as a valid javascript extension so none of the coding helpers are available. The editing experience becomes only a fraction better than notepad.

Comments

  1. Stephen Feather 2014-11-19

    Do the docs really say 'must'? .jslocal is arbitrary. It just cant be .js, as those get processed by the build scripts. As for this being a bug, not so much. You just need to setup the file associations in your preferences Set the file association !http://content.screencast.com/users/Stephen_Feather/folders/Jing/media/36ac6831-5502-4e75-8258-6e9319842c54/00000706.png! Set the content-type !http://content.screencast.com/users/Stephen_Feather/folders/Jing/media/9f76eb11-ff23-4285-8c55-db658519f009/00000707.png!
  2. Adrian Holmes 2014-11-20

    Thanks for this, I did look for this feature but would have expected 'Preferences' to fall under the 'Edit' menu. Anyway, not too worry all done now, I look harder next time :) Copied from the 3.x docs... For local JavaScript files not referenced in static local HTML files, for example, a dynamically-genereated HTML file referencing a local JavaScript file, rename the file extension of the local JavaScript files to '.jslocal' instead of '.js'. As an improvement to Studio perhaps this association should be pre-configured as the docs are explicit with regards to the name?

JSON Source