This folder containes the build system of xml3d.js.
You can build xml3d.js using Ant. The main build file is build.xml in this folder.
There are 2 building modes:
- The 'develop' build option simply concatenated all files.
- the 'develop-min' build option performs an additional compression with Closure Compiler (simple mode). This option also performs additional type and syntax checks to find errors.
- Create an Eclipse project from the xml3d.js folder
- Open the file build/build.xml
- In the Outline panel, right click develop or *develop-min depending on how you want to build
- Select Run As > Ant Build
- Install Ant (e.g. with the binary distribution: http://ant.apache.org/bindownload.cgi)
- In Webstorm select Settings > External Tools
- Press the green plus to add a new tool
- Fill out the form
- Name: Ant (or something like that)
- Group: Leave empty for quicker selection or fill in whatever you like
- Under Options, only activate "Open Console"
- Show in: Leave it as is
- Program: Link to the \bin\ant.bat inside the Ant installation folder (or an equivalent file on non windows OS)
- Parameters: -f
$FileName$ - Working Directory:
$FileDir$ - Submit!
- Once the external tool is configured, rightclick the build/build.xml file and select the tool from the List (e.g. look for Ant or [GroupName] > Ant if you specified a group)
The xml3d.js build system builds separate modules for each subfolder in src/. To add new files to the build system do the following:
- locate the build.xml file in your module (e.g. inside src/data/ it's src/data/build.xml )
- Add a new
<file>node referring to the new file inside the<filelist>node.
Note: The order of the files is important. If your new js file uses (during first execution) a class or function definition of another file, that file must be included first by the build system.
If you encounter Closure compilation problems when executing the 'develop-min' build with Closure compiler missing the definition of certain external tools, please extend the file extern.js with any external function / object used by xml3d.js.