Skip to content

Instantly share code, notes, and snippets.

@pjanik
Forked from leeoniya/gist:1379478
Created October 9, 2012 09:17
Show Gist options
  • Save pjanik/3857581 to your computer and use it in GitHub Desktop.
Save pjanik/3857581 to your computer and use it in GitHub Desktop.
testing markdown

Adding new module which should be built as a separate library

This involves a few additional steps comparing with adding a single source file.

  1. Create a new directory in src/lab.

  2. 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).

  3. Define module-name.build.js and public-api.js files in your new directory (described below).

  4. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment