You can use Developer Studio to create and modify Jaggery projects and files. To get started, create a Jaggery project by clicking the Jaggery Project link on the Developer Studio dashboard or by choosing File > New > Project and selecting Jaggery Project from the Jaggery folder.
You can create a new project with empty stub files, or create the project based on existing source files by specifying the directory where they are located. You can also specify whether you want to separate your public resources from your source folder and can set default folder names for future projects. If you want to include support for plain JavaScript in this project, click the check box.
When you click Finish, the Jaggery project appears in the Project Explorer with the index.jag
, jaggery.conf
, and JavaScript resources (if you selected this option) under the project folder. You can double-click a file to display it in the editor, and right-click it to perform actions on the file like renaming it or checking it into the WSO2 registry. You can also right-click the Jaggery project itself to add new files, build the project, and more.
The Jaggery editor also provides a code assistance feature when you press Ctrl + Space. The code assistance drop down list first shows the built-in variables, then the built-in methods, and finally the possible statements.
You can either select from the list of statements or type the short key. For example, if you want to get the Function statement, type "fn" as shown in the list and press Enter.
The function statements will then appear in the Jaggery editor.
For more information on working with Jaggery, see the Jaggery documentation.