Labs/Jetpack/JEP/31: Difference between revisions

Jump to navigation Jump to search
fixed program module def'n and filled out section
(→‎Test Modules: Finished this section)
(fixed program module def'n and filled out section)
Line 75: Line 75:
* <tt>tests</tt> - a String or Array of Strings representing top-level module directories containing test suites for this package. Defaults to <tt>"tests"</tt>.
* <tt>tests</tt> - a String or Array of Strings representing top-level module directories containing test suites for this package. Defaults to <tt>"tests"</tt>.


* <tt>main</tt> - a String representing a top-level module directory that contains a program module. Defaults to <tt>"main"</tt>.
* <tt>main</tt> - a String representing the name of a program module that is located in one of the top-level module directories specified by <tt>lib</tt>.


=== Modules ===
=== Modules ===
Line 124: Line 124:


==== Program Modules ====
==== Program Modules ====
A program module is a module named by the <tt>"main"</tt> key in <tt>package.json</tt> and located in one of the top-level directories specified by the <tt>"lib"</tt> key.  It is expected to export a function called <tt>main()</tt> which contains a program body.


== Building Targets ==
== Building Targets ==


== Examples ==
== Examples ==
874

edits

Navigation menu