5 #### <span style="color:red">**The generator is no longer maintained.**</span>
7 To generate stub files from the widl you can use stub generator located in
8 ```tools/skeleton_generator/``` directory and run the python command:
11 $ python WAPIOven.py -d <stub code destination directory name> <widl directory/pluginname>.widl
14 If tizen.widl is needed, add tizen.widl
16 $ python WAPIOven.py -d <stub code destination directory name> <widl directory/pluginname>.widl <widl directory/>tizen.widl
20 $ tools/skeleton_generator/WAPIOven.py
23 You need to install jinja2 for WAPIOven.py:
25 $ sudo apt-get install python-jinja2
30 $ sudo apt-get install python-jinja2
31 $ cd tools/skeleton_generator/
32 $ python WAPIOven.py -d ../../src/notification/ /web-device-api/web/widl/tizen/notification.widl
35 WIDL files can be found in the project repository:
38 $ git clone ssh://<username>@168.219.209.56:29418/doc/web-device-api
41 The widl files are placed in: ```web-device-api/web/widl/tizen/``` directory.
43 Stub files generated by above command:
47 <pluginname>_extension.h
48 <pluginname>_extension.cc
49 <pluginname>_instance.h
50 <pluginname>_instance.cc
53 What should be done when skeleton code was generated?
54 - ```<pluginname>.gyp``` file should be added
55 - entry points should be checked in ```<pluginname>_extension.cc``` file
56 - each method should be implemented in ```<pluginname>_instance.cc``` file
58 ### Using multiple JavaScript files
60 To use multiple JavaScript files in one plugin create ```js/``` directory inside
61 plugin directory and place JavaScript files.
63 Inside ```<pluginname>_api.js``` required JavaScript files should be added:
65 //= require('common.js');
66 //= require('calendar_item.js');
67 //= require('calendar.js');
68 //= require('calendar_manager.js');
69 //= require('calendar_attendee.js');
70 //= require('calendar_alarm.js');
71 //= require('calendar_recurrence_rule.js');
74 To merge all JavaScript files ```tools/mergejs.py``` file is used.
75 This script merge all files mentioned in ```<pluginname>_api.js``` file into one
76 file before build process.
81 To format code use scripts provided in the ``tools/codestyle`` directory.
83 ``cpplint`` is used to validate C++ and ``eslint`` for JavaScript files.
85 **Currently, the JavaScript validator and formatter seems to be a little buggy,
86 thus it is not recommended to use.**
88 The developer needs to have ``python``, ``node.js``, ``eslint``, ``Closure Linter`` and ``clang-format-3.9`` installed.
90 For convenience, in the root of the project links were provided for easier access:
91 - ``code_format -> tools/codestyle/code_formatter.sh``
92 - ``code_validate -> tools/codestyle/code_validation.sh``
94 Those scripts consist of configuration for rules regarding the Google style guides, with few exceptions.
96 To format and validate C++ and JavaScript code run in the root of the project:
98 ./code_validate -a # -a for all, -c for C++, -js for JavaScript files
99 ./code_format -a # use -h or --help for help
101 The scripts also accept a path to module's directory.
102 By default every directory module in the ``src`` directory is used.
104 For more details, please see ``tools/codestyle/README`` file.
106 This rule concerns to branches ``tizen_3.0`` and above.