Javascript Web Optimizer tool: multiple custom AMD modules

3747
1
02-17-2015 03:18 AM
markrobey
New Contributor III

Is it possible to have some clarification on using the Web Optimizer tool with an application that has multiple custom AMD modules? Presumably only one package.json is required?

The Help example uses the following directory structure:

  application_folder
   
|- index.html
   
|-- css
   
|-- extraCustomModule
   
|---- package.json
   
|---- MyCustomModule.js

With multiple custom modules is the structure still valid (with a bit of renaming)? Eg:

  application_folder
   
|- index.html
   
|-- css
   
|-- extraCustomModules
   
|---- package.json
   
|---- CustomModuleA.js

    |---- CustomModuleB.js

    |---- CustomModuleC.js

Thanks.

0 Kudos
1 Reply
markrobey
New Contributor III

The answer seems to be 'yes'. The package.json should refer to the 'extraCustomModules' folder (as in my example). This makes sense as packages are usually collections of modules (but I am thinking Python here). Anyway, the build ran ok with multiple custom modules (yet to test it on the web server).

If anyone knows differently, would be interested to hear.

0 Kudos