This involves a few additional steps comparing with adding a single source file.
-
Create a new directory in
src/lab
. -
Put all related sources there or in
src/lab/common
(if you think that they are generic enough and may be reused by other modules). -
Define
module-name.build.js
andpublic-api.js
files in your new directory (described below). -
Add build routines to the
Makefile
:4.1. Define a new target, for example:
server/public/lab/lab.module-name.js: \ $(NEW_MODULE_SRC_FILES) \ $(COMMON_SRC_FILES) $(R_OPTIMIZER) -o src/lab/module-name/module-name.build.js
4.2. List this target in
LAB_JS_FILES
Makefile variable containing the list of all Lab JavaScript modules to be generated.