scripting:includes-imports

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scripting:includes-imports [2014/02/09 00:50] – external edit 127.0.0.1scripting:includes-imports [2018/01/10 18:36] (current) – external edit 127.0.0.1
Line 15: Line 15:
 The directives should be defined on first lines (empty lines between directives or before do not matter, they will be skipped). HippoEDIT will "eat" this directives, and do not pass to scripting engine. So your scripts works without problems.  The directives should be defined on first lines (empty lines between directives or before do not matter, they will be skipped). HippoEDIT will "eat" this directives, and do not pass to scripting engine. So your scripts works without problems. 
  
-The path entered in directive is relative to path of the current document. +The path entered in the directive is relative to the path of the current document. 
  
-To comment directive use ''%%//%%'' as commenting in JavaScript. This comment should be used for directive commenting in any scripting language, while any way the line with directive will not be passed to scripting engine. +To comment directive use ''%%//%%'' as commenting in JavaScript. This comment should be used for directive commenting in any scripting language, while anyway the line with directive will not be passed to the scripting engine. 
  
-You can also write your own comments after directive (as in example) - this is also supported. +You can also write your own comments after directive (as in the example) - this is also supported. 
  
 ===== Pattern inclusion ===== ===== Pattern inclusion =====
Line 37: Line 37:
  
 ===== Imports ===== ===== Imports =====
-Imports is nothing more than inserting of source code from //import// file to scope of main source file. Independently of there you place **import** directive, HippoEDIT will insert code in beginning of file, but taking into account inclusion sequence. +Imports are nothing more than inserting of source code from //import// file to scope of the main source file. Independently of there you place **import** directive, HippoEDIT will insert code at beginning of file, but taking into account inclusion sequence. 
  
-You can of course import one ore more files and have embedded imports (you import one file and it imports another file etc). If you will have circle references in embedding sequence, HippoEDIT will try to solve it. +You canof courseimport one or more files and have embedded imports (you import one file and it imports another file etc). If you will have circle references in embedding sequence, HippoEDIT will try to solve it. 
  
 As example: As example:
Line 68: Line 68:
   * more clear scope logic   * more clear scope logic
   * performance is better than with imports   * performance is better than with imports
-  * you can include file in another scripting language and would work (so you can include in Java Script files, VB Script files for example). +  * you can include file in another scripting language and would work (so you can include in JavaScript files, VB Script files for example). 
  
 As with //import// files, you need to write include directive in the beginning of the script file. The sequence of inclusion considered.  As with //import// files, you need to write include directive in the beginning of the script file. The sequence of inclusion considered.